From 9953860ce4aabda3b0932736be849091924bcf76 Mon Sep 17 00:00:00 2001 From: rafsaniShazid Date: Sat, 20 Sep 2025 15:35:16 +0600 Subject: [PATCH 1/6] added student.java --- .../com/thealgorithms/student/Student.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/main/java/com/thealgorithms/student/Student.java diff --git a/src/main/java/com/thealgorithms/student/Student.java b/src/main/java/com/thealgorithms/student/Student.java new file mode 100644 index 000000000000..1b0f8467941d --- /dev/null +++ b/src/main/java/com/thealgorithms/student/Student.java @@ -0,0 +1,18 @@ + +public class Student { + public String name; + private int ID; + public double cgpa; + + public Student() { + this.name= ""; + this.ID=0; + this.cgpa=0.0; + } + public Student(String name,int id,double cgpa){ + this.name = name; + ID= id; + this.cgpa=cgpa; + } + +} From ff3f59db78de121f252d0c898e814d24d112d007 Mon Sep 17 00:00:00 2001 From: rafsaniShazid Date: Sat, 20 Sep 2025 15:51:31 +0600 Subject: [PATCH 2/6] added calculator class --- .../com/thealgorithms/student/Calculator.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/main/java/com/thealgorithms/student/Calculator.java diff --git a/src/main/java/com/thealgorithms/student/Calculator.java b/src/main/java/com/thealgorithms/student/Calculator.java new file mode 100644 index 000000000000..9dc8fbd2a601 --- /dev/null +++ b/src/main/java/com/thealgorithms/student/Calculator.java @@ -0,0 +1,22 @@ +public class Calculator { + public int a; + public int b; + + public Calculator(int a,int b){ + this.a=a; + this.b=b; + } + public int add(){ + return this.a+this.b; + } + public int substract(){ + return this.a-this.b; + } + public int multiply(){ + return this.a*this.b; + } + public int divide(){ + return this.a/this.b; + } + +} From 80622e6ccd3b63cff1d8189779d92aeee44e8a51 Mon Sep 17 00:00:00 2001 From: rafsaniShazid Date: Sat, 20 Sep 2025 16:15:42 +0600 Subject: [PATCH 3/6] added calculator demo --- src/main/java/com/thealgorithms/student/Calculator.java | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/main/java/com/thealgorithms/student/Calculator.java diff --git a/src/main/java/com/thealgorithms/student/Calculator.java b/src/main/java/com/thealgorithms/student/Calculator.java new file mode 100644 index 000000000000..7648cb51b5c2 --- /dev/null +++ b/src/main/java/com/thealgorithms/student/Calculator.java @@ -0,0 +1,6 @@ +// Simple Calculator +public class Calculator { + public int add(int a, int b) { + return a + b; + } +} \ No newline at end of file From c0a4634f80a4b16bc8c69266b565b563e61ab545 Mon Sep 17 00:00:00 2001 From: rafsaniShazid Date: Sat, 20 Sep 2025 16:19:06 +0600 Subject: [PATCH 4/6] modified calculator --- .../com/thealgorithms/student/Calculator.java | 29 +++++++------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/src/main/java/com/thealgorithms/student/Calculator.java b/src/main/java/com/thealgorithms/student/Calculator.java index 9dc8fbd2a601..4347a0b2149b 100644 --- a/src/main/java/com/thealgorithms/student/Calculator.java +++ b/src/main/java/com/thealgorithms/student/Calculator.java @@ -1,22 +1,15 @@ +// Advanced Calculator with error handling public class Calculator { - public int a; - public int b; - - public Calculator(int a,int b){ - this.a=a; - this.b=b; + public double add(double a, double b) { + return a + b; } - public int add(){ - return this.a+this.b; - } - public int substract(){ - return this.a-this.b; - } - public int multiply(){ - return this.a*this.b; - } - public int divide(){ - return this.a/this.b; + + public double subtract(double a, double b) { + return a - b; } -} + // Add more methods to create more significant differences + public String getVersion() { + return "Calculator v2.0"; + } +} \ No newline at end of file From 3fde52dc7b5f9efe8655c024a0991cc711df878b Mon Sep 17 00:00:00 2001 From: rafsaniShazid Date: Sat, 20 Sep 2025 19:40:12 +0600 Subject: [PATCH 5/6] added grading class --- src/main/java/com/thealgorithms/student/Grade.java | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/main/java/com/thealgorithms/student/Grade.java diff --git a/src/main/java/com/thealgorithms/student/Grade.java b/src/main/java/com/thealgorithms/student/Grade.java new file mode 100644 index 000000000000..e81389c5c878 --- /dev/null +++ b/src/main/java/com/thealgorithms/student/Grade.java @@ -0,0 +1,7 @@ +public class Grade { + public int id; + public String name; + public float cgpa; + + public void show(){} +} From 0d03d9109e2bcce76acf8fe88ca83bd67472565f Mon Sep 17 00:00:00 2001 From: rafsaniShazid Date: Sat, 20 Sep 2025 22:46:24 +0600 Subject: [PATCH 6/6] added github compilation workflows --- .../java/com/thealgorithms/student/.github/workflows/build.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/main/java/com/thealgorithms/student/.github/workflows/build.yml diff --git a/src/main/java/com/thealgorithms/student/.github/workflows/build.yml b/src/main/java/com/thealgorithms/student/.github/workflows/build.yml new file mode 100644 index 000000000000..e69de29bb2d1