Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program Requirements The problem is to find the heat loss (in watts) of insulation in an attic and compares the chosen insulation materials in a

image text in transcribedimage text in transcribedimage text in transcribed

Program Requirements The problem is to find the heat loss (in watts) of insulation in an attic and compares the chosen insulation materials in a table, showing the best heat loss value. Write a main method that prompts the user to enter the area of the attic in square feet (integer), number of insulation materials to compare (integer), and then each insulation material name depending on the number of materials entered (string). And, displays a table to show the results (that shows the Material Name, Material's thermal Conductivity, its R-value, and its Heat Loss). The area should not be less than 1,000 square feet and not more than 3,000 square feet. If the user enters invalid input for Area, then the program should continue to prompt the user until a valid area is entered. The number of materials entered should be from 3 to 7. If the user enters invalid input, then the program should continue to prompt the user until a valid number is entered. If the material name entered doesn't match one of the names in the Thermal Conductivity of Insulation Materials Table, then the program should continue to prompt the user until a valid name is entered. The thickness of the materials should be a variable set to 0.305m. For this program, lists/arrays shouldn't be used. Thermal Conductivity of Insulation Materials Wood Fiber 0.038 Cellulose 0.035 Straw 0.08 Icynene Foam - 0.039 Phenolic Foam 0.020 Polyisocyanurate 0.023 Aerogel 0.014 The program should have at least the following methods listed: Write a method that returns the thermal conductivity based on material name. public static double getMaterialConductivity(String name) Hint: Use data from table on page 1. Also, a switch statement can be used. If the name doesn't match any case, then return 1. Write a method that converts square feet to square meters using the following header: public static double convertFeetToSqMeter(int sqfeet) The formula: m2=ft2/(3.281)2 Write a method that returns the thermal resistance of the material using the following header: public static double thermalResistance(double L, double K ) The formula to find the thermal resistance: R=KL Where R is thermal resistance, L is thickness of material, and K is thermal conductivity of the insulation material. Write a method that returns the heat loss of the material in attic using the following header: public static int getHeatLoss(int area, int temperature, double resistance) The formula to find the heat loss: Q=RAT Where Q is heat loss (in watts), A is area of attic (in square meters), T is design temperature change (in C ), and R is thermal resistance. Temperature change is the design temperature change (between the inside and outside temperature), which is 25 degrees C. Temperature change should be a variable. For the result of the heat loss, round the heat loss value to the nearest whole number. Write an optional method, findMinHeatLoss, that compares heat loss values and returns the lowest Q value of the materials entered. A higher Q value means that more heat is lost, which will cost more. A lower Q value means less heat is lost, costing less. This check can either be a method that is called in the main method or a just a check in the main. The output of the program should display: For insulation material thickness of 0.305m : Material Name Conductivity R-value Heat Loss The best Heat Loss is x watts. Note: x should be the best heat loss value after comparing all the materials' heat loss (the materials within the output table). Program Specification - Write a class named ComputeHeatLoss that contains a main method. - There should be one .java file (i.e ComputeHeatLoss.java) - Use a package named edu.ttc.egr281 Program Submission Create a ZIP file that contains only .java files (no .class files). The zip file must use the naming convention: A4.zip Ex: SmithA4.zip Submit the ZIP file via D2L. Grading Style: Comments and Indentation Functionality: Complies, Runs, and Produces correct output The program will be evaluated using test cases developed by the instructor. Late assignments cannot be accepted

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions

Question

1. Identify and control your anxieties

Answered: 1 week ago