Skip to content

Commit 6e2e69f

Browse files
authored
Merge pull request #1 from conorheffron/feat/init
Initial draft (snapshot) implementation
2 parents 44d5ba1 + 8e4f99b commit 6e2e69f

File tree

11 files changed

+916
-21
lines changed

11 files changed

+916
-21
lines changed

.github/workflows/maven.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Java CI with Maven
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Set up JDK 25
20+
uses: actions/setup-java@v3
21+
with:
22+
java-version: '25'
23+
distribution: 'temurin'
24+
cache: maven
25+
- name: Build with Maven
26+
run: ./mvnw -B package --file pom.xml

.gitignore

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
target/
2+
!.mvn/wrapper/maven-wrapper.jar
3+
!**/src/main/**/target/
4+
!**/src/test/**/target/
5+
6+
### IntelliJ IDEA ###
7+
.idea/modules.xml
8+
.idea/jarRepositories.xml
9+
.idea/compiler.xml
10+
.idea/libraries/
11+
*.iws
12+
*.iml
13+
*.ipr
14+
15+
### Eclipse ###
16+
.apt_generated
17+
.classpath
18+
.factorypath
19+
.project
20+
.settings
21+
.springBeans
22+
.sts4-cache
23+
24+
### NetBeans ###
25+
/nbproject/private/
26+
/nbbuild/
27+
/dist/
28+
/nbdist/
29+
/.nb-gradle/
30+
build/
31+
!**/src/main/**/build/
32+
!**/src/test/**/build/
33+
34+
### VS Code ###
35+
.vscode/
36+
37+
### Mac OS ###
38+
.DS_Store
39+
/.idea
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
wrapperVersion=3.3.4
2+
distributionType=only-script
3+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/4.0.0-rc-2/apache-maven-4.0.0-rc-2-bin.zip

README.md

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,39 @@
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.
123

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
146

7+
## Build
8+
```shell
9+
./mvnw -B package --file pom.xml
1510
```
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
1939
```
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

Comments
 (0)