Question: 1. Interfaces & ArrayLists: a. Write an Interface that mimics the following description. Interface Car int noWheels = 4; void move(int speed ) int acceleration

1. Interfaces & ArrayLists:

a. Write an Interface that mimics the following description. Interface

Car int noWheels = 4;

void move(int speed )

int acceleration (int speed)

b. Create a class called SportsCar that implements the Car interface (For the methods, put in a simple printout to say what class the method is in).

c. Create 3 instances of SportsCar.

d. Insert the instances of SportsCar into an ArrayList of type Car.

e. Now activate the move() method, but from the ArrayList.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!