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
How to resize an image in photoshop without losing quality.
castortr0y [4]

Answer:

Explanation:

Make sure resample is turned on

Turn on the chain link if you want the width and height to change together. If not, turn off the chain so that you can set your own width and height.

Choose your new size (you can choose to choose different measurement units by clicking on “inches”)

press ok

i hoped this helped!!!!!!!!

8 0
2 years ago
How to create a comparator generic type in java.
KIM [24]

Answer:

public class Person {

//fields

private int id;

private String name;

private Payment pay;

//constructor

public Person(String name, int id,

int startSal, int startBon){

this.name = name;

this.id = id;

this.pay = new Payment(startSal, startBon);

}

//method get name

public String getName(){

return name;

}

//method get id

public int getId(){

return id;

}

//method get start salary

public int getStartSalary(){

return pay.startSalary;

}

//method get start bonus

public int getStartBonus(){

return pay.startBonus;

}

//inner payment class

private class Payment{

int startSalary;

int startBonus;

public Payment(int sal, int bon){

this.startSalary = sal;

this.startBonus = bon;

8 0
2 years ago
What ideas should I write about for information writing
Lady bird [3.3K]
Well first of all who is your favorite celebrity?
Then find some research and look up interesting facts you did not know about.
5 0
3 years ago
Read 2 more answers
_______________ are distinguished from microcontrollers by their complexity and increased on-chip resources.A. Systems on a chip
weeeeeb [17]

Answer:

the correct option is (A)

Explanation:

According to the given scenario, the system on a chip is a chip that is different from the microcontrollers in terms of complexity and rise on the chip resources

The system on a chip is a circuit i.e. integrated most the computer things

hence, the correct option is (A).

Therefore the rest of the options are wrong

6 0
3 years ago
Read 2 more answers
Explain the term computer output​
fomenos

Answer:

Computer output simply put is any data generated by the computer or feedback gotten from the computer. Output can take many forms, but there are 2 major categories:

- Soft copy output e.g text viewed on a computer screen

- Hard copy output e.g printouts

Explanation:

6 0
2 years ago
Other questions:
  • HELP PLEASE
    7·2 answers
  • What is a flash player?
    9·2 answers
  • Consider a satellite orbiting the earth. Its position above the earth is specified in polar coordinates. Find a model-view matri
    12·1 answer
  • 6.5 Code Practice: Question 1 please help with code!!! Thank you
    12·1 answer
  • Write two cin statements to get input values into birthMonth and birthYear. Then write a statement to output the month, a dash,
    7·1 answer
  • A ________ database state is one in which all data integrity constraints are satisfied
    15·2 answers
  • Paula weeded 40% of her garden in 8 minutes. How many minutes will it take to weed all of her garden at this rate ?
    7·1 answer
  • Which can be used to create a poll on a web page? <br>CSS<br>HTML <br>JavaScript <br>Text editor​
    12·1 answer
  • In a relational database application, a(n) ________ key is used to link one table with another.
    12·1 answer
  • missy just hired a software development team to create an educational simulation app for a high school course. she has specific
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!