The manager of a hotel wants to calculate


The manager of a hotel wants to calculate the cost of carpeting ten (10) rooms in the hotel. All the rooms are rectangular in shape. Each line of data consists of the length and breadth of the room (in meters). Assume that the cost per square meter of the carpet for each room is $45.00. for example, the data line: 3.0 4.5

Means that if a room is 3.0 meters by 4.5 meters, and the cost of the carpet for that room is $607.50.

Write a program (Java) to do the following:

1. Create a method COST that calculates the cost of carpeting a room and returns the cost.

2. Read in the measurements for each room, determine the cost of carpeting that room. The cost for the ten (10) rooms MUST be stored in an array called COST. i.e.
* The cost for the 1st room should be stored in the 1st location of the array
* The cost of the 2nd room should be stored in the 2nd location of the array etc

3. Use the array COST to find the total cost of carpeting all the rooms.

4. Output the total cost of carpeting all the rooms. 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: The manager of a hotel wants to calculate
Reference No:- TGS089777

Expected delivery within 24 Hours