The question: Re-draw UML class diagram with this new class “HP_Laptop”. Relationships should also be represented. The new class: you are required to design and implement a class called HP_Laptop with instance variables specific to this type of items, a constructor with parameters which initialises class data members and invokes the Item_in_Stock constructor when it is invoked using inheritance concept in java and initialises data members of Item_in_stock class as well. This class should be designed and implemented in a way that it overrides getItemCategory() that returns the category of the item, getItemName() that returns HP_Laptop and getItemDescription() that returns “HP_I5_11G_8GB_1TB” ”. The Class should also override the get_item_details() method to display the complete details of an item. Old digram: (see the photo)
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
The question: Re-draw UML class diagram with this new class “HP_Laptop”. Relationships should also be represented.
The new class: you are required to design and implement a class called HP_Laptop with instance variables specific to this type of items, a constructor with parameters which initialises class data members and invokes the Item_in_Stock constructor when it is invoked using inheritance concept in java and initialises data members of Item_in_stock class as well. This class should be designed and implemented in a way that it overrides getItemCategory() that returns the category of the item, getItemName() that returns HP_Laptop and getItemDescription() that returns “HP_I5_11G_8GB_1TB” ”. The Class should also override the get_item_details() method to display the complete details of an item.
Old digram: (see the photo)
Step by step
Solved in 3 steps with 1 images