subject

Write a class named grocerylist that represents a list of items to buy from the market, and another class named groceryitemorder that represents a request to purchase a particular item in a given quantity (example: four boxes of cookies). the grocerylist class should use an array field to store the grocery items and to keep track of its size (number of items in the list so far). assume that a grocery list will have no more than 10 items. a grocerylist object should have the following methods: public grocerylist()constructs a new empty grocery list. public void add(groceryitemorder item)adds the given item order to this list if the list has fewer than 10 items. public double gettotalcost()returns the total sum cost of all grocery item orders in this list. public void add(groceryitemorder item, int quantity) // adds quantity items to my grocery listthe groceryitemorder class should store an item quantity and a price per unit.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:00
Which of the following physical laws can make the flow of water seem more realistic? a. motion b. gravity c. fluid dynamics d. thermodynamics
Answers: 2
question
Computers and Technology, 23.06.2019 00:30
If joey was single and his taxable income was $9,500, how much would he pay in taxes each year?
Answers: 1
question
Computers and Technology, 24.06.2019 19:30
Which phrase is the best definition of a pivottable a a table containing data that is organized horizontally b a table used to calculate financial pivot values c a tool used to summarize data d a table containing specific formatting
Answers: 1
question
Computers and Technology, 24.06.2019 21:30
The hybrid uses 144 to 158 volt batteries.
Answers: 1
You know the right answer?
Write a class named grocerylist that represents a list of items to buy from the market, and another...
Questions
question
Mathematics, 02.12.2020 17:50
question
Mathematics, 02.12.2020 17:50
question
Mathematics, 02.12.2020 17:50
question
History, 02.12.2020 17:50
Questions on the website: 13722362