subject

Ensure that all files are well commented and documented. Part 1 - Person Class Design a class named Person with fields for holding a person's name, address, and telephone number. Write one or more constructors and the appropriate mutator and accessor methods for the class's fields. Also include a toString method that displays the person information. Customer Class Design a class named Customer, which inherits from the Person class. The Customer class should have a field for a customer number and a Boolean field indicating whether the customer wishes to be on a mailing list. Write one or more constructors, and the appropriate mutator and accessor methods, for the class's fields. Also include a toString method that displays the superclass information followed by the customer information. CustomerTest Class This class contains a main program to test your Customer objects. Demonstrate you can create a Customer object and display the object's information. Part 2 - Preferred Interface Create a public interface called "Preferred". This interface should specify an abstract method called "getDiscount" that takes no arguments. Preferred Customer Class This class inherits from the Customer class and implements the Preferred interface. The Preferred Customer class should have fields for the amount of the customer's purchases and the customer's discount level. The discount level is determined the following way: • When a preferred customer spends $500, he or she gets a 5% discount on all future purchases.
• When a preferred customer spends $1000, he or she gets a 5% discount on all future purchases.
• When a preferred customer spends $1500, he or she gets a 7% discount on all future purchases.
• When a preferred customer spends $2000, he or she gets a 10% discount on all future purchases.
Write one or more constructors and the appropriate mutator and accessor methods for the class's fields. A toString class should display all customer information, including the amount of purchase and discount level.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:10
Look at the far left lane in the picture. explain what the red car is doing and what it needs to do to travel safely.
Answers: 2
question
Computers and Technology, 24.06.2019 01:00
The initial tableau of a linear programming problem is given. use the simplex method to solve it. x 1 x 2 x 3 s 1 s 2 z 1 2 4 1 0 0 8 3 4 1 0 1 0 10 minus3 minus12 1 0 0 1 0 the maximum is nothing when x 1equals nothing, x 2equals nothing, x 3equals nothing, s 1equals3, and s 2equals0. (be sure to simplify to lowest terms if necessary.)
Answers: 2
question
Computers and Technology, 24.06.2019 02:00
How are we able to create photographs differently than 100 years ago? explain your answer in relation to your photograph you selected.
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
What is the process in which the software development team compiles information to determine the final product
Answers: 1
You know the right answer?
Ensure that all files are well commented and documented. Part 1 - Person Class Design a class named...
Questions
question
Mathematics, 14.04.2021 02:30
question
Mathematics, 14.04.2021 02:30
question
Mathematics, 14.04.2021 02:30
question
Medicine, 14.04.2021 02:30
question
Mathematics, 14.04.2021 02:30
question
Mathematics, 14.04.2021 02:30
Questions on the website: 13722361