These two stories help us understand.
“Zoo” is about a collection of creatures who are visiting Earth to be apart of a zoo exhibit, however the creatures believe they are visiting a zoo of humans, not being in a exhibit of one. “The Ruum” is about a guy named Jim who has been ordered to go back and get the H-9 Ruum they left behind on the third planet. All is well until Jim encounters the H-9. Jim is matches the search specifications and is now on the list to become apart of the Ruum’s collection of creatures. “Zoo” by Edward D.Hoch and “The Ruum” by Arthur Porges are both science fiction stories that tell about futuristic or past objects or the way people act. They are similar and different when it comes to setting and surprise endings.
In both stories, setting plays an important role. In “The Rumm” the setting is in the past “and on Earth, it was the age of reptiles”. The story takes place on the “third planet”. “Zoo” however takes place in the future and at a zoo, and several different planets, with modern technology but futuristic discoveries.Both stories had a surprise ending, in “The Ruum” the surprise ending was when Jim lost ten pounds during the chase while running from the ruum, which put him out of the ruum’s weight criteria. On the other hand in “Zoo” was when the creatures thought that the people of Earth were part of an exhibit at the zoo. “Zoo” by Edward D.
Hoch and “The Ruum” by Arthur Porges are both science fictional stories that tell about the future or past and help us to understand wonders of the way things worked or behaved in either time periods.
Task 1 Please download the starter code from this Google Drive link. Ensure that there are two files: Point.java and PointTester.java. You will be implementing several methods within Point.java, and you will be testing those methods in PointTester.java. For Task 1, you ONLY need to submit Point.java.
Within PointTester.java are a few test cases for the Point class. As you are implementing Point.java, you should test thoroughly to make sure that your program is functioning as expected. We will not be collecting PointTester.java.
Within Point.java, there are 3 private member variables given to you:
private int x – the x-coordinate of the Point (as an integer)
private int y – the y-coordinate of the Point (as an integer)
private String type – the type of the Point (e.g. “Home”, “School”, etc.)
private String stateName – Represents the name of a US state
private int avgCases – Represents the average number of cases per day (in thousands)
Take note of their declared types. Do NOT change any of their types.
We also provide you several getter methods. Please read and understand them.
For the rest of Point.java, you will need to implement the 4 following methods. DO NOT MODIFY ANY METHOD DECLARATIONS:
public Point(int x, int y, String type)
Within the constructor, you simply need to assign the 3 parameters to their respective member variables (e.g. assign the parameter x to the member variable x, and so on). You can assume that type will be a valid String.
public int manhattanDistance(Point p)
This method should return the Manhattan distance from this point to the parameter Point p. You can assume that p will be a valid Point.
In a 2D plane with p1 at (x1, y1) and p2 at (x2, y2), the calculation for the Manhattan distance is . For example, if this was at (-3, -2), and p was at (4, 7), then the Manhattan distance would be . See the image below for a visual example:
The Manhattan distance is .
IMPORTANT: For manhattanDistance (and for any other methods that require an absolute value calculation), you are NOT allowed to use any packages or classes such as Math to perform the absolute value calculation. We want you to be clever to figure out how to calculate the absolute value without using any other packages or classes!
public boolean checkSameType(Point p)
This method should return true if this point has the same type as the parameter Point p. Otherwise, this method should return false. For example, if this has the type “Store”, and p also has the type “Store”, then this method should return true. You can assume that p will be a valid Point.
public boolean checkIfNearby(Point p, int distance)
This method should return true if the Manhattan distance between this point and the parameter Point p is less than or equal to the parameter distance. Otherwise, the method should return false. For example, if this was at (-3, -2), p was at (4, 7), and distance was 15, then this method should return false. You can assume that p will be a valid Point, and that distance will be a non-negative integer.
Task 2 For Task 2, you will be creating a Class to represent the current condition of a State with respect to the COVID situation in that area.
Please download the starter code from this Google Drive link. Ensure that there are two files: CovidCondition.java and CovidConditionTester.java. You will be implementing several methods within CovidCondition.java, and you will be testing those methods in CovidConditionTester.java. Similar to the previous task, for Task 2, you ONLY need to submit CovidCondition.java.
Within CovidConditionTester.java are a few test cases for the CovidCondition class. As you are implementing CovidCondition.java, you should test thoroughly to make sure that your program is functioning as expected. We will not be collecting CovidConditionTester.java.
Within CovidCondition.java, there are 2 private member variables given to you:
Take note of their declared types. Do NOT change any of their types.
For the rest of CovidCondition.java, you will need to implement the 4 following methods. DO NOT MODIFY ANY METHOD DECLARATIONS:
public CovidCondition(String stateName, int avgCases)
Within the constructor, you simply need to assign the 2 parameters to their respective member variables (e.g. assign the parameter stateName to the member variable stateName, and so on). NOTE: avgCases does NOT have to be strictly non-negative. Keep that in mind when testing.
public String getDetails()
This method should return a single String that reads “[stateName] currently has a daily average of [avgCases] thousand cases”. Make sure to replace [stateName] and [avgCases] with the respective values of the member variables. For example, if stateName was California, and avgCases was 20, then the String should read: “California currently has a daily average of 20 thousand cases”.
public void updateAvgCases(int numOfCases)
This method should update the value of avgCases to the value of parameter numOfCases. HINT: To properly test this method, you should make use of getDetails() – this implies that you should ensure that getDetails() is implemented correctly!
public String checkTier()
This method should return the string:
“Yellow” – if the value of avgCases is strictly less than 10.
“Orange” – if the value of avgCases is between 10 and 50 (inclusive).
“Red” – if the value of avgCases is between 51 and 100 (inclusive).
“Purple” – if the value of avgCases is strictly greater than 100.
For example, if avgCases was 23, then checkTier() should return “Orange”
Essay Writing at Online Custom Essay
Review This Service