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)

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 10PE
icon
Related questions
Question

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)

 

 

wo, Grip
-
Item-in-stock
item_code: String
item-name: String
item-Description: string
-quantity-in-stock: imt
- item - price : double
+ item_m_Stock (String, int, double)
+ getItem Code (): String
+ getItem Name(); string
+ getItem Description(); String
+ get Quantity In Stock(): int
getItem Cat():string
+
+ add-Item ()
+ item_sell()
+ tax_om_item(): double
+ setItem price ()
+ getItemprice Without Tax():
double
+getItemprice with Tax():couble
+getItem-Details ()
Transcribed Image Text:wo, Grip - Item-in-stock item_code: String item-name: String item-Description: string -quantity-in-stock: imt - item - price : double + item_m_Stock (String, int, double) + getItem Code (): String + getItem Name(); string + getItem Description(); String + get Quantity In Stock(): int getItem Cat():string + + add-Item () + item_sell() + tax_om_item(): double + setItem price () + getItemprice Without Tax(): double +getItemprice with Tax():couble +getItem-Details ()
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT