Skip to content
Open
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
21 changes: 21 additions & 0 deletions src/main/java/com/coveros/demo/helloworld/Calculator.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.coveros.demo.helloworld;
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) {
if (b == 0) {
throw new IllegalArgumentException("Division by zero is not allowed.");
}
return (double)a / b;
}
public int modulus(int a, int b) {
return a % b;
}
}
21 changes: 21 additions & 0 deletions src/main/java/com/coveros/demo/helloworld/Student.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.coveros.demo.helloworld;
public class Student{
private String name;
private int roll;
public Student(String name, int roll) {
this.name = name;
this.roll = roll;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getRoll() {
return roll;
}
public void setRoll(int roll) {
this.roll = roll;
}
}