Question: JAVA Coffee shop wants to implement a system to allow its registered customers to view their purchases. The system is required to allow its salespeople

JAVA

Coffee shop wants to implement a system to allow its registered customers to view their purchases. The system is required to allow its salespeople to create sales records. The system is also required to allow its salespeople and customers to view sales records but only the salesperson to view all the records. Assuming that the sales records can ONLY be created and viewed through another object called Sales.

Write source codes to define classes required to create the customer and salesperson objects in Java programming language while maintaining the underlying principles of inheritance. Assume that the customer and salesperson share id and name attributes. You should note any other assumption you will make when writing the code. Write a short program to create salesperson and customer objects, insert the value of their id and name fields, and display them.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!