Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in java Suppose: There is a store that sells: Items, each of which has the following attributes: - a name - a price - a
in java
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
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