How do you calculate the extended price for the item

Assignment Help Computer Engineering
Reference no: EM132164423

Using C++, you need to design, implement, and test a grocery shopping list program. The program should maintain and display a list of items.

You will design an Item class. The class should have data elements for the following information: item name, unit (i.e. can, box, pound, or ounce), quantity to buy, and unit price.

Consider following things: do you need any functions other than the constructor? How do you calculate the extended price for the item (quantity to buy times unit price)? How do you print it to the screen?

You will also need a List class. You will store Item objects in your List object. When you enter a new item, an Item object must be created and added to the List object.

Use a dynamic array to hold the Item objects. The dynamic array should start with a capacity of 4 Item objects. Do you need a print function in this class? Think about it.

Your program must perform the following activities: create a list, add items, remove items, and display the shopping list. To add an item, you should prompt the user to enter the name, unit, quantity to buy, and the unit price.

The display should show: each item name in the list, item unit, the quantity to buy, the unit price, the extended price for each item, and the total price for all items. Oregon doesn't have a sales tax so you can ignore that. Debug and test your program.

Once you have the List and Item classes working correctly, test if an item is already in your List before adding it. Overload the == operator to perform the test. There is a simple example to overload this operator in the book. Keep it simple.

How will you compare items? You can assume that the user will type the information correctly and compare them by the item names.

Reference no: EM132164423

Questions Cloud

Create an interactive gui program : The program computes the expected revenue for each type of mural when interior murals cost $500 each and exterior murals cost $750 each.
Calculate the mean and standard deviation of the numbers : Using a C complier, obtain N floating point numbers from the user and calculate the mean and standard deviation of the numbers.
Create cover letter for a student applying for an internship : Create a Cover letter for a student applying for an internship, and needs a general letter so that he can use it multiple times
Treating flu symptoms with a new medicine : Clinical trials involved treating flu symptoms with a new medicine. Among 724 patients treated with the medicine
How do you calculate the extended price for the item : How do you calculate the extended price for the item (quantity to buy times unit price)? How do you print it to the screen?
Solid evidence of global warming : Use a 0.01 significance level to test the claim that less than 25% of the population believes that there is no solid evidence of global warming.
State the final conclusion : A politician claims that more than 50% of adults are opposed to federal dollars being used for foreign aid. Use a 0.01 significance level to test the claim.
Calculate the expected return for Aussie Traders : BAP53 Introduction to Corporate Finance Assignment, Universal Business School Sydney, Australia. Calculate the expected return for Aussie Traders
Calculate the surface area of a right circular cone : Create a function that will calculate the surface area of a right circular cone whose arguments will be received through the command line.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd