Java - Classes and Objects
Given these classes, how can you make Car use GPS to show location?
class GPS {
void showLocation() { System.out.println("Location: 123 Main St"); }
}
class Car {
GPS gps = new GPS();
void displayLocation() {
// What code goes here?
}
}