Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective 1. Begin to program in Java. 2. To farniliarize you with using Classes and Objects in Java. 3. Mapping a UML elass diagram (Google

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Objective 1. Begin to program in Java. 2. To farniliarize you with using Classes and Objects in Java. 3. Mapping a UML elass diagram (Google it!) into a Java application program. Code You may discuss high-level ideas of how to solve these problems with your classmates, bur do not discuss actual source code (except for boiler-plate code such as reading user input, etc.). All source code should be yours and yours alone. Title: "Creatimg A Java Application From A UML Class Diagram" Description: In this assignment you will develop a Java application that calculates the human-perceived equivalent temperature when the actual air temperature is combined with the relative humidity. That is to say, how hot it feels in terms of felt air temperature. The human body nomally cools itself by perspiration, or sweating, which evaporates and earries heat away from the body. However, when the relative humidity is high, the evaporation rate is reduced and thus heat is removed more slowly from the body casing it to retain more beat than it would in dry air. Measurements have been taken based on subjective deseriptions of how hot subjects feel for a given temperature and humidity, allowing an index to be made which relates one temperature and humidity combination to another at a higher temperature albeit in drier air. The expression below, combined with a number of constant values will allow you to calculate the heat index for a specified ambient air temperature and relative humidity. The Heat Index Expression: The expression that you need to calculate the heat index is shown below along with the values of the constants that appear in this expression. HI=c1+c2T+c3R+c4TR+c5T2+c6R2+c7T2R+c8TR2+c9T2R2whereHI=heatindex(indegreesFahrenheit)T=ambientairtemperature(indegreesFahrenheit)R=relativehurnidity(expressedasapercentage)c1=42.379c1=2.04901523c1=10.14333127c4=0.22475541c1=6.83783103c5=5.481717102c5=1.22874105c1=8.5282104c9=1.99106 The UML Class Diagram: In software engineering, a class diagram in the Unified Modeling Language (UML) is a type of static structure diagram that describes the structure of a system by showing the system's classes, their attributes, operations (or methods), and the relationships among objects. 4*visibility - means private, + means public Input Specification: Two input values are required for the beat index expression, the current temperature and the current humidity. Input data should be entered from the keyboard after appropriately prompting the user. The current temperature is an integer and expressed in degrees. Fahrenheit (e.g., 95). The relative humidity is a real number and expressed as a percentage (e.g., 55), Output Specification: All output should appear on the console. Your output should look similar to that shown in the example below. Note that the value of the heat index calculated by the expression is a real number. Example Program Execution: \begin{tabular}{l} -hurnidity: double \\ -heatindex: double \\ t-HeatindexCalculator ( \\ currentTemp:int, \\ currenthumidity: double ) \\ tcalculateHeatindex ( \\ currentTemp:int, \\ currenthumiglity; double ); double \\ forintHeatindex( \\ currentTempint, \\ currentHumidity: double, \\ calculatedHeatindex: double ): void \\ \hline \end{tabular} "*visibility - means private, + means public Input Specification: Two input values are required for the heat index expression, the current temperature and the current humidity. Input data should be entered from the keyboard after appropriately prompting the user. The current temperature is an integer and expressed in degrees Fahrenheit (e.g., 95). The relative humidity is a real number and expressed as a pereentage (e.g.,55). Output Specification: All output should appear on the console. Your output should look similar to that shown in the example below. Note that the value of the heat index calculated by the expression is a real number. Example Program Execution: Additional Instructions: First create a project called HeatIndexCaleulatorTester and two java source files: HeatIndexCalculator.java and put ealculator variables there along with related functions. HeatIndexCalculatorTester.java and put your main() method there. In main() method, ereate three HeatIndexCalculator objects and then call appropriate functions. Deliverables: Your java files + a screenshot of your output screen + a paragraph (use the comments box) about your program. Subanit HeatIadexCaleulator-java and HeatIndexCalculatorTester.java over Caras as a separate attachment (i.e. do not ereate an archive zip of the files). Notes: Your code should include a header comment (Javadoc) with the following information: Your name Date Course number, section number Description of the code You WIL.I. lose credit if this information is not found in the beginning of each of your source file. You should also include inline comments to describe different parts of your program

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions

Question

Define and contrast MAD, MSE, and MAPE.

Answered: 1 week ago