Computers and Technology
Computers and Technology, 12.04.2021 23:30, adamm16

For this exercise, you are going to create a part of an Animal hierarchy. Unlike some of our examples and the previous exercises, this exercise is going to have 3 levels in the hierarchy. At the top is the Animal class. Below that, we are going to have a subclass for Pets. Under pets, we are going to have 2 subclasses, Dogs and Fish. You will need to create your class hierarchy and add instance variables, getters, and setter methods to accommodate the following information: I need to save what type of animal I have (String variable) I want to be able to save a name for my fish and dog (String variable) I want to know which fish need salt water v. fresh water (String variable) I want to know if my dog has been trained (boolean variable) I want to know the size of my dog and fish (String variable) None of your classes should have constructors. Instead, create setter and getter methods to set the value of the instance variables that you create. Make sure you use common sense names for your variables!

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:40, StephiUnicorni
When running anti-virus software , what could be a reason where recipitent is not guaranteed that data being streamed will not get interrupted?
Answers: 1
image
Computers and Technology, 22.06.2019 11:00, paigesyring
How does a policy manual an organization? a. it boost productivity. b. it create awareness in employees about the organization’s values. c. it employees achieve targets. d. it safeguards the organization from liabilities.
Answers: 1
image
Computers and Technology, 23.06.2019 21:00, kkpsmith
Alcohol’s affects on the cornea and lens of the eye make it more difficult
Answers: 1
image
Computers and Technology, 24.06.2019 12:00, yagalneedshelp8338
Match the function to its purpose. fast worth 50pts.
Answers: 1
Do you know the correct answer?
For this exercise, you are going to create a part of an Animal hierarchy. Unlike some of our example...

Questions in other subjects:

Konu
Social Studies, 27.09.2021 14:00