Question: Task 1: Creating a class with default constructor Create a class called DeliveryTruckGpsSensor that has the following attributes: currentLatitude, currentLongitude, destinationLatitude and destinationLongitude.
Task 1: Creating a class with default constructor Create a class called " DeliveryTruckGpsSensor " that has the following attributes: currentLatitude, currentLongitude, destinationLatitude and destinationLongitude. a) Create a new class file named "DeliveryTruckGpsSensor." b) Create a default constructor. c) Create another class named "Test" containing the main() method d) Inside the main() method create at least two objects e) Assign values for the data members in the new created object using the dot operator. f) Print out the values for the data members for each object created
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
