首页 > > 详细

讲解 Java Lab 1讲解 Java编程

Java Lab 1

Due: Wednesday August 30, 11:00 AM EDT

In this lab, you will get your computer ready and tested for future labs in this course by

• getting your Java and IntelliJ installed and running,

• familiarizing yourself with IntelliJ IDE projects, and

• understanding how to perform. test-driven development using Junit library.

Here are the installation steps (as outlined in the Powerpoint Notes).

1. Install Java 17 SDK from Oracle:

https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html

Note that if you need a different version of Java for some other course, you can have more than one version installed.

2. Make sure everything is installed correctly by opening up a Terminal window (Mac) or Command (cmd) window (Windows) and typing:

javac -version

java -version

3. Install IntelliJ fromhttps://www.jetbrains.com/student/. Make sure you get the Ultimate version.

After that, create a project and add the needed code:

1. Create a Project. Start up IntelliJ. Use Create New Project or File->New->Project, depending on how

IntelliJ opens. You should use a dedicated folder for this course's projects and use a new folder within it for each new project. Name this project Lab1.

2. Download the file RelativeHumidity.java from Canvas and copy it into the src folder of the project.

3. The main( ) method is partially coded. You need to code the three formulas: first, Fahrenheit to Celsius conversion:

Next, the saturation value for a temperature C in Celsius. Use this formula twice – once for the current temperature and once for the dew point:

Finally, the relative humidity given the two saturation values using the formula:

where sD is the dewpoint saturation and sT is the temperature saturation. Run your program with today's temperature and dew point. (http://bmcnoldy.rsmas.miami.edu/Humidity.html)

Deliverable: Add your name and Andrew id to the comment at the top of the file. Upload the .java file to Canvas.





联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!