0

Create a class named Order. This class has the following attributes/ data members
i) OrderID
ii) Items
iii) PricesOfItems

a)
Create the object of this class using parameterized constructor in order to initialize
OrderID and Items data members. Default values of both the data members must be
equal to 1.

b) Write the following member functions of this class;
i) OrderBill ( ), this function will calculate the invoice of an order and display the
result. The formula to calculate the invoice is

invoice=SumPrices();

ii) SumPrices( ), this function will sum the prices of the items entered by the user
from
keyboard in PricesOfItems array and returns the result.

c)
Write the setter functions for OrderID, Items, and PricesOfItems. And getter functions
for OrderID and Items.

Also write the main () to create the object of class Order.

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by orwell84
0

Why are you taking a programming/computer science class if you don't want to put any effort into it?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.