Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need code for the makeup lab activity ( the last screen shoot). We have completed our study of the object-oriented design sections of the

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

i need code for the makeup lab activity ( the last screen shoot).

We have completed our study of the object-oriented design sections of the course (Encapsulation in chapter 8 Inheritance in chapter 9 and Polymorphism in chapter 10). We will begin to practice OOD by extending one of the Java classes to implement a Waypoint suitable for simple GPS applications and implementing our owrn interface for objects that can be navigated in a route. First, create an Interface called Travelable (see the Payable interface in chapter 10 for a referential example) that provides .Abstract method toDistance that takes another Travelable object as a parameter (i.e., a Waypoint would be one kind of Travelable object) and returns the distance from this Travelable to the one passed, as a type double Abstract method toTime that also takes another Travelable (like for instance, a Waypoint) as a parameter and returns the travel time from this Travelable to the one passed, as a type double, by using the speed of this Waypoint as the velocity to factor in the calculation. Of course these calculations are from the same Pythagorean Theorum we've already developed and coded in previous lab activities Abstract method getPoint that takes no parameters and returns the x and y Point2D.Double coordinates of this Travelable (as a Point2D.Double). Second, create a Class called Waypoint that extends the class Point2D.Double (from the package ava.awt.geom) that is already provided with the Java language (you should check the online Java AP n for more details) and implements the above Interface. It should also override the toString and equals methods. The result will provide us with access to x and y coordinates implemented as double-precisi will also add fields for the speed (as a double) that will be used to get from that location to the ne street (as a String) that will be traveled to get from that location to the next. access to x and y co

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

DB2 11 The Database For Big Data And Analytics

Authors: Cristian Molaro, Surekha Parekh, Terry Purcell, Julian Stuhler

1st Edition

1583473858, 978-1583473856

More Books

Students also viewed these Databases questions

Question

How are activity times estimated?

Answered: 1 week ago

Question

What is conservative approach ?

Answered: 1 week ago

Question

What are the basic financial decisions ?

Answered: 1 week ago