1. Using object oriented programming approach, program to calculate the purchase price for a retail store.
- Define a class Product1 (Product1.java)
o Four private data members: product number, product name, unit price, units sold
o Two overloaded constructors
o Get and set methods for each private data member
o A method to calculate and return the purchase price (unit price * units sold)
o toString() method
- (Store.java) client program that creates a Product1 object based on the user input, computes the purchase price, and outputs the sales information (include the item id, item name, unit price, units sold, and purchase price).
Output of the given program is: Enter product id: 1 Enter product name: rose... View the full answer