Computers and Technology, 23.10.2019 19:00, igtguith
The westfield carpet company has asked you to write an application that calculates the price of carpeting for rectangular rooms. to calculate the price, you multiply the area of the floor (width times length) by the price per square foot of carpet. for example, the area of floor that is 12 feet long and 10 feet wide is 120 square feet. to cover that floor with carpet that costs $8 per square foot would cost $960. (12x10x8=960.)
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 return the area of the room. (the area of the room is the rooms length multiplied by the rooms width.)
nest, you should create a roomcarpet class that has a roomdimension object as a field. it should also have a field for the cost of the carpet per square foot. the roomcarpet class should have a method that returns the total cost of the carpet.
figure 9-21 is a uml diagram that shows possible class designs and the relationships among the classes. 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 to the desired carpeting. the application should display the total cost of the carpet.
Answers: 3
Computers and Technology, 22.06.2019 18:30, cascyrio2002
What is outfitting a workplace with video in a technology
Answers: 2
Computers and Technology, 22.06.2019 19:20, mahaleyrenee1195
How might the success of your campaign be affected if you haven’t carefully completed all field data or if you accidentally insert the wrong merge field in the document?
Answers: 2
Computers and Technology, 23.06.2019 20:30, summerhumphries3
What are some settings you can control when formatting columns?
Answers: 1
Computers and Technology, 24.06.2019 03:30, live4dramaoy0yf9
Explain the importance of html in web page designing in 20 sentences..
Answers: 1
The westfield carpet company has asked you to write an application that calculates the price of carp...
Physics, 26.08.2019 05:00
Mathematics, 26.08.2019 05:00
Mathematics, 26.08.2019 05:00
Mathematics, 26.08.2019 05:00
Mathematics, 26.08.2019 05:00
Chemistry, 26.08.2019 05:00
History, 26.08.2019 05:00