Purchase Solution

Java class named Person with fields for holding a person's name

Not what you're looking for?

Ask Custom Question

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.

Purchase this Solution

Solution Summary

The expert designs a Java class named Person with fields for holding a person's name.

Purchase this Solution


Free BrainMass Quizzes
Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

C# variables and classes

This quiz contains questions about C# classes and variables.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.