[Solved] Practical Final Exercise part 1 and 2 Solution

$25

File Name: Practical_Final_Exercise_part_1_and_2_Solution.zip
File Size: 433.32 KB

SKU: [Solved] Practical Final Exercise part 1 and 2 Solution Category: Tag:
5/5 - (1 vote)

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
  2. 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)

  1. 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)

  1. 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)

  1. 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).

  1. Code a Data Class that will represent this data with appropriate constructor for setting the data and getters for the data.

(1 class-ExternalGPSData)

  1. 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
  2. Create custom listener interface for added data only with the method: gpsDataModified.

(1 interface-GPSDataListenerInterface)

  1. 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.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] Practical Final Exercise part 1 and 2 Solution
$25