Answered step by step
Verified Expert Solution
Link Copied!

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
image text in transcribed
image text in transcribed
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

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 Development For Dummies

Authors: Allen G. Taylor

1st Edition

978-0764507526

More Books

Students also viewed these Databases questions