Question: Please write below java programs and submit the programs with proper naming conventions. Hardwood Calculator The great floor hardwood company has asked you to write
Please write below java programs and submit the programs with proper naming conventions.
Hardwood Calculator
The great floor hardwood company has asked you to write an application that calculates the price of hardwood for rectangular rooms. To calculate the price, you multiply the area of the floor width times length by the price per square foot of hardwood. For example, the area of floor that is feet long and feet wide is square feet. To cover that floor with hardwood that costs $ per square foot would cost $
First, you should create a class named RoomDimension that has two fields: one for the length of the room and one for the width. The RoomDimension class should have a method that returns the area of the room. The area of the room is the room's length multiplied by the room's width. Next you should create a RoomHardwood class that has a RoomDimension object as a field. It should also have a field for the cost of the hardwood per square foot. The RoomHardwood class should have a method that returns the total cost of the hardwood. Once you have written these classes, use them in an application that asks the user to enter the dimensions of a room and the price per square foot of the desired hardwood. The application should display the total cost of the hardwood.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
