Tuesday, July 28, 2009

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.





OUTPUT





enter price and purchased quantity of item 1





price:20





Quantity:5





continue with each price and item quality

Write a C++ program that will find out the total amount of a customer's bill according to the items purchased.
I think that you should do your own homework. Try reading this tutorial if you have any doubts:





http://www.cplusplus.com/doc/tutorial/
Reply:I hope i can complete it.


But i need some time.


IF you really want this project.


Then mail me at m_gopi_m@yahoo.co.in

anemone

No comments:

Post a Comment