[IFT 102]
Introduction to Java Technologies
hwk 5
Score: 30 pts
I.
The Exercises below are from the required Textbook, page 481, 533,
and 534 (3 pts * 6)
Ex 9.3
Ex 9.7

[IFT 102]
Introduction to Java Technologies
Ex. 9.8
Ex 10.1

[IFT 102]
Introduction to Java Technologies
Ex 10.2

[IFT 102]
Introduction to Java Technologies
Ex. 10.3

[IFT 102]
Introduction to Java Technologies
II.
Exploring Inheritance (4pts * 3)
File
Dog.java
contains a declaration for a Dog class. Save this file to your directory and study it—notice
what instance variables and methods are provided.
Files
Labrador.java
and
Yorkshire.java
contain declarations for classes that extend Dog. Save and study
these files as well.
File
DogTest.java
contains a simple driver program that creates a dog and makes it speak. Study
DogTest.java, save it to your directory, and compile and run it to see what it does.
Now modify these files as follows:
1.
Add statements in DogTest.java after you create and print the dog to create and print a Yorkshire and
a Labrador. Note that the Labrador constructor takes two parameters: the name and color of the

[IFT 102]


You've reached the end of your free preview.
Want to read all 8 pages?
- Summer '17
- Rucker