Question: 1 . Linked - List a . What is a Linked - List? Explain with diagrams how data is stored in Linked - List? b

1. Linked-List
a. What is a Linked-List? Explain with diagrams how data is stored in Linked-List?
b. How and when is it better than an Array?
c. Show the UML diagram and write Java Implementation code forthe following scenario
using Linked-List (you should maintain the object-oriented programming design):
A Garage can have multiple cars for servicing. Some cars are already serviced, and
some cars are waiting for service. When a Car comes to the garage for service, it is
added to the list. After servicing, the client may take delivery of the car. Then the car
will be removed from the list.
You have to implement this using a Linked-List class built by you. You can NOT use
any of Javas built-in Collections/structures. The Linked-List will contain the Car
objects. The Linked-list class will have its usual method to add, remove, and findCar
objects.
You should have a Driver class to create objects and show the use of different
functions and output.
2. Abstract Class and Interfaces
a. Write the difference between Abstract classes and Interfaces.
b. Show an example usage of two of Javas built-in Interfaces in codes.
c. We have seen in class lectures how polymorphism/dynamic binding is used with
Inheritance. Similar to that idea, show and explain with example how Interface can
be used to implement Polymorphism.

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 Finance Questions!