Skip to content

Commit

Permalink
it was updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ozgeer committed Sep 23, 2022
1 parent 914778b commit e63e8bd
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 34 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package hwrk1_abstract;
package hwrk1_collections;

public abstract class GraduateStudent extends Students {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package hwrk1_abstract;
package hwrk1_collections;

public class MasterStudents extends GraduateStudent {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package hwrk1_abstract;
package hwrk1_collections;

public class PhdStudent extends GraduateStudent{

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package hwrk1_abstract;
package hwrk1_collections;
import java.util.*;
import java.util.Collections;

Expand All @@ -15,10 +15,7 @@ public static void main(String[] args) {
Comparator<Students> st=new StudentsComparator();
Collections.sort(students,st);
students.forEach(System.out::println);
// Iterator i=students.iterator();
// while(i.hasNext()){
// System.out.println(i.next());
// }
//
// rOffice.registerStudent(masterStudents);
// space();
// System.out.println("compare PhdStudent and Master Student:"+phdStudent.compareTo(masterStudents)+"\nPhd no:"+phdStudent.getNo()+"\nMaster no:"+masterStudents.getNo());
Expand All @@ -27,13 +24,6 @@ public static void main(String[] args) {
// space();
// System.out.println("compare same things:"+vocationalStudent.compareTo(vocationalStudent)+"\nVocational student no:"+vocationalStudent.getNo());
// space();
// rOffice.registerStudent(masterStudents2); //hashcode ların farklı oldugu gormek için iki tane aynı tip nesne gonderdim.
// space();
// rOffice.registerStudent(vocationalStudent);
// space();
// rOffice.registerStudent(undergraduateStudents);
// space();
// rOffice.registerStudent(phdStudent);
}

public static void space(){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
package hwrk1_abstract;
import java.util.Comparator;
package hwrk1_collections;

public abstract class Students {
private int year;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package hwrk1_abstract;
package hwrk1_collections;
import java.util.Comparator;

public class StudentsComparator implements Comparator {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package hwrk1_abstract;
package hwrk1_collections;

public class UndergraduateStudents extends Students {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package hwrk1_abstract;
package hwrk1_collections;

public class VocationalStudent extends Students {
public VocationalStudent(int year,String major,String name,int no) {
Expand Down
25 changes: 11 additions & 14 deletions ObjOrientedFunctProg_Chapter2/.idea/workspace.xml

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

0 comments on commit e63e8bd

Please sign in to comment.