From 8a548517b17be52ba0f08ec7ca7d2f203d5b6719 Mon Sep 17 00:00:00 2001 From: mahhia Date: Fri, 19 Sep 2025 20:12:03 +0600 Subject: [PATCH 1/4] Add student class --- mycode/student.java | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 mycode/student.java diff --git a/mycode/student.java b/mycode/student.java new file mode 100644 index 0000000..23218c4 --- /dev/null +++ b/mycode/student.java @@ -0,0 +1,30 @@ +public class student { + private String name; + private int id; + + public student(){} + public student(String name,int id){ + this.name=name; + this.id=id; + + } + public String getname(){ + return name; + } + + public int getid(){ + return id; + } + + public void setname(String name){ + this.name=name; + } + public void setid(int id){ + this.id=id; + } + + public void print(){ + System.out.println("Name: "+name+", Id: "+id); + } + +} From 6e21ec7bfcd559ba4eabeaa825a76389902b149c Mon Sep 17 00:00:00 2001 From: mahhia Date: Fri, 19 Sep 2025 20:36:11 +0600 Subject: [PATCH 2/4] add calculator class --- mycode/calculator.java | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 mycode/calculator.java diff --git a/mycode/calculator.java b/mycode/calculator.java new file mode 100644 index 0000000..393f743 --- /dev/null +++ b/mycode/calculator.java @@ -0,0 +1,30 @@ +public class calculator { + private int a,b; + + public calculator() { + } + + public calculator(int a, int b){ + this.a=a; + this.b=b; + + } + + public int add(){ + + return a+b; + } + + public int substract(){ + return a-b; + + } + + public int div(){ + return a/b; + } + + public int mul(){ + return a*b; + } +} From c6c0bd3160ad6126b8d2eef8677235ecc081e5f0 Mon Sep 17 00:00:00 2001 From: mahhia Date: Fri, 19 Sep 2025 21:21:24 +0600 Subject: [PATCH 3/4] master:modify add() method --- mycode/calculator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mycode/calculator.java b/mycode/calculator.java index 393f743..93f9f12 100644 --- a/mycode/calculator.java +++ b/mycode/calculator.java @@ -12,7 +12,7 @@ public calculator(int a, int b){ public int add(){ - return a+b; + return a+b+1; } public int substract(){ From 8c23d4cb8007c2f88bbcea9d4f753a01fdc59e39 Mon Sep 17 00:00:00 2001 From: mahhia Date: Fri, 19 Sep 2025 21:24:19 +0600 Subject: [PATCH 4/4] feature/calculator update add() method --- mycode/calculator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mycode/calculator.java b/mycode/calculator.java index 393f743..9e0542f 100644 --- a/mycode/calculator.java +++ b/mycode/calculator.java @@ -12,7 +12,7 @@ public calculator(int a, int b){ public int add(){ - return a+b; + return a+b+2; } public int substract(){