Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Experts Guide To SQL

Authors: Frank Lusardi

1st Edition

0070390029, 978-0070390027

More Books

Students also viewed these Databases questions