Chat with us, powered by LiveChat Java programming | WriteDemy

Question Description

Instructions:


Step 1

Modify the Room class by adding the following methods:

Method 1: hasAdequateCooling

The purpose of this method is to check the room’s air conditioner to see if it has a high enough cooling capacity to adequately cool the room.

For example, a Moderately Shaded room that is 500 square feet requires an air conditioner with a capacity of 10,000 BTUs per Hour. If that room has an air conditioner with a cooling capacity of 8,000 BTUs per Hour, then that room does not have adequate cooling.

The method should not accept any arguments, and should return true if the room has adequate cooling, and false if the room does not.

Method 2: toString

Use this method to display all of the relevant information of the Room class (including it’s AirConditioner)

Step 2

Minimize the risk of security holes in your program (Note: review the “Security Issues with Aggregate Classes” section in Chapter 8).

Step 4

Modify the demonstration program from Project 2 to have it process the Rooms2.txt file (IMPORTANT: This is a different file from Project 2). This file contains information about rooms, and the air conditioning unit contained in those rooms. The text file contains information in the following order:

    • Name (example: Master Bedroom)
    • Room Length (in feet)
    • Room Width (in feet)
    • Amount of shade that the room gets (can be Little, Moderate, or Abundant)
    • Air Conditioner Manufacturer
    • Air Conditioner Type (can be Window Mounted or Portable)
    • Air Conditioner Cooling Capacity (measured in BTUs per Hour)

The program should create Room and AirConditioner objects (using the constructor that accepts arguments) for each of the rooms contained in the file.

The code should be able to handle a file of any size.

The demo program should store the Room objects in a structure that can automatically adjust to accommodate the number of objects being stored in it. (Hint: Review Chapter 7).

Step 5

Sometimes as you progress on a project in a work environment, your requirements can change and you must remove or alter existing code (even if it is fully functional). To simulate this, the previous information from Project 2 regarding the number of rooms with each type of shade should NOT be displayed. You can remove that part of the code that was left in Project 2.

Step 6

The demo program should output the information like the sample output provided below (this includes the formatting of the numbers).

Sample output

Room Name: Master Bathroom

Room Area (in square feet): 155.0

Amount of Shade: Abundant

BTUs Per Hour needed: 4,950

Air Conditioner Manufacturer: GE

Air Conditioner Type: Portable

Air Conditioner Cooling Capacity (BTUs Per Hour): 8,000

This room is adequately cooled.

Room Name: Master Bedroom

Room Area (in square feet): 260.0

Amount of Shade: Moderate

BTUs Per Hour needed: 10,000

Air Conditioner Manufacturer: Frigidaire

Air Conditioner Type: Portable

Air Conditioner Cooling Capacity (BTUs Per Hour): 8,000

This room is not adequately cooled.

Room Name: Living Room

Room Area (in square feet): 750.0

Amount of Shade: Little

BTUs Per Hour needed: 20,125

Air Conditioner Manufacturer: Whirlpool

Air Conditioner Type: Window Mounted

Air Conditioner Cooling Capacity (BTUs Per Hour): 18,000

This room is not adequately cooled.

Room Name: Kitchen

Room Area (in square feet): 240.0

Amount of Shade: Moderate

BTUs Per Hour needed: 5,500

Air Conditioner Manufacturer: GE

Air Conditioner Type: Window Mounted

Air Conditioner Cooling Capacity (BTUs Per Hour): 6,000

This room is adequately cooled.

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

About Writedemy

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Place Order” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Hire a tutor today CLICK HERE to make your first order