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

  Examine the application development process in ms access

Examine the application development process in MS Access. Examine rudiments of the Visual Basic for Applications language. Differentiate between MS Access applications without VBA and MS Access applications with VBA.

  Modify the pseudocode and optimize

offer valid reasons why the pseudocode is now more efficient.

  What exactly did eckert and mauchley patent and why

What exactly did Eckert and Mauchley patent and why did the judge feel their system was based on Atanasoff's earlier work?

  What is wrong with the given fragment of assembly language

What is wrong with the following fragment of 68000 assembly language (the error is one of semantics).

  Demonstrate your understanding of conditional executio

This is a project that requires using http://snap.berkeley.edu to complete. The program should demonstrate your understanding of conditional execution with one or more if blocks.

  Write a function replist that receives two input arguments

A list and the number of times each element is to be duplicated. The function should then return the resulting list.

  What is the purpose of the hidden control view state

What is the purpose of the hidden control View State? How can an ASP.NET checkbox control be forced to cause a post back when it is checked?

  What is the value shown by the bit string

What is the value shown by the bit string 101101 if - Negate the following binary numbers in 4-bit 2's complement representation - How large a value can be represented by each of the unsigned binary quantities?

  What the program does are in comments at the beginning

The method is passed a list of comma separated last names (lastNamelList) as well as a name for which this list should be searched (searchForMe).

  Explain the overlap by giving an example application

Explain the overlap by giving an example application in which the originator's usage period for the shared secret key begins before the recipient's usage.

  Paste image of linear programming results window

A linear programming problem cost minimization problem has objective function: Minimize X +Y. Use QM for Windows to plot the feasible region. Paste image of Linear Programming Results window and Solution List window here

  What is the url of the web site

What is the URL of the Web site? Is this page appealing or unappealing? List three reasons for your answer.

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