Demonstrate instances of each class and tests of all


Design a Java 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.

Next, design a class named Customer, which extends the Person class. The Customer class should have a field for a 6 digit 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.
Then, design a class named PreferredCustomer, which extends the Customer class. The PreferredCustomer class should have fields for the amount of the customer's purchases and the customer's discount level.
Write one or more constructors and the appropriate mutator and accessor methods for the class's fields.

Discount levels:
Customer Spends Discount on all future Purchases
$500 5%
$1000 6%
$1500 7%
$2000 10%

Demonstrate instances of each class and tests of all control paths in a program.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Demonstrate instances of each class and tests of all
Reference No:- TGS01249984

Now Priced at $20 (50% Discount)

Recommended (92%)

Rated (4.4/5)