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
kumpel [21]
3 years ago
13

In this programming assignment, you will create a hierarchy of classes (see below) that inherit from the beverage class. The bas

e class (Beverage) and each derived class should have the appropriate attributes, parameterized constructor, destructor, setter/getter methods, and a toString() method that clearly defines the beverage. Write a program that creates several beverages (at least one of each from list below) using a parameterized constructor and displays the set of beverages you created.
Computers and Technology
1 answer:
harina [27]3 years ago
5 0

Answer:

public class GetInfo{

Beverage[]  beverages=new Beverage[100];

int i=0;

GetInfo(Beverage b){

beverages[i]=b;

i++;

}

public void Display(){

for(int i=0;i<beverages.length;i++)

cout<<beverage[i].tostring();

}

Explanation:

we are taking Beverages array to store all values and in constructor we are adding that to the list and Display() function prints the vale

You might be interested in
Hi um... i just wanna say hi :P
trasher [3.6K]
Lol Heyy , how are you
4 0
3 years ago
Read 2 more answers
You are building a gaming computer and you want to install a dedicated graphics card that has a fast gpu and 1gb of memory onboa
irga5000 [103]
Usually a graphics card would be plugged in manually through a PCI-e express slot on the motherboard. But to give the card enough power (based on how powerful the card is) you would use a 6 pin or an 8 pin power connector.
<span />
5 0
3 years ago
Read 2 more answers
3.5 Code Practice
Veseljchak [2.6K]

Answer:

grade = input("Enter grade")

def add(grade):

if grade == 9:

 print("Not in High School Freshman")

elif grade == 10:

 print("In High School")

 print("somophone")

elif grade == 11:

 print("in High School")

 print("Junior")

elif grade == 12:

 print("in High School")

 print("Senior")

else:

 print("Grade Not Accepted:")

return 0;

add(11)

Output:

Enter grade 11

in High School

Junior

Process finished with exit code 0

Explanation:

Firstly remember that this is a function, and not a program. Hence, you need to call the function to test it. A python program is interpreted line by line, Hence, we can test a function as well. Here we input a grade, and through the function find the details related to it and the print it out, which is clearly explained through the definition of the function.

7 0
4 years ago
Read 2 more answers
William is an HR manager in a textile-manufacturing firm. He is creating a file on the hours each employee worked during the las
Vika [28.1K]

The Round function will do the mentioned operation.

so answer is option C.ROUND

3 0
3 years ago
Read 2 more answers
onsider the following program: Peform a total of six exercises. Select one exercise from each of the following areas: hips and l
Leviafan [203]

Answer:

Beginner

Explanation:

A program like this is ideal for a beginning exerciser due to the high number of repetitions and the sets are not much.

Cheers

3 0
3 years ago
Other questions:
  • this isnt a question but i am looking for anything willing to help me with my work. i have 50 missing assignments just in one cl
    7·1 answer
  • Write a program that first gets a list of integers from input. Then, get another value from the input, and output all integers l
    8·1 answer
  • When a module is executing what happens when the end of the module is reached?
    10·1 answer
  • Which router feature, when enabled, helps computers on the local network automatically discover and communicate with services pr
    12·1 answer
  • What if you put a flashdrive in a iphone block and plug it in an outlet
    7·2 answers
  • All the read/write heads a hard disk are controlled by a(n) ____ which moves the read/write heads across the disk surfaces in un
    13·1 answer
  • Which statement best describes desktop publishing?
    10·1 answer
  • What is the definition of a flowchart? *
    13·1 answer
  • Re:
    15·1 answer
  • During the troubleshooting of a pc that will not boot, it is suspected that the problem is with the ram modules. The ram modules
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!