Starting from:
$35

$29

Program L7a Solution

    1. Complete Programming Activity 1 - section 7.8. Use the following files: Airport.java 

AirportClient.java  Pause.java 

    2. After completing the program provide answers to the Discussion Questions 1 and 2 on page 399 (section 7.8 below Programming Activity 1).
    3. Class Auto that you studied in this chapter is a service class that contains data and methods for use by applications/clients that need functionality for an auto with three fields: model, milesDriven, and gallonsOfGas.

The client class has a main method that uses the methods defined in the Auto class and it is called

AutoClient.

Using these classes as an example create a class called TelevisionChannel that has three fields: name (String), number (int), and cable (boolean that represents whether the channel is a cable channel) and implement the following methods for that class:

        a. a default constructor that initializes the fields to an empty string, 0, and false respectively

        b. a secondary constructor that takes three parameters c. accessor methods for each field
d. mutator methods for each field

e. a "business" method returning the number of digits in the channel number. For instance, if the

channel number is 21, the method should return 2; if the channel number is 412, the method should return 3

To test your methods create a client class called TelevisionChannelClient. Both classes must be submitted for grading.















https://cilearn.csuci.edu/courses/5532/assignments/61971    1/1

More products