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, 24.06.2019 11:30
What does the https: // mean when you type in a website
Answers: 1
question
Computers and Technology, 24.06.2019 20:30
Drums installed, you would apply clicks of the parking brake to obtain a slight drag on both rear wheels
Answers: 1
question
Computers and Technology, 24.06.2019 21:30
How is a wan different than a lan? both connect computers, but only wan users don’t need the same operating system. both are peer-to-peer networks, but only a wan requires networking hardware. both network computers, but only a wan can cover larger geographical ranges. both connect computers to the internet, but only wan connects to the cloud.
Answers: 1
question
Computers and Technology, 24.06.2019 22:00
Iam trying to get my google account back for school and business, can someone ?
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, 08.01.2021 06:10
question
History, 08.01.2021 06:10
question
Mathematics, 08.01.2021 06:10
question
Mathematics, 08.01.2021 06:10
question
Mathematics, 08.01.2021 06:10
question
Physics, 08.01.2021 06:10
Questions on the website: 13722362