Sei sulla pagina 1di 1

Smt K.B.

Parekh College of Computer Science,


Mahuva
Sub: OOP with C++
Assignment – 1
Q-1] Define a Class for shopping named “shop”. Having
The following data member:
- PRODUCT ID
- PRODUCT NAME
- PRODUCT PRICE
- PRODUCT QUANTITY
Make a class having the following member functions:
- add product in list
- display
- remove product
After removing an item from the list the total bill should be modified and
then display the modified amount on the screen with all criteria.

Q-2] Create a Class called “Diary”, Having the following fields


- CONTACT NAME
- CONTACT NUMBER
- CONTACT TYPES SUCH AS “Personal”, “Public” and “Family”
Create the Function as follow to complete the Class:
- Create Contact
- Sort Contacts by name
- Sort Contact by Type
- Search contact from the List

Q-3] Create a Class called “CEMENT”, having the following data Members:
- Bag ID
- Weight in Bag [ fixed value 20kg ]
- Type [ such as Type 1 and Type 2 ]
- Price of Bag [ Rs. 225 for Type 1 and Rs. 300 For Type 2 ]
Now define the functions to add N new bags in the manufacturing list, check
whether any bag has error in weight, if erroneous bag found then calculate the error
in weight and fins the type. Also count the loss in term of Rupees.

Q-4] Stationary Problem Wrote in Class

Q-5] Using Friend Function User can Exchange the Value of Two Different Class

------------------------------* Best Of Luck *------------------------------

Potrebbero piacerti anche