Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA : Design a class called Cabinet. Each Cabinet has 3 dimensions (height, width, and depth, measured in inches ) store these as integers. Each

JAVA : Design a class called Cabinet.

Each Cabinet has 3 dimensions (height, width, and depth, measured in inches) store these as integers.

Each Cabinet contains 3 items store these as String objects.

The Cabinet has these abilities (behaviors)

>Instantiate with 6 parameters

>Instantiate with 0 parameters

>Make a copy of itself

>Compare itself to another Cabinet object

>Determine the floor space needed for the Cabinet (measured in square feet) - for example a 6 foot wide by 2 foot deep cabinet requires 12 square feet of floor space) floor space is NOT an attribute of the class

>Determine the wall space needed for the Cabinet (measured in square feet) - for example a 6 foot wide by 7 foot tall cabinet requires 42 square feet of wall space) wall space is NOT an attribute of the class

>Set all attributes

>Get all attributes

>Display its current state - display the current dimensions in feet (for example 25 inches is 2 feet 1 inch), in addition display the floor space needed and the wall space needed

Create a CabinetDriver that will

Read in the data for 2 cabinets from the cabinetData.txt file.

Display both cabinets as described above in last bullet above

Make a copy of the 2nd cabinet and double each of the dimensions of the cabinet

The CabinetDriver will have at least these 3 methods

>main()

>getCabinet()

>displayCabinet()

image text in transcribedPLEASE MAKE UML WHEN FINISHED

____________________________________________________________________________________________________

cabitnetData.txt

62 48 12 hats coats shoes 70 36 18 tools extension cords paint

______________________________________________________________________________________________________

womensSnowboardingHalfPipe.txt

Chloe Kim United States 93.75 41.50 98.25 Liu Jiayu China 85.50 89.75 49.00 Arielle Gold 10.50 74.75 85.75

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 And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 2 Lncs 13427

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124251, 978-3031124259

More Books

Students also viewed these Databases questions