Computers and Technology

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.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 00:00, eguzmandpandoracom
How do we use the sumif formula (when dealing with different formats) ?
Answers: 1
image
Computers and Technology, 23.06.2019 11:30, magicalpenguin48
In cell h5 enter a formula that will calculate the percentage of attendees that went to the altamonte springs job fair in 2018.
Answers: 1
image
Computers and Technology, 23.06.2019 22:20, tagerryawilson6
If i uninstall nba 2k 19 from my ps4 will my career be gone forever?
Answers: 2
image
Computers and Technology, 23.06.2019 23:00, GreenHerbz206
Computer programming is one type of what career
Answers: 1
Do you know the correct answer?
Write a class named grocerylist that represents a list of items to buy from the market, and another...

Questions in other subjects: