Calculates the price of carpeting for rectangular rooms.

Assignment Help JAVA Programming
Reference no: EM13941215

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 FeetInches objects as attributes: one for the length of the room and one for the width. The RoomDimension class should have a member function that returns the area of the room as a FeetInches object.

Next, you should create a RoomCarpet class that has a RoomDimension object as an attribute. It should also have an attribute for the cost of the carpet per square foot. The RoomCarpet class should have a member function that returns the total cost of the carpet.

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 carpeting. The application should display the total cost of the carpet.

Reference no: EM13941215

Questions Cloud

Difference between WACCs using market value and book value : ABC Trucking's balance sheet shows a total of noncallable $35 million long-term debt with a coupon rate of 5.10% and a yield to maturity of 5.20%. The CFO thinks the WACC should be based on market value weights, but the president thinks book weights ..
The workplace relations and other amendments : Task In what ways has the Fair Work Act 2009 been framed by its makers to be fairer than its predecessor, the Workplace Relations and Other Amendments (Work Choices) Act 2005.
Strategic nature of the hr function : 1. Human Resources Information Systems have contributed to the increasingly strategic nature of the HR function'. Discuss.
Find internal rate of return of project with an initial cost : Find internal rate of return of a project with an initial cost of $43,000, expected net cash inflows of $9,550 per year for 8 years, and a cost of capital of 9.60%.
Calculates the price of carpeting for rectangular rooms. : 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 carpeting. The application should display the total cost of the carpet.
What is the initial cash outlay and free cash flow : You are the head of finance department in XYZ Company. You are considering adding a new machine to your production facility. The new machine’s base price is $10,900.00, and it would cost another $1,970.00 to install it. What is the initial cash outla..
Research corporate governance failure : To demonstrate that you are capable of researching and analysing an instance where a corporation did not comply with corporate governance requirements. Specifically, you will be assessed on your ability to research and analyse the corporate govern..
Benefits of using a computerised accounting system : create and setup a company - record transactions and prepare a number of financial reports; and -
Role of hrm in executing the business strategy at unitel : In your report, you are required to: • Explain the role of HRM in executing the business strategy at Unitel. • Identify key issues relating to the introduction of the new corporate strategy by Unitel senior management.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd