1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
jonny [76]
3 years ago
10

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 hierachry.
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)
Make sure you use common sense names for your variables!
public class Animal
{
}
public class Fish extends Pet public class Pet extends Animal public class Dog extends Pet
{ { {
} } }
Computers and Technology
1 answer:
kati45 [8]3 years ago
5 0

Answer:

vehicle super class 9.1.4

Explanation:

So you need to create a super class containig all the animals use the class above for referance

You might be interested in
Which environment variable affects the number of past commands used in the current shell session?
scoray [572]
HISTSIZE is the environment variable affects the number of past commands used in the current shell session.
4 0
3 years ago
At what layer of the osi model does a network switch normally operate?.
Iteru [2.4K]

Answer:

A network switch is a multiport network bridge that uses MAC addresses to forward data at the data link layer (layer 2) of the OSI model.

I hope this helps you :)

5 0
2 years ago
Using digital modulation techniques such as ASK, FSK, or PSK results in a passband that appears at a higher frequency than the b
Aleksandr-060686 [28]

Answer:

The answer is "True".

Explanation:

Digital modulation is also known as a method, which uses common synchronization names and various types of signals to manipulate a carrier wave.

  • The analog method measures the radio signals in amplitude and frequency.
  • It provides more general usage in the firmware, that's why the answer to this question is true.
6 0
3 years ago
Which binary number is the greatest?<br> 11011<br> 11001<br> 11100<br> 11010<br> 11000
Masteriza [31]

Answer:

the third one

Explanation:

the rest is below 28 apart from the third one which is 28 and is the most

3 0
3 years ago
Cloud vendors that are hosting hardware, operating system, database, and other software, which clients can then use to build the
iren2701 [21]

Answer:

a. Software as a Service.

Explanation:

These Cloud vendors are said to be providing Software as a Service. This is because regardless of that the underlying specs are in regards to hardware, operating systems, database, etc. The vendor is selling a subscription to their cloud software which bundles all of these services together. Therefore, what they are ultimately providing is a Software that the individual can use as a service, and enjoy all of the included benefits/capabilities.

8 0
3 years ago
Other questions:
  • All spreadsheet formula should start with
    12·1 answer
  • 1. Potential incidents represent threats that have yet to happen. Why is the identification of the threat important to maintaini
    6·1 answer
  • What is meant by concentration of a solution​
    6·2 answers
  • Which of these is not the correct method for moving text in a document in Word 2016?
    14·2 answers
  • Cual es la definición de grouded?​
    7·1 answer
  • In c++ 11, the ________ tells the compiler to determine the variable's data type from the initialization value.
    6·1 answer
  • Which of the following are ways that
    9·1 answer
  • Is a dot matrix printer an impact or non-impact printer
    12·2 answers
  • Describe psychographic differences among the past five generations of Americans that you learned about in this course. What type
    7·1 answer
  • In Python write a program that reads a list of integers into a list as long as the integers are greater than zero, then outputs
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!