Sam runs a local musical equipment store in your neighbourhood. He has contracted you to create an interactive application that will assist him with customer purchases. Create a class named Customer Purchases that will contain get and set methods for a customer number, first name, surname, product, price and quantity. Create a separate class called Printing that will include a method called Print Details, that will print the Customer Invoice. In the Printing class include another method called Customer Purchase Report which will display the following information: REPORT OPTION PERCENTAGE TAX 15% COMMISSION 8.5% DISCOUNT 10% TOTAL (Price + Tax) – (Discount + Commission) In your main class, capture all the customer purchase details required to produce the reports
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
Sam runs a local musical equipment store in your neighbourhood. He has contracted you to create
an interactive application that will assist him with customer purchases. Create a class named
Customer Purchases that will contain get and set methods for a customer number, first name,
surname, product, price and quantity. Create a separate class called Printing that will include a
method called Print Details, that will print the Customer Invoice. In the Printing class include
another method called Customer Purchase Report which will display the following information:
REPORT OPTION PERCENTAGE
TAX 15%
COMMISSION 8.5%
DISCOUNT 10%
TOTAL (Price + Tax) – (Discount + Commission)
In your main class, capture all the customer purchase details required to produce the reports
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 4 images