Design a SuperClass named Person with fields for holding a person's name, address, and phone number. Write one or more constructors and the appropriate mutator and accessor methods for the class's fields. Next, design a SubClass which inherit from the Person class. The Customer class should have a field for a customer number and boolean field indicating whether the customer wishes to be on a mailing list. Write one or more constructors and the appropriate mutator and accessor functions for the classes' fields. Third, design a SubClass which inherits from the Customer class. The PreferredCustomer class should have fields for the amount of the customer's purchases and the customers' discount level. Write one or more constructors and the appropriate mutator and accessor functions for the classes'
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:
I need help with completing my Java
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 8 images