Question: 1 . Linked - List a . What is a Linked - List? Explain with diagrams how data is stored in Linked - List? b
LinkedList
a What is a LinkedList? Explain with diagrams how data is stored in LinkedList?
b How and when is it better than an Array?
c Show the UML diagram and write Java Implementation code forthe following scenario
using LinkedList you should maintain the objectoriented 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 LinkedList class built by you. You can NOT use
any of Javas builtin Collectionsstructures The LinkedList will contain the Car
objects. The Linkedlist 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.
Abstract Class and Interfaces
a Write the difference between Abstract classes and Interfaces.
b Show an example usage of two of Javas builtin Interfaces in codes.
c We have seen in class lectures how polymorphismdynamic 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
