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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 20:50, rrrrainy
What are the advantages of google cloud ?
Answers: 2
image
Computers and Technology, 22.06.2019 10:30, hope564
Dave has to create animations for a game. which tool can dave use?
Answers: 3
image
Computers and Technology, 22.06.2019 21:30, mjweed2456
Nathan wants to create multiple worksheet containing common formatting styles for his team members. which file extension him to save these worksheets? nathan to create multiple worksheets with common styles. he needs to save them with the extension.
Answers: 1
image
Computers and Technology, 23.06.2019 13:30, jhitotw
What is the primary difference between the header section of a document and the body? a. the body is displayed on the webpage and the header is not. b. the header is displayed on the webpage and the body is not. c. the tag for the body is self-closing, but the tags for the headers must be closed. d. the tag for the header is self closing, but the tag for the body must be closed.
Answers: 3
You know the right answer?
Ensure that all files are well commented and documented. Part 1 - Person Class Design a class named...

Questions in other subjects:

Konu
Mathematics, 25.03.2021 05:30
Konu
Mathematics, 25.03.2021 05:30