Question: In Java This exercise is designed to be done as individuals, but with consultation from your peers. This week I want you to create a
In Java
This exercise is designed to be done as individuals, but with consultation from your peers. This week I want you to create a new subclass of your Restaurant class from earlier called Food Truck. For credit implement the following features into your new subclass. 1. A private String called current Location that holds the current location of the food truck. 2. A private String called nextLocation that holds the next location the food truck will be at. 3. A private String called nextTime that holds the time the food truck will be at its next location. 4. A public method called schedule() that takes two String arguments and sets the nextLocation and nextTime fields. 5. A public method called arrive ) that sets the current Location to the value of the nextLocation and then sets both the nextLocation and nextTime to the empty string. 6. Override the display() method from the Restaurant class to display all of the normal information for a restaurant, but also all of the location information for a food truck
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
