Follow these steps: • Modify the existing Animal.java file for this task. ● Create a class called 'Cheetah' that: O Inherits from the Animal class. Makes use of at least one static field which needs to have a static setter and getter. Contains a constructor. O Contains a toString() method. Has an array as one of its fields. O O O Create an application class. Within the main method, create a Cheetah object and print out (to the screen) the details that describe this object. • Compile, save and run your file.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

tas 13.2

1
2
3
4
5
6
7
8
9
10
11
12
13
16
17
20
21
24
25
28
29
52
53
36
57
58
59
Animal.java
+
+
+
+
public class Animal {
+
+
}
private int numTeeth = 0;
private boolean spots = false;
private int weight = 0;
public Animal (int numTeeth, boolean spots, int weight) {
this.setNum Teeth (numTeeth);
this.setSpots(spots);
this.setWeight (weight);
}
public int getNum Teeth() { return numTeeth; }
public void setNum Teeth (int numTeeth) { this.numTeeth = numTeeth; }
public boolean getSpots() { return spots; }
public void setSpots (boolean spots) { this.spots = spots; }
public int getWeight() { return weight; }
public void setWeight(int weight) { this.weight = weight; }
Transcribed Image Text:1 2 3 4 5 6 7 8 9 10 11 12 13 16 17 20 21 24 25 28 29 52 53 36 57 58 59 Animal.java + + + + public class Animal { + + } private int numTeeth = 0; private boolean spots = false; private int weight = 0; public Animal (int numTeeth, boolean spots, int weight) { this.setNum Teeth (numTeeth); this.setSpots(spots); this.setWeight (weight); } public int getNum Teeth() { return numTeeth; } public void setNum Teeth (int numTeeth) { this.numTeeth = numTeeth; } public boolean getSpots() { return spots; } public void setSpots (boolean spots) { this.spots = spots; } public int getWeight() { return weight; } public void setWeight(int weight) { this.weight = weight; }
Follow these steps:
● Modify the existing Animal.java file for this task.
Create a class called 'Cheetah' that:
O Inherits from the Animal class.
Makes use of at least one static field which needs to have a static
setter and getter.
Contains a constructor.
O Contains a toString() method.
Has an array as one of its fields.
O
O
O
Create an application class. Within the main method, create a Cheetah
object and print out (to the screen) the details that describe this object.
Compile, save and run your file.
Transcribed Image Text:Follow these steps: ● Modify the existing Animal.java file for this task. Create a class called 'Cheetah' that: O Inherits from the Animal class. Makes use of at least one static field which needs to have a static setter and getter. Contains a constructor. O Contains a toString() method. Has an array as one of its fields. O O O Create an application class. Within the main method, create a Cheetah object and print out (to the screen) the details that describe this object. Compile, save and run your file.
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY