Using object oriented programming approach program to


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).

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Using object oriented programming approach program to
Reference No:- TGS02727555

Now Priced at $10 (50% Discount)

Recommended (93%)

Rated (4.5/5)