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
Electronic ledger that tracks mathematical data
lesya692 [45]
<span>These kinds of systems are usually installed in the cockpits of aircrafts. It is an electronic computer-controlled display system. It is made up of several kinds of systems constituting the whole.  The purpose of such a kind of display is to increase and widen the field of vision and decrease any kind of visual disturbances from the surroundings. The Flight Data Display another constituent of the system constantly updates the pilots with the status of and data related to the flight. This also includes information about the aircraft itself and navigation information too.</span>
7 0
3 years ago
Which drugs are known to distort the perception of reality and thought processes
andrey2020 [161]
<span>The correct answer here is Hallucinogen.

Technically all drugs one way or another distort the perception of reality and thought processes but hallucinogens are especially potent in that regard. Hallucinogens are those agents that can cause, among other things, hallucinations and changes in consciousness, emotions and thoughts. LSD is maybe the most known representative of the hallucinogens. </span>
7 0
3 years ago
(50 points) Write a programthat adds the first and last elements of an integer array and stored as the first element of the outp
Elena L [17]

Answer:

A is the input array

B = [] ; %B is initially an empty array

for i = 1:length(A)/2  %iterates over A until the midpoint of A

   B(i) = A(i) + A(end + 1 - i);  %This adds the numbers from the first half and %second half of A, and stores in B

end

disp(B)

3 0
3 years ago
Jim has excellent oral and written communication skills. He enjoys public speaking and wants a job in which he will interact wit
fredd [130]
The best job for Jim would be public relations specialist.
7 0
3 years ago
Read 2 more answers
Which of the following does not accurately describe asynchronous communication?
worty [1.4K]

Answer:

A. While new media is dependent on whether users function in real-time or delayed mode, feedback is not as timely when communication is asynchronous.

Explanation:

Asynchronous communication can be defined as a data communication technique in which exchange of data between a sender and a recipient isn't in real time.

There's usually a time lag, meaning it doesn't require the recipient to respond immediately.

For example, responding to an email or text several hours later.

6 0
3 years ago
Read 2 more answers
Other questions:
  • Your Economics teacher has asked you to create a chart showing how supply and demand affects the price of gasoline. Which applic
    13·2 answers
  • COMPUTER SCIENCE:PIXELS
    5·1 answer
  • Arrays are described as immutable because they are two dimensional. are arranged sequentially. can be reordered. cannot be chang
    11·1 answer
  • Drag each tile to the correct box.
    9·1 answer
  • Match the job roles with their appropriate qualifications. business analyst multimedia artist network and computer systems admin
    9·2 answers
  • 9.4 Code Practice: Your task is to determine whether each item in the array above is divisible
    14·1 answer
  • What function is used to return the results in column D?
    11·1 answer
  • What are 3 similarities and 3 differences between live theatre and film/videos -Drama Class
    13·1 answer
  • To use the replace feature we can simply just press Carl+h,Carl+c,Carl+r
    13·1 answer
  • The users, groups, and roles that have access to a server are called ______________________________.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!