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
What subnet mask can be used to segment the 172.16.0.0 network to allow for a minimum of 6 subnets while maximizing the number o
marishachu [46]

The subnet mask can be utilized to segment the 172.16.0.0 network to qualify for a minimum of 6 subnets while maximizing the numeral of broadcasters per subnet is 255.255.224.0

<h3>What do subnet masks mean?</h3>
  • A subnet mask is a 32-bit numeral formed by setting keeper bits to all 0s and developing network times to all 1s.
  • In this way, the subnet mask divides the IP speech into the network and host addresses.
  • A subnet mask is used to separate an IP address into two pieces. One element defines the host (computer), and the different part identifies the network to which it belongs.
  • To better comprehend how IP lessons and subnet masks work, look at an IP speech and see how it's managed.

To learn more about  subnet mask, refer to:

brainly.com/question/3234986

#SPJ4

5 0
1 year ago
What is the meaning of Ram?​
masya89 [10]

Answer:

Random-Access Memory

Explanation:

used as a short-term memory for computers to place its data for easy access

5 0
1 year ago
Questions: What memory modules are needed if the customer wants 3 GB of RAM? What capacities and how many modules of each capaci
zhannawk [14.2K]

Answer:

You could use three 1 GB modules.

4 0
2 years ago
In the MARS Marketing Management Simulation, the results of your marketing mix decisions:
azamat
C- are only occasionally affected by the decisions made by other teams
explanation
idk
3 0
3 years ago
Which role will grant a delegate read-only access to a particular workspace within a user’s Outlook mailbox?
DIA [1.3K]

Answer: i’m thinking it’s reviewer

Explanation:

4 0
2 years ago
Read 2 more answers
Other questions:
  • Which is true regarding networks?
    7·2 answers
  • "the file that specifies how netbeans builds and deploys the application when you run the application is called the ____________
    8·1 answer
  • Which of these are examples of a Single Sign-On (SSO) service?
    5·1 answer
  • How do you make your graphics ADA accessible in BlueGriffon?
    12·2 answers
  • What is the cell reference for the cell located in the second column and fifth row of a worksheet?
    9·1 answer
  • Write a program that asks the user for two file names. The first file will be opened for input and the second file will be opene
    8·1 answer
  • Eric would like to have a color textbook that makes it look as if the character in an image is speaking. Which object should he
    14·1 answer
  • Users at UC need to be able to quickly create a Resource record from the Project record's Chatter feed How should the App Builde
    10·1 answer
  • Mô tả những lợi ích của việc sử dụng đa xử lý không đồng nhất trong một hệ thống di động
    8·1 answer
  • Anyone know why my desktop won’t turn on, I upgraded my ram and my monitor won’t turn on
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!