Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone help me with this Java problem please thank you. Please don't be intimidated by how long it seems, it just has lots of

Can someone help me with this Java problem please thank you. Please don't be intimidated by how long it seems, it just has lots of methods need to be created, no complicated math. Thank you so much!

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

CrimeSimulator https://cs1331.gitlab.io/fall2018/hw4/CrimeSimulator.java

You're only allowed to import java.util.Random

Please make sure the code will compile and give correct output. Thanks!

Solution Description Complete the Al, RandomAl, RogueAl, DoctorCS, and Coordinates classes following the instructions below. Note: When creating the specified getter and setter methods for each class, use the naming convention taught in class, e.g. getFirewallProtection0 and setSecretldentity0. For all of the classes you write,Don't add any unneeded fields Don't forget to answer the Analysis questions Coordinates.java This class should be concrete. Fields This class has the following private fields, and associated getter methods: final double latitude. This constant double represents the latitude in a set of coordinates final double longitude. This constant double represents the longitude in a set of coordinates Constructor This class has the following constructor public Coordinates (double latitude, double longitude). This constructor takes in two doubles that should be assigned to latitude and longitude respectively. Methods This class has the following public methods: boolean equals (Object other). This returns a boolean representing whether another object is logically equivalent to this instance of Coordinates. For two Coordinates instances to be equivalent, their latitude and longitude must be equal. Implement this method as you have been taught in lecture. String tostring).This returns the String representation of this Coordinate object's stored information in the following format: "latitude: (latitude), longitude: (longitude)" For example, a possible output of the toString0 method could look like this: "latitude: 12.34, longitude 56.78'" Getters for both latitude and longitude Solution Description Complete the Al, RandomAl, RogueAl, DoctorCS, and Coordinates classes following the instructions below. Note: When creating the specified getter and setter methods for each class, use the naming convention taught in class, e.g. getFirewallProtection0 and setSecretldentity0. For all of the classes you write,Don't add any unneeded fields Don't forget to answer the Analysis questions Coordinates.java This class should be concrete. Fields This class has the following private fields, and associated getter methods: final double latitude. This constant double represents the latitude in a set of coordinates final double longitude. This constant double represents the longitude in a set of coordinates Constructor This class has the following constructor public Coordinates (double latitude, double longitude). This constructor takes in two doubles that should be assigned to latitude and longitude respectively. Methods This class has the following public methods: boolean equals (Object other). This returns a boolean representing whether another object is logically equivalent to this instance of Coordinates. For two Coordinates instances to be equivalent, their latitude and longitude must be equal. Implement this method as you have been taught in lecture. String tostring).This returns the String representation of this Coordinate object's stored information in the following format: "latitude: (latitude), longitude: (longitude)" For example, a possible output of the toString0 method could look like this: "latitude: 12.34, longitude 56.78'" Getters for both latitude and longitude

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Why does society distinguish between criminal and civil law?

Answered: 1 week ago

Question

PES Consider the incomplete C code below: #include #include

Answered: 1 week ago