Tuesday, July 14, 2009

Write a C++ program that will find out the total amount of a customer's bill according to the items purchased.

Write a C++ program that will find out the total amount of a customer's bill according to the items purchased.


Create two classes: Purchased_item, Bill


The Purchased_item should be having the following data members





" item_num //for item number





note: item_num //should be static. This data member will be used to display the item number whose information is currently required from the user





" price //for per unit price


" quantity //for quantity purchased





class Bill should have two data members





" total_amount //for the total amount of bill that is to be paid


" items[5] //an array of purchased_item; should be 5 in size





class Bill should also have a member function that is used to calculate the total amount and assign it to the data member , total_amount


Your program should take input of the price and quantity of 5 items and display the total amount after calculation.

Write a C++ program that will find out the total amount of a customer's bill according to the items purchased.
Have you tried to create this program yourself? Can you give it a try then ask questions? This is not a very small program and in addition to that if we just give you the answer you will never learn how to do something like this in the future by yourself.





What don't you know how to do? Is it what classes or structs you need to create %26amp; how? Is it how to read and store data? Is it how to create member functions of classes? Is it how to display data?





Please, answer these questions in the additional details section so I can help you.

wisteria

No comments:

Post a Comment