1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
gladu [14]
3 years ago
13

Create a Produceclass that hasan instance variable of type Stringfor the name, appropriate constructors, appropriate accessor an

d mutator methods, and a public toString() method. Then create a Fruitand a Vegetableclass that are derived from Produce. These classes should have constructors that take the nameas a Stringand invoke the appropriate constructor from the base class to set the name.Also, they should override toStringmethod to display the nameof the produce and its type. For instance, Mangois a Fruitand Caulifloweris a Vegetable. Finally, create a class called TruckOfProducethat will keep track of the boxes of Vegetablesand Fruitsadded in to the truck. This class should use an array of Produceto store both Vegetableand Fruitobjects.
Computers and Technology
1 answer:
Nezavi [6.7K]3 years ago
5 0

Answer:

you suck

Explanation:

You might be interested in
Edhesive coding practice 3.4​
allsm [11]

I'm sorry i have to go to sleep.. Can we continue tm?

In the morning

8 0
4 years ago
Read 2 more answers
Use a dictionary to count the frequency of letters in the input string. Only letters should be counted, not blank spaces, number
netineya [11]

Answer:

def count_letters(text):

 result = {}

 # Go through each letter in the text

 convert_text = text.lower()

 for letter in convert_text:

   if letter.isalpha():

     if letter in result:

       result[letter] += 1

     else:

       result[letter] = 1

 return result

print(count_letters("AaBbCc"))

# Should be {'a': 2, 'b': 2, 'c': 2}

print(count_letters("Math is fun! 2+2=4"))

# Should be {'m': 1, 'a': 1, 't': 1, 'h': 1, 'i': 1, 's': 1, 'f': 1, 'u': 1, 'n': 1}

print(count_letters("This is a sentence."))

# Should be {'t': 2, 'h': 1, 'i': 2, 's': 3, 'a': 1, 'e': 3, 'n': 2, 'c': 1}

Explanation:

4 0
3 years ago
We can use formatting before and after typing.​
Anika [276]

Answer:

i dont know but thanks for marks

8 0
3 years ago
Create an array of doubles to contain 5 values Prompt the user to enter 5 values that will be stored in the array. These values
Gre4nikov [31]

Solution :

$\#$include $$  

$\#$include $$    

void parse$\_$name($char \ full[]$, char first$[],$ char last$[])$

{

// to_get_this_function_working_immediately, _irst

// stub_it_out_as_below._When_you_have_everything_else

// working,_come_back_and_really_parse_full_name

// this always sets first name to "Noah"

int i, j = 0;

for(i = 0; full[i] != ' '; i++)

  first[j++] = full[i];

first[j] = '\0';  

// this always sets last name to "Zark"

j = 0;

strcpy(last, full+i+1);

// replace the above calls with the actual logic to separate

// full into two distinct pieces

}

int main()

{

char full[40], first[20], last[20];

double hours[5];

// ask the user to enter full name

printf("What is your name? ");

gets(full);

// parse the full name into first and last

parse_name(full, first, last);

// load the hours

for(int i = 0; i < 5; i++)

{

   printf("Enter hours for day %d: ", i+1);

   scanf("%lf", &hours[i]);

}

// create the time card

FILE* fp = fopen("timecard.txt", "w");

fprintf(fp, "First Name: %s\n", first);

fprintf(fp, "Last Name: %s\n", last);

double sum = 0.0;

for(int i = 0; i < 5; i++)

{

   fprintf(fp, "Day %i: %.1lf\n", i+1, hours[i]);

   sum += hours[i];

}

fprintf(fp, "Total: %.1f\n", sum);    

printf("Timecard is ready. See timecard.txt\n");

return 0;

}

3 0
3 years ago
The values of existing data can be modified using the SQL ________ command, which can be used to change several column values at
Sphinxa [80]

Answer:

The values of existing data can be modified using the SQL ___Update_____ command, which can be used to change several column values at once.

Explanation:

However, if you are interested in modifying some columns, then you must specify the columns of interest by using Update (table name) Set column1, column2, etc., which assigns a new value for the columns that you want to update, with each column value separated by a comma.  The SQL (Structured Query Language) Update command is used to update data of an existing database table.

4 0
3 years ago
Other questions:
  • How do switches and bridges learn where devices are located on a network?
    5·1 answer
  • Which of these is important to consider before believing health or fitness information you find online? Where the information wa
    5·2 answers
  • Help!!!!!!!!!!!!!!!!!!!
    12·1 answer
  • Write a short program that uses a for loop to populate an array. The array can store up to 10 integers. Modify the code slightly
    12·1 answer
  • How do you think advances in processors affect corporations that discover the computers they purchased just a couple of years ag
    10·1 answer
  • Audiovisual technology is not important in a world that is interactive
    7·1 answer
  • Agent Phil Coulson developed this program to register Avengers in S.H.I.E.L.D's database using cutting-edge programming language
    15·1 answer
  • Question 1
    10·1 answer
  • have you ever had to adjust your communicatio style to egage a customer or roommate? what was the situation and outcome?
    5·1 answer
  • When memory allocation is ____, it means all portions of the program and OS are loaded into sequential locations in memory.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!