Question: How do you acomplish this assignment? Assignment GPS including jUnit Tests CSIS-1410 Learning Objectives: . Practice Composition Review declaring classes based on UML class diagrams

 How do you acomplish this assignment? Assignment GPS including jUnit TestsCSIS-1410 Learning Objectives: . Practice Composition Review declaring classes based on UML

How do you acomplish this assignment?

Assignment GPS including jUnit Tests CSIS-1410 Learning Objectives: . Practice Composition Review declaring classes based on UML class diagrams Use jUnit tests to test and troubleshoot your code Description Create a new Java project called "1410 Gps". It includes a package named gps Inside the package gps implement the classes Gps and GpsPosition as described below Include doc comments for each of the public methods, for the constructors, and for the classes themselves Use the provided jUnit tests to test and troubleshoot both classes. Feel free to add a main method at the end of the classes Gps and GpsPosition to demonstrate the use of the . class members. For grading purposes the main methods will be ignored Class GpsPosition: Class GpsPosition represents a position based on a given longitude, latitude, and elevation (in meters) Declare class GpsPosition based on the UML class diagram below. Notice that there are no setters. The class is immutable. This means the state of a GpsPosition object can no longer be changed once it has been created Do not add or remove any public methods or constructors (except for main) There should also be NO print statements in class GpsPosition ion - latitude double longitude: double evation: double double) +GpsPosition ( latitude: double, longitude: double, elevation +getLatitude (): double +getLongitude():double + ge evation () : double toString 0: String The getters expose the field values as usual Constructor: The constructor should implement input validation for If the constructor receives an invalid argument, an IllegalArgumentException should be thrown Like this: throw new IllegalArgumentException ("Invalid latitude and/or longitude") Method toString: The method toString should return a String that includes the latitude followed by a comma, a space, the longitude, a space, and then the elevation in parenthesislike this except with the numeric values Latitude, Longitude (elevation) Both latitude and longitude should display 6 digits after the decimal point while the elevation should display only one digit after the decimal point. Example: 38.573645, -109.546389 (1227.1) Use the jUnit tests to test and troubleshoot GpsPosition before moving on to the next class

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!