Question: in java Suppose: There is a store that sells: Items, each of which has the following attributes: - a name - a price - a

Suppose: There is a store that sells: Items, each of which has the following attributes: - a name - a price - a color The types of Items are: - Computer - with an attribute "speed" and "capacity", Computer objects are taxable. - Car - with an attribute "model". Car objects are taxable. - Flower - with an attribute "type". Flower objects are not taxable. A Taxable item, - Has a TAX_RATE =7% - Has a getTax 0 method. Define a project with your name to define these classes and the interface according to the following this UML. in Computer class: price +(0.02 speed )+ (0.03 capacity ); in Car class: price +500; in Flower class: price +20; - toString(0: This method returns information of the all attributes as String data type. In main method: - Create an object of three types: Computer, Car, and Flower - Print the information of these objects. - Print name of Computer object, speed, tax value Define a project with your name to define these classes and the interface according to the following this UML. - in Computer class: price +(0.02 *speed )+ (0.03 capacity ); - in Car class: price +500; in Flower class: price +20; - toString(0: This method returns information of the all attributes as String data type. In main method: - Create an object of three types: Computer, Car, and Flower - Print the information of these objects. - Print name of Computer object, speed, tax value and cost. - Increase the price of the car object by 3%. - Print new information after changing. - Print name of Car object, tax value and total price. - Print description of Flower object and cost
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
