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 does human error relate to security risks
oksian1 [2.3K]

Answer:

The error could let people through who really shouldn't be through

8 0
3 years ago
Asking yourself questions can help you think of what to _____, in order to get answers.
Olenka [21]
Ask your self questions can help you think of what to measure, in order to get answers.
8 0
4 years ago
Draw a flow chart except the principle, time and date from the user. and display the simple interest and amount as output.​
timama [110]

Answer:

See attachment for flowchart

Explanation:

The explanation is as follows

1. Start

2. Get input for principal, time and rate

3. Calculate Interest using Interest = Principal * Rate * Time/100

4. Print Interest

5. Stop

7 0
3 years ago
Why are some constraints automatically applied by the software
balandron [24]

Answer:

Some constraint are automatically applied by the software while others must be entered manually because we have some shapes that just come with automatic constraint.

In instance can be given with square, this have all ot iits four sides equal with two set of parallel sides.

Explanation:

see Answer.

3 0
4 years ago
Write a statement that calls a function named IncreaseItemQty, passing the variable addStock. Assign mugInfo with the value retu
PolarNik [594]

Answer:

Explanation:

#include <stdio.h>

#include <string.h>

typedef struct ProductInfo_struct {

char itemName[30];

int itemQty;

} ProductInfo;

ProductInfo IncreaseItemQty (ProductInfo productToStock, int increaseValue) {

productToStock.itemQty = productToStock.itemQty + increaseValue;

return productToStock;

}

int main(void) {

ProductInfo mugInfo;

int addStock;

addStock = 10;

scanf("%s", mugInfo.itemName);

scanf("%d", &mugInfo.itemQty);

**** /* Your solution goes here */ ****

printf("Name: %s, stock: %d\n", mugInfo.itemName, mugInfo.itemQty);

return 0;

}

8 0
3 years ago
Other questions:
  • 1. Create a view named customer_addresses that shows the shipping and billing addresses for each customer.
    15·1 answer
  • The time between requests to a web server is exponentially distributed with mean 0.5 seconds. NOTE: This is a multi-part questio
    8·2 answers
  • SubVIs...
    15·1 answer
  • You are replacing the toner cartridge for an old laser printer. You are concerned that several internal components are reaching
    8·1 answer
  • What are personal skills? A manner of individual style How a person manages and expresses oneself One's ability to excel at spor
    13·2 answers
  • On a hard disk each track is divided into invisible wedge-shaped sections called _______
    15·1 answer
  • Which query will give the following result when it it applied on table 1????!!!!!
    10·1 answer
  • In Java please.
    13·1 answer
  • Calculate the data rate capacity for a 2400 baud signal where there are M=8 levels per symbol. a. 2400 bps b. 4800 bps c. 7200 b
    12·1 answer
  • When you type information into a document property field on the cover page, Word does not automatically add this information to
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!