Purchase Solution

Class Hierarchy for Java Class

Not what you're looking for?

Ask Custom Question

be just a number.
Example 1: Create a mutable class Phone with two integer data fields: areaCode and number. Have two constructors, "getter" methods, and "setter" methods for each data field and a toString method.
Example 2: Derive a class cellPhone from class Phone that has two String data fields maker and service.
Example 3: Derive a class landPhone from class Phone that has two data fields address and longDistance.
Example 4: Derive a class cablePhone from class landPhone that has a data field cableProvider.
Example 5: Write a driver application that instantiates each of these classes and prints the results.
Example 6: Draw the UML diagram that relates these four classes.

Attachments
Purchase this Solution

Solution Summary

The expert examines class hierarchy for Java Class.

Purchase this Solution


Free BrainMass Quizzes
Basic Networking Questions

This quiz consists of some basic networking questions.

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.

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.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

C# variables and classes

This quiz contains questions about C# classes and variables.