The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 304 Weeks Ago, 5 Days Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
Hello, I need help solving this code. I will provide the attachments for the instructions.
Practical Final Exercise part 1
Your task is to write a program that will store GPS data based on location of the reading. To complete this task, we will use a custom data model and implement the Observer and Adapter design patterns. Refer to the included driver for questions on class and method names used.
Â
1.       Custom Data Model
a. Create a data interface that will define only getters for Location(String), Time(Calendar), Longitude(double), Latitude(double), Altitude(double), and Speed(double).
Location will be based on Zip Code which may have a dash, so use String for this.
(1 interface-GPSDataInterface)
b. Create a class that will store this data interface in a Map with the location as the key and a sorted set of the data interface as the value.Â
         * Constructor will take a Comparator parameter
         * get the most recent data object based on the location as a parameter-getCurrentGPS
         * add data object with the data interface as a parameter-add
(1 class-GPSDataManager)
c. For sorting, create a comparator class that implements the Comparator Interface and base the comparison on time. This will be used when creating the sorted set.
 (1 class-CalendarComparator)
2. Adapter Pattern
A data class from a customer will be used that contains Location(int), Time(Date), Longitude(double), Altitude(double), and Velocity(double) (note the different name,
data type, and missing elements).
a. Code a Data Class that will represent this data with appropriate constructor for setting the data and getters for the data.
(1 class-ExternalGPSData)
b. Code an adapter class that will translate the data from the external data object to your data interface. Return 0 for any missing data elements and convert data as
needed.
(1 class-ExternalGPSDataAdapter)
The following instructions above this sentence is supposed to be for the file FinalExercisePart1.java
Â
Â
Â
Â
Â
Â
Â
Â
The following instructions below this sentence is for the file FinalExercise.java
Practical Final Exercise Part 2
Your task is to write a program that will store GPS data based on location of the reading. To complete this task, we will use a custom data model and implement the Observer and Adapter design patterns. Refer to the included driver for questions on class and method names used.
Â
1.      Observer Pattern
a. Create custom listener interface for added data only with the method: gpsDataModified.Â
(1 interface-GPSDataListenerInterface)
b. Create a custom Event class to be used for the added. The added data event will push the added data object out with the method: getData.
(1 class-GPSDataEvent)
Incorporate this into the custom data manager and fire events for the add and remove methods.
Â
----------- He-----------llo----------- Si-----------r/M-----------ada-----------m -----------Tha-----------nk -----------you----------- fo-----------r y-----------our----------- in-----------ter-----------est----------- an-----------d b-----------uyi-----------ng -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------. P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll -----------be -----------qui-----------ckl-----------y