Question
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()
PLEASE 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
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