Zoofast.fr rend la recherche de réponses rapide et facile. Posez vos questions et recevez des réponses précises et bien informées de la part de notre réseau de professionnels.

Part-II
(Full 50% of your total course grade)
In this last and final part of the course work you are required to change the definition of the Item in_Stock class to make it an abstract class and change the getItemCat0, getItemName0 and getItemDescription0 definitions to make them abstract methods.
You are then required to design and implement three classes which are derived from Item in Stock class to fully demonstrate the concept of inheritance and polymorphism.
Implementation of HP Laptop class in part II should have given you an idea of inheritance and polymorphism.
Three sub classes, one class against each category (Computers, Laptops and Accessories), should contain appropriate constructors, instance variables, setter and getters methods and overridden methods for getItemName0, getItemDescription0 and get Item details method.
You should be creative and come up with your own ideas of sub-classes.
Task 3.1. Draw a UML class diagram with all the classes and relationships.
Task 3.2. Write code in Java with all these classes implementation and a program called Polymorphism works with member method specific Item which takes one instance of Item in Stock class as a parameter. Perform functionality of adding items, selling items and changing item price and displaying items details against specific item instance. There should be a main 0) method which declares an array of objects containing instance of sub classes of Item in Stock class and then calls methods of each of the implemented classes.

PartII Full 50 Of Your Total Course Grade In This Last And Final Part Of The Course Work You Are Required To Change The Definition Of The Item InStock Class To class=