Question: Question 2 [20 points) Write a client class (application) in which you: a) Create an array of type Vehicle of size 10 and fill it

 Question 2 [20 points) Write a client class (application) in which

Question 2 [20 points) Write a client class (application) in which you: a) Create an array of type Vehicle of size 10 and fill it from the user with either cars or trucks according to the user's choice. Then copy all Vehicle objects from the array to an arraylist of type Vehicle. [5 pts] b) Display all Truck objects in the arrayList with loadCapacity larger than 10.000 kilos. [5 pts] e) Copy the Car objects and the Vehicle Objects to two different ArrayList objects of types Car and Truck respectively. 15 pts d) Check if the first Car object and the last Car object in the arrayList of Cars are equal or not and display the appropriate message. [5 pts]

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!