| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

DogObject

Page history last edited by PBworks 16 years, 4 months ago

DogObject

 

In this program, you will make a class called Dog and a class called TestDog. Dog should not need a main() method.

 

Use individual methods in Dog for the following:

talk();

move();

happy();

angry();

hair();

breed();

and some other attributes of Dog if you want....

You can just have them be System.out.println("woof") kind of statements.

 

Instantiate adog to make a dog object.

Use method calls in TestDog to call the methods

 

Comment your TestDog code into your Dog.java file so you don't have to print extra paper.

 

Make sure you comment your results.

 

Use the CodeFormatting technique to make your code printout readable.

Comments (0)

You don't have permission to comment on this page.