Skip to content

Commit

Permalink
Correcting .gitignore.
Browse files Browse the repository at this point in the history
  • Loading branch information
AmentBRT committed Dec 31, 2023
1 parent 18c571f commit 99775a8
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions Tamrin/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
!*
.vscode/
*.class
Binary file removed Tamrin/Jalase_5/src/App.class
Binary file not shown.
29 changes: 29 additions & 0 deletions Tamrin/Jalase_5/src/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ public class App {
public static void main(String[] args) throws Exception {
Book book = new Book("ShahName", "Ferdosi");
System.out.println(book);

Student student = new Student(12, 12);
System.out.println(student.getGrade());
student.setGrade(11);
System.out.println(student.getGrade());
}
}

Expand All @@ -19,3 +24,27 @@ public String toString() {
return "Book " + this.title + " by " + this.author;
}
}

class Student {
private int studentId;
private int grade;

public Student(int studentId, int grade) {
this.studentId = studentId;
this.grade = grade;
}

public int getGrade() {
return grade;
}
public void setGrade(int grade) {
this.grade = grade;
}

public int getStudentId() {
return studentId;
}
public void setStudentId(int studentId) {
this.studentId = studentId;
}
}
Binary file removed Tamrin/Jalase_5/src/Book.class
Binary file not shown.

0 comments on commit 99775a8

Please sign in to comment.