Skip to content
Merged
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
8 changes: 8 additions & 0 deletions TAE_FinalProject/src/Class.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ public void search_student(){
}
}

public void show_classroom_only(){

System.out.println("Classroom: "+this.getClassroom());
System.out.println("---------------");

}



}

4 changes: 4 additions & 0 deletions TAE_FinalProject/src/FullTime_Teacher.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,8 @@ public float calculate_salary(int experience_years){
return salary;

}

public static void new_class(University university){

}
}
3 changes: 2 additions & 1 deletion TAE_FinalProject/src/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ public static void main(String[] args) {
//university.show_classesInfo(university.getClasses());
//university.show_classes_menu(university.getClasses());
//university.create_student();
university.search_Studentclass();
//university.search_Studentclass();
university.create_class();

}

Expand Down
22 changes: 11 additions & 11 deletions TAE_FinalProject/src/Setup.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,22 @@ public static void teachers_creation(University university){

//usar metodo de crear clases aquí

PartTime_Teacher part_time_teacher1= new PartTime_Teacher("Juan Gonzalez",4);
PartTime_Teacher part_time_teacher1= new PartTime_Teacher("juan gonzalez",4);
part_time_teacher1.calculate_salary();
university.add_newEntity(part_time_teacher1);
//añadirlo a una clase

PartTime_Teacher part_time_teacher2= new PartTime_Teacher("Maria Lopez",8);
PartTime_Teacher part_time_teacher2= new PartTime_Teacher("maria lopez",8);
part_time_teacher2.calculate_salary();
university.add_newEntity(part_time_teacher2);
//añadirlo a una clase

FullTime_Teacher full_time_teacher1= new FullTime_Teacher("Daniela Garcia",10);
FullTime_Teacher full_time_teacher1= new FullTime_Teacher("daniela garcia",10);
full_time_teacher1.calculate_salary();
university.add_newEntity(full_time_teacher1);
//añadirlo a una clase

FullTime_Teacher full_time_teacher2= new FullTime_Teacher("Alejandra Jimenez",5);
FullTime_Teacher full_time_teacher2= new FullTime_Teacher("alejandra jimenez",5);
full_time_teacher2.calculate_salary();
university.add_newEntity(full_time_teacher2);
//añadirlo a una clase
Expand All @@ -43,26 +43,26 @@ public static void teachers_creation(University university){

public static void students_creation(University university){

Student studen1= new Student(0,20,"Santiago Jaramillo");
Student studen1= new Student(0,20,"santiago jaramillo");
university.add_newEntity(studen1);
//añadirlo a la lista de una clase también

Student studen2= new Student(1,23,"Maria Vidal");
Student studen2= new Student(1,23,"maria Vidal");
university.add_newEntity(studen2);

Student studen3= new Student(2,21,"Santiago Jaramillo");
Student studen3= new Student(2,21,"sebastian rodriguez");
university.add_newEntity(studen3);

Student studen4= new Student(3,25,"Lucía Soto");
Student studen4= new Student(3,25,"lucía soto");
university.add_newEntity(studen4);

Student studen5= new Student(4,22,"Jorge Higuita");
Student studen5= new Student(4,22,"jorge higuita");
university.add_newEntity(studen5);

Student studen6= new Student(5,19,"Ximena Giraldo");
Student studen6= new Student(5,19,"ximena giraldo");
university.add_newEntity(studen6);

Student studen7= new Student(6,20,"Laura Bedoya");
Student studen7= new Student(6,20,"laura bedoya");
university.add_newEntity(studen7);


Expand Down
38 changes: 36 additions & 2 deletions TAE_FinalProject/src/University.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ public void show_classes_menu(List<Class> list_classes){

}

public void show_classesInfo(List<Class> list_classes){
public void show_classesInfo(){

System.out.println("This is the list of the classes available");
for(Class classes: list_classes){
for(Class classes: this.getClasses()){
classes.show_classinfo();
}

Expand Down Expand Up @@ -190,6 +190,40 @@ public void search_Studentclass(){

public void create_class(){

//Create a new class and add an existing teacher, existing students and its relevant data
System.out.println("Please give the subjet of this class");
Scanner input=new Scanner(System.in);
String class_name=input.nextLine();
System.out.println("In which classroom it will be");
System.out.println("These classroom are not available, or maybe the class will be in a different schedule");
for(Class classes: this.getClasses()){

classes.show_classroom_only();

}
String classroom_class=input.nextLine();
System.out.println("This class will have these students:");
System.out.println("------------");
this.showinfo_student();

System.out.println("Which teacher will teach this class?");
for(Teacher teacher: this.getTeachers()){
this.show_teachers();
}
String adding_teacher = input.nextLine();
for(Teacher teacher: this.getTeachers()){
if(teacher.getName().equals(adding_teacher)){

Class new_class=new Class(class_name,classroom_class,teacher,this.getStudents());

this.add_newEntity(new_class);
}
}
}
public void show_teachers(){
for(Teacher teacher: this.getTeachers()){
teacher.getName();
}
}

public void add_newEntity(Teacher teacher){
Expand Down