Professional Documents
Culture Documents
Assign 2
Assign 2
Classes:
Product:
Private members: - String name
- double price
- int quantity
Public methods:
+ Constructor to initialize the products array
+ A method to add a new product
+ Methods to remove a product
(by index or by name, use overloading)
+ A method to display the entire inventory
(name, price, quantity)
+ A method to calculate the total value of all products in
stock (sum of each product's total cost)
Requirements: