E605 [이호석] 2주차 3장, 4장 예제 코드 by HiiWee · Pull Request #8 · Invincible-Backend-Study/java-basic · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions hoseok/gotofjava/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
plugins {
id 'java'
}

group 'org.example'
version '1.0-SNAPSHOT'

repositories {
mavenCentral()
}

dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
}

test {
useJUnitPlatform()
}
Binary file not shown.
5 changes: 5 additions & 0 deletions hoseok/gotofjava/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
240 changes: 240 additions & 0 deletions hoseok/gotofjava/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

91 changes: 91 additions & 0 deletions hoseok/gotofjava/gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions hoseok/gotofjava/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rootProject.name = 'gotofjava'

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package chapter03.calculator;

public class Calculator {

public int add(int a, int b) {
return a + b;
}

public int subtract(int a, int b) {
return a - b;
}

public int multiply(int a, int b) {
return a * b;
}

public int divide(int a, int b) {
return a / b;
}

public static void main(String[] args) {
Calculator calculator = new Calculator();
System.out.println(calculator.add(20, 5));
System.out.println(calculator.subtract(20, 5));
System.out.println(calculator.multiply(20, 5));
System.out.println(calculator.divide(20, 5));
}

}
Loading
0