anthera Panthera (Links to an external site.) is a family of spotted big cats found in Africa that include the Tiger, Lion, and Jaguar species. Panthera has the following qualities: In addition to the PantheraGPS attributes and methods, panthera have the following, Panthera roar() roar() method prints the string “Rrrrrrrrroooooooaaaaarrrrr!” Panthera has a weight attribute. weight is an integer attribute in pounds. Panthera’s weight is a random integer value from 10 pounds to 600 pounds. Weight is different for each panthera object. Panthera has a speed() method that tells the pantheras current speed. speed is a non-zero positive floating-point random value that changes each time it is called. Speed ranges from 0 to 50 (miles per hour) For example, the first time speed is called it may be 5.35 miles per hour (walking). The next time, it may be 47.38 miles per hour (a high-speed run). It might be 0.0 miles per hour, indicating sleeping or standing still. The value is random. Panthera is a class that students need to revise and modify that is inherited from PantheraGPS. Panthera is inherited from PantheraGPS. Panthera can also have additional attributes and methods if you wish. PantheraGPS Base Class The PantheraGPS base responsibility is to simulate GPS tracking of the African big cats. The PantheraGPS base class has been given to you in the example code. Students do not need to write it. UML for PantheraGPS The PantheraGPS base class has a few items in it. Its UML node looks like this. Note: Your node will likely look simpler since I implemented so much in the base node. Hopefully, this helps! The PantheraGPS class should be used. But, the functionality in PantheraGPS does not need to be changed. You may need to edit it to get it to work in your project and package. All student code should go in new child classes that you will design, create and implement by inheriting from the PantheraGPS base class as needed. PantheraGPS Purpose and Methods The core purpose of PantheraGPS is to report the Panthera’s location in longitude and latitude. This is accomplished by two methods: longitude() returns the longitude location as a float latitude() returns the latitude location as a float toString() returns the name of the object as a JSON formatted string. JSON (Links to an external site.) is a standardized and very industry-centric way of specifying key-value information. name() returns the name of the panthera Note: The PantheraGPS example code is a good example for students to review to get a better understand of how a student might implement an OOP class. Tiger Tiger, Panthera tigris (Links to an external site.) Tigers are Panthera that have stripes. fur() returns the string “stripes” Lion Lion, Panthera leo (Links to an external site.) Lions are Panthera that have manes. fur() returns the string “mane” Jaguar Jaguar, Panthera onca (Links to an external site.) Jaguars are Panthera that have spots. fur() returns the string “spots” Jaguars are Panthera that sleep in trees. sleepsInTrees is a true/false boolean attribute User Interface/Menu The user interface implements the functionality specified in this assignment. The user interface/menu is a text-based menu, and should look like this: UML Requirements Create a UML class diagram for your classes Your UML class diagram should include class names, attributes, methods, and is-a relationship arrows to connect components. Here is an example UML class diagram node for PantheraGPS. Students should create a UML class diagram that includes all of their classes, attributes, and methods. Students should use lucidchart.com (Links to an external site.) to create a UML class diagram. Using lucidchart is the easiest way to create a UML class diagram for your classes. Friendly reminder: UML class diagrams are a design tool. So, students can start designing their solution using it. Once you have implemented some code, you may need to go back and update your UML diagram too.
anthera
Panthera (Links to an external site.) is a family of spotted big cats found in Africa that include the Tiger, Lion, and Jaguar species. Panthera has the following qualities:
In addition to the PantheraGPS attributes and methods, panthera have the following,
- Panthera roar()
- roar() method prints the string “Rrrrrrrrroooooooaaaaarrrrr!”
- Panthera has a weight attribute.
- weight is an integer attribute in pounds.
- Panthera’s weight is a random integer value from 10 pounds to 600 pounds. Weight is different for each panthera object.
- Panthera has a speed() method that tells the pantheras current speed.
- speed is a non-zero positive floating-point random value that changes each time it is called.
- Speed ranges from 0 to 50 (miles per hour)
- For example, the first time speed is called it may be 5.35 miles per hour (walking). The next time, it may be 47.38 miles per hour (a high-speed run). It might be 0.0 miles per hour, indicating sleeping or standing still. The value is random.
- Panthera is a class that students need to revise and modify that is inherited from PantheraGPS.
- Panthera is inherited from PantheraGPS.
- Panthera can also have additional attributes and methods if you wish.
PantheraGPS Base Class
The PantheraGPS base responsibility is to simulate GPS tracking of the African big cats.
- The PantheraGPS base class has been given to you in the example code. Students do not need to write it.
UML for PantheraGPS
- The PantheraGPS base class has a few items in it. Its UML node looks like this.
- Note: Your node will likely look simpler since I implemented so much in the base node. Hopefully, this helps!
- The PantheraGPS class should be used. But, the functionality in PantheraGPS does not need to be changed. You may need to edit it to get it to work in your project and package.
- All student code should go in new child classes that you will design, create and implement by inheriting from the PantheraGPS base class as needed.
PantheraGPS Purpose and Methods
The core purpose of PantheraGPS is to report the Panthera’s location in longitude and latitude. This is accomplished by two methods:
- longitude() returns the longitude location as a float
- latitude() returns the latitude location as a float
- toString() returns the name of the object as a JSON formatted string. JSON (Links to an external site.) is a standardized and very industry-centric way of specifying key-value information.
- name() returns the name of the panthera
Note: The PantheraGPS example code is a good example for students to review to get a better understand of how a student might implement an OOP class.
Tiger
- Tiger, Panthera tigris (Links to an external site.)
- Tigers are Panthera that have stripes.
- fur() returns the string “stripes”
Lion
- Lion, Panthera leo (Links to an external site.)
- Lions are Panthera that have manes.
- fur() returns the string “mane”
Jaguar
- Jaguar, Panthera onca (Links to an external site.)
- Jaguars are Panthera that have spots.
- fur() returns the string “spots”
- Jaguars are Panthera that sleep in trees.
- sleepsInTrees is a true/false boolean attribute
User Interface/Menu
The user interface implements the functionality specified in this assignment. The user interface/menu is a text-based menu, and should look like this:
UML Requirements
- Create a UML class diagram for your classes
- Your UML class diagram should include class names, attributes, methods, and is-a relationship arrows to connect components.
- Here is an example UML class diagram node for PantheraGPS. Students should create a UML class diagram that includes all of their classes, attributes, and methods.
- Students should use lucidchart.com (Links to an external site.) to create a UML class diagram. Using lucidchart is the easiest way to create a UML class diagram for your classes.
- Friendly reminder: UML class diagrams are a design tool. So, students can start designing their solution using it. Once you have implemented some code, you may need to go back and update your UML diagram too.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images