subject

In this problem we are going to use ArrayLists and classes to design a road trip. You have three classes: GeoLocation. java which represents a geo location. A RoadTrip. java class which represents a road trip (or an ordered list of places), and a RoadTripTester. java class which brings them all together. In GeoLocation. java: Add a private instance variable called name which is a String. This represents the name of the location. Modify the Geolocation class constructor so that it is now of the format public GeoLocation(String name, double theLatitude, double theLongitude) Add a getter method for name called getName(). Update the toString so that it returns a String of the format San Francisco (37.7833, -122.4167) Now, you’ll also need to create a RoadTrip class. The RoadTrip stores an ordered list of locations, so you’ll need to have an ArrayList. You’ll also need to support these methods. // Create a GeoLocation and add it to the road trip public void addStop(String name, double latitude, double longitude) // Get the total number of stops in the trip public int getNumberOfStops() // Get the total miles of the trip public double getTripLength() // Return a formatted toString of the trip public String toString() We’ve given you a tester program to help get you started. The output from that program would be: 1. San Francisco (37.7833, -122.4167) 2. Los Angeles (34.052235, -118.243683) 3. Las Vegas (36.114647, -115.172813) Stops: 3 Total Miles: 572.9708850442705

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:30
Communication is the exchange of information. true false
Answers: 2
question
Computers and Technology, 22.06.2019 13:30
In which phase does software coding and testing happen in the spiral model? the spiral model does not have a separate testing phase. both, software coding and testing occurs during the phase.
Answers: 3
question
Computers and Technology, 22.06.2019 23:50
You need to design a circuit that implements the functions in the following table: s0 s1 function0 0 a + 10 1 a – b1 0 a + b1 1 a – 1s0 and s1 are 1-bit control inputs to select the function of the circuit. inputs a and b are 4-bitnumbers in 2s complement form. the output is also a 4-bit number in 2s complement form.you are allowed to use only one ttl 7483 4-bit adder to implement all the functions. but anynumber of other components (except the adder) can be used.hint: design a combinational logic circuit to modify the input b and the “carry input” of theadder depending on the control inputs s0 and s1.important: lab grade will depend on the working of the circuit & will be checked of by your labinstructor.1. is the output valid for the following input combinations: a. s0 = 0, s1 = 0, a = 7, b = 3? b. s0 = 0, s1 = 1, a = 7, b = 3? c. s0 = 1, s1 = 0, a = -4, b = -5? d. s0 = 1, s1 = 1, a = -8, b = 6? 2. what is the range of inputs (for both a and b) that will produce the valid output for all the functions?
Answers: 3
question
Computers and Technology, 23.06.2019 05:00
Acompany is inviting design for its new corporate logo from its users. this is an example of ? a. crowdfunding b. crowdvoting c. crowdsourced design d. crowdtracking
Answers: 3
You know the right answer?
In this problem we are going to use ArrayLists and classes to design a road trip. You have three cla...
Questions
question
World Languages, 14.01.2020 07:31
question
Mathematics, 14.01.2020 07:31
question
Mathematics, 14.01.2020 07:31
Questions on the website: 13722360