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
musickatia [10]
3 years ago
14

Write a class for a Cat that is a subclass of Pet. In addition to a name and owner, a cat will have a breed and will say "meow"

when it speaks. Additionally, a Cat is able to purr (print out "Purring..." to the console).
Computers and Technology
1 answer:
Nonamiya [84]3 years ago
4 0

Answer:

The Java class is given below with appropriate tags for better understanding

Explanation:

public class Cat extends Pet{

  private String breed;

 public Cat(String name, String owner, String breed){

      /* implementation not shown */

      super(name, owner);

      this.breed = breed;

  }

  public String getBreed() {

      return breed;

  }

  public void setBreed(String breed) {

      this.breed = breed;

  }

  public String speak(){ /* implementation not shown */  

      return "Purring…";

  }

}

You might be interested in
If an author is creating a reference list and wants the second and succeeding lines indented for a reference, they should select
Elodia [21]

Answer: Hanging indent

Explanation: Hanging indent is the technique through which a paragraph's second and all other lines are indented, that is the creation of space divided by the margin is placed to show the other statements as major than the first line. There are several ways of making a line intended but the fastest technique to do it is by using a ruler and creating a space.

7 0
3 years ago
Read 2 more answers
According to the government, employees have a right to understand the risks associated with the materials they work with.
Alex
True. They require a MSDS (Material Safety Data Sheet) for each chemical that a business receives.
3 0
3 years ago
One of the most studied computational problems is the ordering of a collection of values. Ordering is important because many pro
andreyandreev [35.5K]

I think the order should be 2-1-3-4, but the description of step 1 is confusing. In selection sort, you iterate from the point of the marker down through the entire list and find the smallest value, and swap that with the value at the marker. Then you advance the marker and repeat the process on the remainder of the list.

7 0
3 years ago
Aubrey is on a Windows machine. She wants to back up her Halloween pictures on an external hard drive. Which of the following ta
Leya [2.2K]

Answer:

no clu3 lol

Explanation:

I'm stupid hahaha

8 0
3 years ago
You can place an insertion point by clicking in the field or by pressing ____.
Slav-nsk [51]
You can place an insertion point by clicking in the field or by clicking F2 keyboard shortcut. Insertion point is usually characterized by a blinking vertical line that allows you to insert a next character that you wanted.
4 0
3 years ago
Other questions:
  • Does anyone know how to cancel a Pandora Free Trial Subscription? I need to cancel it by tomorrow. Please help!
    12·1 answer
  • if your instructors teaching style is very different from your learning preference your best choice is to one work on your weake
    10·1 answer
  • A computer has 9850 processes and 172 of them where suspended while 276 were terminated.,explain why some of the processes where
    15·1 answer
  • If you were to create a new app for a smartphone or tablet that does not already exist, what would you create?
    10·1 answer
  • PLEASE HELP!!!!
    6·2 answers
  • What allows you to heal<br><br><br><br> undesirable portions of an image​
    9·1 answer
  • C program To print odd numbers from 15 to 1 ​
    8·1 answer
  • What does advance mean​
    6·1 answer
  • Explain the basic operations of a computer system​
    6·1 answer
  • which one of the following would not normally be found in an organization's information security policy?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!