Trouvez des réponses rapides et précises à toutes vos questions sur Laurentvidal.fr, la meilleure plateforme de Q&R. Découvrez des solutions fiables à vos questions grâce à un vaste réseau d'experts sur notre plateforme de questions-réponses complète. Obtenez des solutions rapides et fiables à vos questions grâce à une communauté d'experts expérimentés sur notre plateforme.

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=

Sagot :

Nous espérons que ces informations ont été utiles. Revenez quand vous voulez pour obtenir plus de réponses à vos questions. Merci d'utiliser notre service. Nous sommes toujours là pour fournir des réponses précises et à jour à toutes vos questions. Merci de faire confiance à Laurentvidal.fr. Revenez nous voir pour obtenir de nouvelles réponses des experts.