|
1 | | -# java-code-along |
2 | | - |
3 | | -This is the official repository for the Getting Started with Java for Data code along. |
4 | | - |
5 | | -## Setup |
6 | | - |
7 | | -Clone this repository on your local machine and open it using IntelliJ, which can be downloaded from the following link: https://www.jetbrains.com/idea/download/other.html. |
8 | | - |
9 | | -If you don't have `git` installed, you can install it following the guide here: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git. Follow the instructions based on the platform (Windows/Mac/Linux). |
10 | | - |
11 | | -After you've opened the repository in IntelliJ, you can open a terminal window and create a new branch using the following command: `git checkout -b <your-name>`. |
| 1 | +# weather-data |
| 2 | + - This is a small application to analyse weather data from a CSV file. |
12 | 3 |
|
13 | | -If you have any issues and you would like me to take a look at the code, feel free to push your changes to the branch using: |
| 4 | +## Tech |
| 5 | + - JDK 25, JUnit Jupiter |
14 | 6 |
|
| 7 | +## Build |
| 8 | +```shell |
| 9 | +./mvnw -B package --file pom.xml |
15 | 10 | ``` |
16 | | -git add . |
17 | | -git commit -m "message" |
18 | | -git push -u origin <your-name> |
| 11 | +## Test Only |
| 12 | +```shell |
| 13 | +./mvnw test |
| 14 | +``` |
| 15 | +## Run Application |
| 16 | +```shell |
| 17 | +java -cp target/weather-data-1.0-SNAPSHOT.jar org.example.Main |
| 18 | +``` |
| 19 | +## Console Out |
| 20 | +```shell |
| 21 | +Welcome to the Weather Data Analyzer! |
| 22 | +###### Exercise 1 ###### |
| 23 | +The day number is: 12 |
| 24 | +The temperature is: 28.5 |
| 25 | +The weather is: Sunny |
| 26 | +###### Exercise 2 ###### |
| 27 | +###### Exercise 3 ###### |
| 28 | +Date: 2024-08-15 |
| 29 | +Temperature: 29.0 |
| 30 | +Humidity: 80.0 |
| 31 | +###### Exercise 4 ###### |
| 32 | +Is hot day?: true |
| 33 | +Is hot day?: false |
| 34 | +Is humid day?: true |
| 35 | +###### Exercise 5 ###### |
| 36 | +The average temperature from the CSV data is: 31.333333333333332 |
| 37 | +###### Exercise 6 ###### |
| 38 | +The average temperature from the CSV data is: 29.895999999999994 |
19 | 39 | ``` |
20 | | - |
21 | | -## Solving the exercises |
22 | | - |
23 | | -We'll start with a short introduction on general concepts in Java and then we'll solve the exercises. At the end we should get a program that reads CSV weather data from the `weather_data.csv` file and computes some statistics on it. It's based to solve the exercises in order, since they build on top of each other. |
24 | | -# weather-data |
25 | | -# weather-data |
|
0 commit comments