Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this part of the course work, you are required to design and implement a class called HP_Laptop with instance variables specific to this type

In this part of the course work, 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.

Task 2.1. Re-draw UML class diagram which was drawn in part 1 of the course work with this new class HP_Laptop. Relationships should also be represented.

Task 2.2. Implement a class called Item_check with a main method to test HP_Laptop class by defining object of the class and invoking methods.

Testing is an integral part of development. Write suitable test cases in the given format below for your classes.

Test Case

Purpose

Expected result

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems For Advanced Applications Dasfaa 2023 International Workshops Bdms 2023 Bdqm 2023 Gdma 2023 Bundlers 2023 Tianjin China April 17 20 2023 Proceedings Lncs 13922

Authors: Amr El Abbadi ,Gillian Dobbie ,Zhiyong Feng ,Lu Chen ,Xiaohui Tao ,Yingxia Shao ,Hongzhi Yin

1st Edition

3031354141, 978-3031354144

More Books

Students also viewed these Databases questions

Question

State the allowable forms of organization a CPA firm may assume.

Answered: 1 week ago