subject

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.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 21:00
Which set of steps will organize the data to only show foods with more than 100 calories and rank their sugar content from greatest to least?
Answers: 1
question
Computers and Technology, 23.06.2019 22:30
The output voltage of a power supply is assumed to be normally distributed. sixteen observations are taken at random on voltage are as follows: 10.35, 9.30, 10.00, 9.96, 11.65, 12.00, 11.25, 9.58, 11.54, 9.95, 10.28, 8.37, 10.44, 9.25, 9.38, and 10.85
Answers: 1
question
Computers and Technology, 24.06.2019 01:00
Mastercard managers are motivated to increase (1) the number of individuals who have and use a mastercard credit card, (2) the number of banks and other clents who issue mastercards to customers and/or employees, and (3) the number of locations that accept mastercard payments. discuss how mastercard could use its data warehouse to it expand each of these customer bases.
Answers: 3
question
Computers and Technology, 24.06.2019 04:30
1. web and mobile applications allow users to be actively engaged in an online activity. a true b false 2. some examples of business applications purposes are to collaborate, share files, meet virtually in real-time, and accept payments. a true b false 3. an education application would most likely do which of the following? a allow users to watch popular movies and tv shows b connect users with social and business contacts c confirm users' travel plans d teach users a new language 4. a uniform resource locator (url) is how the internet knows where to take users when an address is typed into a browser. a true b false 5. deon is required to provide the citation information for his sources. what type of information should he collect from his sources? a author name, title, date of publication, date of access, url b connections to background information c interesting facts and statistics d notes on important information
Answers: 1
You know the right answer?
The westfield carpet company has asked you to write an application that calculates the price of carp...
Questions
question
Mathematics, 06.10.2019 18:30
question
Biology, 06.10.2019 18:30
Questions on the website: 13722359