Question: answer in java. Description A delivery company has two methods of delivery ground vehicles and air drones. The delivery area is covered by a grid

answer in java.
Description A delivery company has two methods of delivery ground vehicles and air drones. The delivery area is covered by a grid of roads stretching from north to south and from east to west every kilometer. A ground vehicle can move on the roads - along X axis or Y axis, whereas drone can fly directly to the destination. Both devices receive coordinates for delivery and relocate accordingly. The company keeps track of a total distance traveled to deliver all packages. Y 1,3 2,3 3,3 1,2 2,2 3,2 1,1 2,1 3,1 Introduce an interface to describe a delivery device with a method deliverTo(int x, int y). The method would return the distance traveled from the last position of the vehicle or drone to delivery destination. Create two independent classes for ground and air delivery that implement the interface. The program should first accept a delivery type (either 'ground' or 'air) and a sequence of delivery destinations as a pair of coordinates terminated with the word 'end': air 23 55 41 72 53 end
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
