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.
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 2 images
- Develop a coding solution to perform the sorting per day (there are 7 days on which CSS perform sorting per day). For each of the days develop a class called CSSSorting, and for each day develop a method, something like: a. public static void CSSSortMonday(int[] values), b. public static void CSSSortTuesday(int[] values), c. public static void CSSSortWednesday(int[] values), d. public static void CSSSortThursday(int[] values) e. public static void CSSSortFriday(int[] values), f. public static void CSSSortSaturday(int[] values), g. public static void CSSSortSunday(int[] values) In each of these methods implement how you think the sorting should take place based on the each of the offered solutions/libraries.arrow_forwardProblem: To write the JUnit test cases for our methods, you need to create two test methods: testLeapYear: This method should test if the isLeapYear method returns true for a given leap year. For example, you can choose the year 2020 and verify if the method returns true for it. If it does, the test will pass. If it doesn't, the test will fail. testNotLeapYear: This method should test if the isLeapYear method returns false for a given non-leap year. For example, you can choose the year 1900 and verify if the method returns false for it. If it does, the test will pass. If it doesn't, the test will fail. --------------------------------------------------------------------------------------------------------------------------------------------------------- import static org.junit.jupiter.api.Assertions.assertTrue; import org.junit.jupiter.api.Test; public class LeapYearTest { // Test case to check if a year is a leap year @Test public void testLeapYear() { //create…arrow_forwardA getPaycheck method that implements the same method in the Employee class. Itcalculates the paycheck amount (m_hours × m_hourlyWage) and returns the studentworker’s paycheck as a string in the following format (Note that the three fields areseparated by a hyphen, represented by the minus character. Do NOT add spaces beforeor after each hyphen. There are no commas in the number.):arrow_forward
- java please dont take other website'answer. rthis is actually practice question ANIMALCLASS Create an Animal class. Each animal has a name, an x and y integer coordinate. The Animal class should have at minimum the following methodsbelowbut you may want to add more if necessary: Also note, everyanimal will need to have to have “z”passed to it so that it knows how big the map is. •A constructor that starts the animal at 0,0 with a name of "Unknown Animal"and only accepts a single int value (int mapSize). •A parameter constructor that allows the programmerto input all 4pieces of information.(x,y, name, mapSize)oCheck the parameters for valid input based on the constraints. Ifany of the input valuesis invalid, adjust it any way you deem necessary in order to make it valid. •getX()and getY() •getName() •toString(). o This should print out the name and coordinates of the animal. •touching(Animal x) This method should determine if the animal is on the same spot as a secondanimal(x). It…arrow_forwardDon't send AI generated answer or plagiarised answer. If I see these things I'll give you multiple downvotes and will report immediately.arrow_forwardAdd a toString method to your Account class. For the purposes of this assignment, please use the toString display the following: This account contains $x. You have earned $y in the last month. where x is the account balance (please don't format the decimals) and y is the monthly interest earned, obtained from the getMonthlyInterest method. Compile and test in a driver by creating and printing an Account object. Add an equals method to your Account class. Two Account objects are equal if their balance and annualInterestRates are equal. Compile and test in your driver by creating 2 Account objects to see if they are equal.arrow_forward
- 2. A pentagonal number is defined as n(3n-1)/2 for n = 1, 2, ..., etc.. Therefore, the first few numbers are 1, 5, 12, 22, ... . Write a method with the following header that returns a pentagonal number: %3D public static int getPentagonalNumber(int n) For example, getPentagonalNumber(1) returns 1 and getPentagonalNumber(2) returns 5. Write a test program that uses this method to display the first 100 pentagonal numbers with 10 numbers on each line. Numbers are separated by exactly one space.arrow_forwardIn python and include doctring: First, write a class named Movie that has four data members: title, genre, director, and year. It should have: an init method that takes as arguments the title, genre, director, and year (in that order) and assigns them to the data members. The year is an integer and the others are strings. get methods for each of the data members (get_title, get_genre, get_director, and get_year). Next write a class named StreamingService that has two data members: name and catalog. the catalog is a dictionary of Movies, with the titles as the keys and the Movie objects as the corresponding values (you can assume there aren't any Movies with the same title). The StreamingService class should have: an init method that takes the name as an argument, and assigns it to the name data member. The catalog data member should be initialized to an empty dictionary. get methods for each of the data members (get_name and get_catalog). a method named add_movie that takes a Movie…arrow_forwardPythonarrow_forward
- Currently, there are two draw rectangle methods in the DoodleController class. Since two different turtles need to draw a rectangle, create a draw rectangle method in the DoodleTurtle class that will take the width and height of the rectangle as parameters and draw a rectangle of the specified size. The size will be the number of steps by the turtle. With the new method introduced, the calls to drawRectangleWithLittleTurtle and drawRectangleWithBigTurtle can be replaced with a call to the turtle’s drawRectangle method passing in the desired size of the rectangle. Refactor the DoodleController accordingly. Note: When you are done with the refactoring the drawRectangleWithLittleTurtle and drawRectangleWithBigTurtle method in the DoodleController need to be deleted. After this refactoring, do not move on until you verify the program works as it did before.arrow_forwardDefine the following methods: computeBaseArea() has one double parameter as a cylinder's radius. The method returns the area of the cylinder's base as a double. The area of the base is calculated by: ���� = � ∗ ������2 computeSurfaceArea() has two double parameters as a cylinder's radius and height. The method returns the cylinder's surface area as a double, and uses the computeBaseArea() method to calculate the cylinder's base area. The surface area is calculated by: ������� ���� = (2 ∗ ���� ����) + (2 ∗ � ∗ ������ ∗ ℎ���ℎ�) Click here for example Note: Use Math.PI for �. 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 public class CylinderCalculations { /* Your code goes here */ publicstaticvoidmain(String[] args) { Scannerscan=newScanner(System.in); doublecylinderRadius; doublecylinderHeight; cylinderRadius=scan.nextDouble(); cylinderHeight=scan.nextDouble(); System.out.println("Cylinder radius: "+cylinderRadius);…arrow_forwardThe method convertVolume() has an integer parameter. Define a second convertVolume() method that has two integer parameters. The first parameter is the number of gallons and the second parameter is the number of pints. The method should return the total number of pints. Ex: If the input is 9 2, then the output is: 9 gallons yields 72 pints. 9 gallons and 2 pints yields 74 pints. Note: The total number of pints can be found using (gallons * 8) + pints. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 import java.util.Scanner; public class VolumeMethods { publicstaticintconvertVolume(intgallons) { returngallons*8; } /* Your code goes here */ publicstaticvoidmain(String[] args) { Scannerscnr=newScanner(System.in); intgallonsUsed; intpintsUsed; inttotalPints1; inttotalPints2; gallonsUsed=scnr.nextInt(); pintsUsed=scnr.nextInt(); totalPints1=convertVolume(gallonsUsed);arrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY