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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started