Question
1)E-TechComputer store in Oman sells different electronics products such as Computers, Laptops and accessories. The store Management requires an automated software to keep track of
1)E-TechComputer store in Oman sells different electronics products such as Computers, Laptops and accessories.
The store Management requires an automated software to keep track of items in stock and prices. You as a software designer and developer are asked to develop a system for the store.
The first task you should carry out is to design and code a class related to stocked Items. You can name this class as Item_in_Stock.
The class should consist of the following:
A data member Item_code to store an item code e.g, C15, a data member to store item name, a data member to store item description, a data member to store quantity of items in stock and a data member item_price to store price of an item. You must use the appropriate data types and access specifier for each data member.
Class should have a constructor that initialises class objects with specified item_code, quantity and price of items.
Getter and setters methods for all the data members including getItemCat() method which returns Unknown Item Category, getItemName() method which returns the "Unknown Item Name" and getItemDescription() which returns "Unknown Item Description. These methods will be overridden in later tasks of the assignment to set and display information related to specific items.
An add_Item method to add items in stock with a check that item stock does not exceed 25. An appropriate message should be displayed if inserted item exceeds the limit.
An item_Sell member method to sell items, method should ask for quantity of selling item and then reduces the stock level accordingly.
A tax_on_Item method gives tax on items (Tax is fixed at 5%)
A method to set item price without tax and get method to get item price both with and without tax
A method named get_Item_Details() that provides Item code, Item Category, Item name, Item description, quantity in stock, and price with and without tax.
Task 1.Implementation of the class using Java language.
Write a program called Stocked_Item with main () method to test the Item_in_Stock class.
2) 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 1)Implement a class called Item_check with a main method to test HP_Laptop class by defining object of the class and invoking methods.
OUTPUT:
Refer to output in part I, item category, item name and item description should be according to the Items.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started