Programming in Java Program
Assignment 4
1.
Use Worksheet 1-1 and create your own class similar to your instructors
"CyberPet". Your class should include:
- the name of your class
- two mutually exclusive boolean variables
- two methods to change the boolean variables
- get your instrutor's initials on the worksheet before programming
2. Program your "CyberPet" class. Make sure it compiles without
errors.
- Note: it will NOT have "main" or "init" methods
3.
Program an application similar to your instructor's "CyberPetOwner"
program. Your application should include:
- a class that will create and use an instance (object) your "CyberPet"
- the
main() method should include
- an object declaration of your "CyberPet"
- an object instantiation of you "CyberPet"
- a test of each of the methods of your "CyberPet"
- compile and run your application & show your instructor
- make sure comments and indentation are correct.
- copy and paste the application to the bottom of your CyberPet class
and turn in.
4. Bonus: Make two instances of your CyberPet.
|