From 29a5d72b7ff56d437b73d1862443d497e86b5a04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwardin231=E2=80=9D?= Date: Sat, 24 Feb 2024 10:26:44 +0100 Subject: [PATCH 01/50] Maven added, David Student class and Darwin Course class --- .idea/.gitignore | 3 ++ .idea/homework-java-ironschool.iml | 10 ++++++ .idea/misc.xml | 14 ++++++++ .idea/modules.xml | 8 +++++ .idea/vcs.xml | 6 ++++ main/java/Course.java | 57 ++++++++++++++++++++++++++++++ main/java/Student.java | 44 +++++++++++++++++++++++ pom.xml | 26 ++++++++++++++ 8 files changed, 168 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/homework-java-ironschool.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 main/java/Course.java create mode 100644 main/java/Student.java create mode 100644 pom.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/homework-java-ironschool.iml b/.idea/homework-java-ironschool.iml new file mode 100644 index 0000000..76c2124 --- /dev/null +++ b/.idea/homework-java-ironschool.iml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..fdc35ea --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,14 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..7d98804 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/main/java/Course.java b/main/java/Course.java new file mode 100644 index 0000000..329885a --- /dev/null +++ b/main/java/Course.java @@ -0,0 +1,57 @@ + +import java.util.UUID; +public class Course { + private String courseId; + private String name; + private double price; + private double money_earned; + //private Teacher teacher; Add it once Teacher class is created + + + public Course(String courseId, String name, double price, double money_earned) { + setCourseId(courseId); + setName(name); + setPrice(price); + setMoney_earned(money_earned); + } + + public String getCourseId() { + return UUID.randomUUID().toString(); + } + + public void setCourseId(String courseId) { + this.courseId = courseId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public double getPrice() { + return price; + } + + public void setPrice(double price) { + this.price = price; + } + + public double getMoney_earned() { + return money_earned; + } + + public void setMoney_earned(double money_earned) { + this.money_earned = money_earned; + } + + /*public Teacher getTeacher() { + return teacher; + } + + public void setTeacher(Teacher teacher) { + this.teacher = teacher; + }*/ +} diff --git a/main/java/Student.java b/main/java/Student.java new file mode 100644 index 0000000..4153e47 --- /dev/null +++ b/main/java/Student.java @@ -0,0 +1,44 @@ +import java.util.UUID; +public class Student { + private String studentId; + private String name; + private String address; + private String email; + private Course course; + public Student(String name, String address, String email) { + this.name = name; + this.address = address; + this.email = email; + this.studentId = generateStudentId(); + } + public String getStudentId() { + return studentId; + } + public String generateStudentId() { + return UUID.randomUUID().toString(); + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getAddress() { + return address; + } + public void setAddress(String address) { + this.address = address; + } + public String getEmail() { + return email; + } + public void setEmail(String email) { + this.email = email; + } + public Course getCourse() { + return course; + } + public void setCourse(Course course) { + this.course = course; + } +} \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..97581e5 --- /dev/null +++ b/pom.xml @@ -0,0 +1,26 @@ + + + 4.0.0 + + groupId + homework-java-ironschool + 1.0-SNAPSHOT + + + 21 + 21 + UTF-8 + + + + + org.junit.jupiter + junit-jupiter + 5.9.1 + test + + + + \ No newline at end of file From 94505a4746a9d93cc69f4a76e8090cf88405d249 Mon Sep 17 00:00:00 2001 From: Xavi Soria Date: Sat, 24 Feb 2024 10:31:14 +0100 Subject: [PATCH 02/50] Teacher commit --- main/java/Teacher.java | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 main/java/Teacher.java diff --git a/main/java/Teacher.java b/main/java/Teacher.java new file mode 100644 index 0000000..2c8d1df --- /dev/null +++ b/main/java/Teacher.java @@ -0,0 +1,39 @@ +import java.util.UUID; + + +public class Teacher { + private final String teacherId; + private String name; + private double salary; + + public Teacher(String name, double salary) { + this.teacherId = UUID.randomUUID().toString(); + setName(name); + setSalary(salary); + } + + public String getTeacherId() { + return teacherId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public double getSalary() { + return salary; + } + + public void setSalary(double salary) { + if (salary < 0) { + throw new IllegalArgumentException("Salary cannot be negative"); + } else { + this.salary = salary; + } + } + +} \ No newline at end of file From c83641bb41135323b0a2720f3983b09b871fecf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwardin231=E2=80=9D?= Date: Sat, 24 Feb 2024 10:31:36 +0100 Subject: [PATCH 03/50] Maven set --- .idea/homework-java-ironschool.iml | 4 ++-- {main => src/main}/java/Course.java | 0 {main => src/main}/java/Student.java | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename {main => src/main}/java/Course.java (100%) rename {main => src/main}/java/Student.java (100%) diff --git a/.idea/homework-java-ironschool.iml b/.idea/homework-java-ironschool.iml index 76c2124..c03b9b2 100644 --- a/.idea/homework-java-ironschool.iml +++ b/.idea/homework-java-ironschool.iml @@ -3,8 +3,8 @@ - - + + \ No newline at end of file diff --git a/main/java/Course.java b/src/main/java/Course.java similarity index 100% rename from main/java/Course.java rename to src/main/java/Course.java diff --git a/main/java/Student.java b/src/main/java/Student.java similarity index 100% rename from main/java/Student.java rename to src/main/java/Student.java From 22900cad58c892d0704cd0fbcd536bc4a4e0a2ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwardin231=E2=80=9D?= Date: Sat, 24 Feb 2024 10:35:29 +0100 Subject: [PATCH 04/50] Maven set --- src/main/java/Course.java | 2 ++ src/test/java/test.java | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 src/test/java/test.java diff --git a/src/main/java/Course.java b/src/main/java/Course.java index 329885a..9fce2c2 100644 --- a/src/main/java/Course.java +++ b/src/main/java/Course.java @@ -3,6 +3,8 @@ public class Course { private String courseId; private String name; + + private double price; private double money_earned; //private Teacher teacher; Add it once Teacher class is created diff --git a/src/test/java/test.java b/src/test/java/test.java new file mode 100644 index 0000000..e3bba97 --- /dev/null +++ b/src/test/java/test.java @@ -0,0 +1,4 @@ + +public class test { + +} From a0d3cb2b7912e0d049673dba84ad42e4f9cbe1dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwardin231=E2=80=9D?= Date: Sat, 24 Feb 2024 10:36:38 +0100 Subject: [PATCH 05/50] Teacher class added to Course.java --- src/main/java/Course.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/Course.java b/src/main/java/Course.java index 9fce2c2..3503218 100644 --- a/src/main/java/Course.java +++ b/src/main/java/Course.java @@ -7,7 +7,7 @@ public class Course { private double price; private double money_earned; - //private Teacher teacher; Add it once Teacher class is created + private Teacher teacher; public Course(String courseId, String name, double price, double money_earned) { @@ -49,11 +49,11 @@ public void setMoney_earned(double money_earned) { this.money_earned = money_earned; } - /*public Teacher getTeacher() { + public Teacher getTeacher() { return teacher; } public void setTeacher(Teacher teacher) { this.teacher = teacher; - }*/ + } } From 308ebaf1a02ed23cb5ec5f913b875c7e271c860c Mon Sep 17 00:00:00 2001 From: Xavi Soria Date: Sat, 24 Feb 2024 11:16:31 +0100 Subject: [PATCH 06/50] Teacher commit 2 --- src/main/java/Teacher.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/Teacher.java b/src/main/java/Teacher.java index 2c8d1df..b45ec11 100644 --- a/src/main/java/Teacher.java +++ b/src/main/java/Teacher.java @@ -28,12 +28,13 @@ public double getSalary() { return salary; } - public void setSalary(double salary) { + public boolean setSalary(double salary) { if (salary < 0) { - throw new IllegalArgumentException("Salary cannot be negative"); + return false; } else { this.salary = salary; } + return true; } } \ No newline at end of file From ed8dc6d3d83a3450e205ba0c4c7ff9d60e26f8f1 Mon Sep 17 00:00:00 2001 From: Xavi Soria Date: Sat, 24 Feb 2024 11:21:16 +0100 Subject: [PATCH 07/50] fix teacher class --- target/classes/Teacher.class | Bin 0 -> 1123 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 target/classes/Teacher.class diff --git a/target/classes/Teacher.class b/target/classes/Teacher.class new file mode 100644 index 0000000000000000000000000000000000000000..5f61a0c63e1ab4480ea52203bdea91d7da8d9b93 GIT binary patch literal 1123 zcmZuwT~8B16g|_HZo5tkEU<#26cA_^rG9?|LqbFol8O(7CO(iUU#iMbN3g zYVS%{G31|mfu~j&vejD4L;*zuCdVakhH?z=DbKHOZLO~{n2`v!!)|i0s9oo59$W!rhS(Ls2E!`Zj}=bU4p5i8szM zfh$DXmuf?FCBsIJhGfiK$EUYZDD965K?Y zp4|vI#!*6@ZYxxVir_ZxP}G@j%HmA7%}{<9Luu1GMg8A^^A*FNDak-L(362cx*$&g zX+eg2eaTb*lSliK=><|bEq8@lX?ya{;vuHawCS%8q-KC7*X`{Db*d+y>S4H#2WhQ3 zVNO)cd?M0$6_b4jq34~F-;j;kGJB!?;Uh{vF#p=B9>e+NEF5A+50;HRvEuDi$eU?$ dV3u||cWyxYbU<5w3{?AJ%w*c>NAXCH{{pJZxGMkv literal 0 HcmV?d00001 From da605c9f927b1b397c3ec654216f84f2a47d8f94 Mon Sep 17 00:00:00 2001 From: jtiradohernandez Date: Sat, 24 Feb 2024 11:39:10 +0100 Subject: [PATCH 08/50] Commands class created --- src/main/java/Commands.java | 73 +++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 src/main/java/Commands.java diff --git a/src/main/java/Commands.java b/src/main/java/Commands.java new file mode 100644 index 0000000..85b69bd --- /dev/null +++ b/src/main/java/Commands.java @@ -0,0 +1,73 @@ +public class Commands { + private Course[] courseList; + private Student[] studentList; + private Teacher[] teacherList; + + public Commands(Course[] courseList, Student[] studentList, Teacher[] teacherList) { + setCourseList(courseList); + setStudentList(studentList); + setTeacherList(teacherList); + } + + public Course[] getCourseList() { + return courseList; + } + + public void setCourseList(Course[] courseList) { + this.courseList = courseList; + } + + public Student[] getStudentList() { + return studentList; + } + + public void setStudentList(Student[] studentList) { + this.studentList = studentList; + } + + public Teacher[] getTeacherList() { + return teacherList; + } + + public void setTeacherList(Teacher[] teacherList) { + this.teacherList = teacherList; + } + + public void enroll(String studentID, String courseID){ // This command will help enroll the student specified in the corresponding course. While also updating the money_earned of that course based on its price + int length = getCourseList().length; + + } + + public void assign(String teacherID,String courseID){ //This command will help assign the teacher specified to the corresponding course + + } + + public void ShowCourses(){ //This command will display a list of all courses + + } + + public void LookupCourse(String courseID){ // This command will display the full details of the specified course + + } + + public void ShowStudents(){ //This command will display a list of all students + + } + + public void LookupStudent(String studentID){ //This command will display the full details of the specified student + + } + + public void ShowTeachers(){ //This command will display a list of all teachers + + } + + public void LookupTeacher(String teacherID){ // This command will display the full details of the specified teacher + + } + + public void ShowProfit(){ //This command will calculate (The total money earned from all courses) - (The sum of all the teachers' salaries) and return the result + + } +} + From 2bbf9195be2ff45ae0385e3777ccb4410a6ec0b3 Mon Sep 17 00:00:00 2001 From: Xavi Soria Date: Sat, 24 Feb 2024 11:49:13 +0100 Subject: [PATCH 09/50] save commit after merge to this branch --- src/main/java/Application.java | 45 +++++++++++++++++++++++++++++++ target/classes/Application.class | Bin 0 -> 1970 bytes target/classes/Course.class | Bin 0 -> 1579 bytes target/classes/Student.class | Bin 0 -> 1515 bytes target/classes/Teacher.class | Bin 1123 -> 1036 bytes 5 files changed, 45 insertions(+) create mode 100644 src/main/java/Application.java create mode 100644 target/classes/Application.class create mode 100644 target/classes/Course.class create mode 100644 target/classes/Student.class diff --git a/src/main/java/Application.java b/src/main/java/Application.java new file mode 100644 index 0000000..25fcab8 --- /dev/null +++ b/src/main/java/Application.java @@ -0,0 +1,45 @@ +import java.util.Scanner; + +public class Application { + + public static void main(String[] args) { + + createSchoolName(); + numberOfTeachers(); + + + } + private static final Scanner scanner = new Scanner(System.in); + + private static void createSchoolName() { + System.out.println("Welcome to the School Application"); + System.out.println("Please enter the name of the school:"); + + String schoolName = scanner.nextLine(); + System.out.println("Your school is: " + schoolName); + + } + private static int numberOfTeachers() { + + int numberofTeachers; + do { + System.out.println("How many teachers are there in the school: "); + while (!scanner.hasNextInt()) { + System.out.println("Please enter a valid number for the teachers."); + scanner.next(); + } + numberofTeachers = scanner.nextInt(); + } while (numberofTeachers <= 0); + + + System.out.println("In your school there are: " + numberofTeachers + " teachers"); + return numberofTeachers; + + + } + +} + + + + diff --git a/target/classes/Application.class b/target/classes/Application.class new file mode 100644 index 0000000000000000000000000000000000000000..2b7388c4054ff4c94d9a5a2abb396ab30e961946 GIT binary patch literal 1970 zcmaJ?TT>iG6#kmq49jrIl7(cG;1CyFh+(~7SiB^w$eQJ%iy(QK5cda z!Ih{x4Jo}9-W1w<(83UgY0+;tw?(kJyDqrX5J4CPtoGv)vIa&iTt@C3e*G|1qDfw| zO)PS?h?y%(Yk}*lx+17%*~B=*twrU7F#HIQgPABX+**>~*-h>r+A29Jn+H@~Iy7OsemYZI zC-AC;*YG++roqD%B3t$8yhtqfO}xo)`&`AieZW0;$BxBd@5;D{CqQ#L-rE-5(beeD znQOzmg|e2Ap$!y03x@Y}$|TBMvD%?1T2&ufr0=^7U9LXTI9HNS)o-;=H-^4LywZ#1$PlSb< zl>6;g`C@5OmUA1|4_l&xd%FDb3s_F;D+y8Io>zC3pmVjV`g&J99)=<`u){EQA*W7M z4eT;Z{J$$bzHwfdq$j0|ZaPC=zbiEAr7=C()GpGjL_O2i*{5KSY0!mFsMX6rHhvr&GXc2Kl2%kXRtQU_7Blsz@XNob|4kU#4=WBEu%jKNt}m-s^b)n zFp?d6f-Ab8hXgqcar_LQlYgE5y%fR7)5i7FGE7HB1BQOb)YcI`c#6tz nuyw*Lbto2jeL=P^Y+#f6AsT%}9$!Z7eQc90LvsfLd${^9924Hr literal 0 HcmV?d00001 diff --git a/target/classes/Course.class b/target/classes/Course.class new file mode 100644 index 0000000000000000000000000000000000000000..8d886e05d50a2f5a6756f5fefe56e0853bfd0ede GIT binary patch literal 1579 zcmZ{kZBNr+6o&7@y0WcoFkS={1r*uJ%LGA%;e25+A(?2x%U4sj21>Thlw#sH|B;%= zG=A_0_@j*XY0Fqf_odI%bIxnt@;g1li8a+O5{Tw3lbS~*q#{jIt(l-P(KE}DP^%P>sS%1-stE`9FKIY zVvP!UmRUWuTm^~BL9i_<$VVu9lcP-aNU+naQOiulcC5XN#93TJYYLPckNI5Z+ZXgh z<2q&hgkmhVpczXo3>x_shKvcdh0*W+*$s(7oXK9UrcdZuXI_bV zif3G9Cq#)k*M8wv3)A1Y?Sqt#`{psfj2?u9WvB9F;x~7(D5Lu4H^$Y6>POp3d|`es__H!-5}E)AZi}fv{H~xvwPZRAfF9gny0jaEVfj*l}aw61i@WJVA^eATlNa zc^(O})D5y63Bq4g6v$FH$SOhBdVt6+5s(sIgtbfL`kW=iGw)C(pSB~7*)pq$hV z6tS%1j)@hlYM4+&J>P9s&d*O?YcM*tS8un1OJR_A=s-z|STk`?P%?fyC_{)hOl;yl z6{)p*oi3}*RFBo^K*N6NU%daZlrN~=al6iJlU3JqPJ69Or}N&vY$`R|HM@CXcU-xL z#-#tj?Xuo#s16@D8;(DsmCoy_YKPt(oMvPAhk8rDgBc+Aoo z6is((HxwXCpTURm(!j2sIHO24=dCLxnIY$%bOmcvHNinlab*{IO2}ZTodctG4vE?+ zJ@;{NVz9-v#M>wOC%G?M-=JCBedyLsA31BckGy4FW4e#|FDkmsbqQ&%8AfFJXJCTa zrkTBn94vmZf?U|f4sXn=STuDK8X;Ylp~V>A-^E-=QQ(t)#mV zO8zMT3lw@$Wta=RhQg#nVKmYY>KFydML~+OAdlifa#4^Kf~?*GB7G47AIE~^qabUs zAWz~!@==ftf^6ObB4Z&SPw|Yabaqsc^(e?zEXZ@b2!sD>&3Y8XBFOeFAo4pAkbNQ~ G@bV9j*x1Ve literal 0 HcmV?d00001 diff --git a/target/classes/Teacher.class b/target/classes/Teacher.class index 5f61a0c63e1ab4480ea52203bdea91d7da8d9b93..6f5d736f4ee04b161be3e56cb80a2f31e2aca031 100644 GIT binary patch delta 481 zcmZutJ5Iwu6r6`+V@wh!fE-K!~PK*Jew0XjDnNVz~Hh?E#a!2vh| zE%!jouB|9Vn%&v==FOX(U-!xNzW+YI09@m8>NQ2~)4s&%Sbj!*2qJbKV4=i&PrXCb z2i7xG=BTSdhK7nWG;gNtt|8_bz~;F@zK1F{v5hi9RB+5{i#k++!hp9%ZSuvSBlM^s zI6q$0sQO delta 569 zcmZvYy-or_6ot=#{I~)E)I~tdf(p2(>%Ul1SlE~t6B8?4$%bIo#gLU~#S7TcSojV~ zB49Mp-bb)9@jZ-pW(iu*%+H;3&;91y`oI0s$Ir_ffD(4vQj)QwR+i-te8@3m&h>__ znYvZc_Ds{L=w_*2xwt*seAV30V{Z z@F3CJXP?bQFf7rm3fvf>J+Ah^)Mxm*2zC%r3thz2d>6?!J-V<=t4z(nD9I&+Fotmi zFohsAsw!kdCRo8L?fjG`Jrk!n%##Dd8p8dd8j4IjdekRG9!cd)@QPwsI0hU+-;rV6 z>27_w~b~a;-%EAXX1?aavj2y#rcrpO#?*o4k`WnqUSvV&;Jg z{}HE$j!j{v-+V$L@j&F Date: Sat, 24 Feb 2024 12:41:38 +0100 Subject: [PATCH 10/50] minor changes student --- src/main/java/Student.java | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/main/java/Student.java b/src/main/java/Student.java index 4153e47..afd31bc 100644 --- a/src/main/java/Student.java +++ b/src/main/java/Student.java @@ -1,43 +1,51 @@ import java.util.UUID; + public class Student { - private String studentId; + private final String studentId; private String name; private String address; private String email; private Course course; + public Student(String name, String address, String email) { this.name = name; this.address = address; this.email = email; - this.studentId = generateStudentId(); + this.studentId = UUID.randomUUID().toString(); } + public String getStudentId() { return studentId; } - public String generateStudentId() { - return UUID.randomUUID().toString(); - } + public String getName() { return name; } + public void setName(String name) { this.name = name; } + public String getAddress() { return address; } + public void setAddress(String address) { this.address = address; } + public String getEmail() { return email; } + public void setEmail(String email) { this.email = email; } + public Course getCourse() { return course; } + public void setCourse(Course course) { this.course = course; } From f04c24f91c54e6a2b6f607f9610e7019f5b408ac Mon Sep 17 00:00:00 2001 From: jtiradohernandez Date: Sat, 24 Feb 2024 13:30:24 +0100 Subject: [PATCH 11/50] Change from arrays to maps in Command class --- src/main/java/Commands.java | 65 ++++++++++++++++++++++++++++++------- 1 file changed, 53 insertions(+), 12 deletions(-) diff --git a/src/main/java/Commands.java b/src/main/java/Commands.java index 85b69bd..fbca649 100644 --- a/src/main/java/Commands.java +++ b/src/main/java/Commands.java @@ -1,41 +1,82 @@ +import java.util.HashMap; +import java.util.Map; + public class Commands { - private Course[] courseList; - private Student[] studentList; - private Teacher[] teacherList; + private Map courseList = new HashMap<>(); + private Map studentList = new HashMap<>(); + private Map teacherList = new HashMap<>(); + - public Commands(Course[] courseList, Student[] studentList, Teacher[] teacherList) { + public Commands(Map courseList, Map studentList, Map teacherList) { setCourseList(courseList); setStudentList(studentList); setTeacherList(teacherList); } - public Course[] getCourseList() { + public Map getCourseList() { return courseList; } - public void setCourseList(Course[] courseList) { + public void setCourseList(Map courseList) { this.courseList = courseList; } - public Student[] getStudentList() { + public Map getStudentList() { return studentList; } - public void setStudentList(Student[] studentList) { + public void setStudentList(Map studentList) { this.studentList = studentList; } - public Teacher[] getTeacherList() { + public Map getTeacherList() { return teacherList; } - public void setTeacherList(Teacher[] teacherList) { + public void setTeacherList(Map teacherList) { this.teacherList = teacherList; } - public void enroll(String studentID, String courseID){ // This command will help enroll the student specified in the corresponding course. While also updating the money_earned of that course based on its price - int length = getCourseList().length; + public void commandSelector(CommandEnum commandAction){ + String studentID = "asdfasdf"; + String courseID = "asdfasdf"; + String teacherID = "asdfasdf"; + switch (commandAction){ + case ENROLL: + + enroll(studentID,courseID); + break; + case ASSIGN: + assign(teacherID,courseID); + break; + case SHOW_COURSES: + ShowCourses(); + break; + case LOOKUP_COURSE: + LookupCourse(courseID); + break; + case SHOW_STUDENTS: + ShowStudents(); + break; + case LOOKUP_STUDENT: + LookupStudent(studentID); + break; + case SHOW_TEACHERS: + ShowTeachers(); + break; + case LOOKUP_TEACHER: + LookupTeacher(teacherID); + break; + case SHOW_PROFIT: + ShowProfit(); + break; + default: + System.err.println("The command selected is not available"); + break; + } + } + public void enroll(String studentID, String courseID){ // This command will help enroll the student specified in the corresponding course. While also updating the money_earned of that course based on its price } public void assign(String teacherID,String courseID){ //This command will help assign the teacher specified to the corresponding course From 3a00d3dcaad8d69aa16ec43f03a468e968b8260c Mon Sep 17 00:00:00 2001 From: Xavi Soria Date: Sat, 24 Feb 2024 15:14:24 +0100 Subject: [PATCH 12/50] save commit after merge to this branch --- .gitignore | 4 +++ .idea/codeStyles/Project.xml | 7 +++++ .idea/codeStyles/codeStyleConfig.xml | 5 ++++ .idea/compiler.xml | 13 +++++++++ .idea/encodings.xml | 7 +++++ .idea/jarRepositories.xml | 20 ++++++++++++++ .idea/misc.xml | 1 + .idea/modules.xml | 8 ------ src/main/java/Application.java | 39 ++++++++++++++++++++++++--- src/main/java/Commands.java | 4 +-- target/classes/Application.class | Bin 1970 -> 3702 bytes target/classes/Commands.class | Bin 0 -> 2737 bytes target/classes/Student.class | Bin 1515 -> 1424 bytes 13 files changed, 95 insertions(+), 13 deletions(-) create mode 100644 .gitignore create mode 100644 .idea/codeStyles/Project.xml create mode 100644 .idea/codeStyles/codeStyleConfig.xml create mode 100644 .idea/compiler.xml create mode 100644 .idea/encodings.xml create mode 100644 .idea/jarRepositories.xml delete mode 100644 .idea/modules.xml create mode 100644 target/classes/Commands.class diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..278b59f --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +# Default ignored files +/shelf/ +/.idea/workspace.xml + diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..919ce1f --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..f0d9157 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..aa00ffa --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..712ab9d --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index fdc35ea..de4b033 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -7,6 +7,7 @@ + - + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..a48a3b3 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/main/java/Application.java b/src/main/java/Application.java index 10815c3..296f044 100644 --- a/src/main/java/Application.java +++ b/src/main/java/Application.java @@ -17,6 +17,30 @@ public Application() { setCourseList(courseDetails()); } + public Map getCourseList() { + return courseList; + } + + public void setCourseList(Map courseList) { + this.courseList = courseList; + } + + public Map getStudentList() { + return studentList; + } + + public void setStudentList(Map studentList) { + this.studentList = studentList; + } + + public Map getTeacherList() { + return teacherList; + } + + public void setTeacherList(Map teacherList) { + this.teacherList = teacherList; + } + public void run() { String response = " "; Commands commands = new Commands(this.getCourseList(), this.getStudentList(), this.getTeacherList()); diff --git a/src/main/java/Commands.java b/src/main/java/Commands.java index c279a18..9fee288 100644 --- a/src/main/java/Commands.java +++ b/src/main/java/Commands.java @@ -8,7 +8,7 @@ @Setter @Getter -public class Commands { +public class Commands{ private Map courseList = new LinkedHashMap<>(); private Map studentList = new LinkedHashMap<>(); private Map teacherList = new LinkedHashMap<>(); @@ -20,12 +20,37 @@ public Commands(Map courseList, Map studentList setTeacherList(teacherList); } + public Map getCourseList() { + return courseList; + } + + public void setCourseList(Map courseList) { + this.courseList = courseList; + } + + public Map getStudentList() { + return studentList; + } + + public void setStudentList(Map studentList) { + this.studentList = studentList; + } + + public Map getTeacherList() { + return teacherList; + } + + public void setTeacherList(Map teacherList) { + this.teacherList = teacherList; + } + public void commandSelector(CommandEnum commandAction){ String studentID = ""; String courseID = ""; String teacherID = ""; Boolean validOption = false; Scanner scanner = new Scanner(System.in); + switch (commandAction){ case ENROLL: do { diff --git a/src/main/java/Course.java b/src/main/java/Course.java index 92d3835..5f06cd7 100644 --- a/src/main/java/Course.java +++ b/src/main/java/Course.java @@ -1,5 +1,6 @@ import lombok.Getter; +import lombok.NonNull; import lombok.Setter; import java.util.ArrayList; @@ -23,6 +24,54 @@ public Course(String name, double price) { setPrice(price); } + public String getCourseId() { + return courseId; + } + + public void setCourseId(@NonNull String courseId) { + this.courseId = courseId; + } + + public String getName() { + return name; + } + + public void setName(@NonNull String name) { + this.name = name; + } + + public double getPrice() { + return price; + } + + public void setPrice(@NonNull double price) { + this.price = price; + } + + public double getMoney_earned() { + return money_earned; + } + + public void setMoney_earned(double money_earned) { + this.money_earned = money_earned; + } + + public Teacher getTeacher() { + return teacher; + } + + public void setTeacher(Teacher teacher) { + this.teacher = teacher; + } + + public List getStudents() { + return students; + } + + public void setStudents(List students) { + this.students = students; + } + public void courseEnroll(Student student){ students.add(student); } diff --git a/src/test/java/Commands1to2Test.java b/src/test/java/Commands1to2Test.java new file mode 100644 index 0000000..157ed23 --- /dev/null +++ b/src/test/java/Commands1to2Test.java @@ -0,0 +1,12 @@ +import static org.junit.jupiter.api.Assertions.*; + +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +public class Commands1to2Test { + + + + +} diff --git a/src/test/java/CourseTest.java b/src/test/java/CourseTest.java new file mode 100644 index 0000000..25d8e41 --- /dev/null +++ b/src/test/java/CourseTest.java @@ -0,0 +1,27 @@ + +import static org.junit.jupiter.api.Assertions.*; + +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +public class CourseTest { + + private Course course; + + @BeforeEach + public void setUp(){ + course = new Course("Math", 120); + } + + @Test + public void returns(){ + assertEquals("Math", course.getName()); + } + + @Test + public void priceTest(){ + assertEquals(120, course.getPrice()); + } + +} diff --git a/target/classes/Commands$1.class b/target/classes/Commands$1.class index 07d685535679e5016c24f79d64fef313b1e183fa..2997fc7b0fb44dae4a8216d2e92ad81a448b4eda 100644 GIT binary patch delta 13 Ucmcb`ev5rW0W+iQzCKoa?nTazK0j<{e zThyxcQK>I9_^woFqY@(o{^mq?cR1de5(FZN z-ek&Yi>63*L|c{!mo}+oBW(oLn(|b-x6_HI)lAjDmyNx3f7%I0x}2oy53qlN&$9kQ`s|BNKSJWBqT8Qq9CLij&m0E5ck#IcjB+D=vQ+$|eV;UOr zq~Eb2m3F!XR+QxTHWZ_YhSqpbFTp3BaCcJxwV0vwHdC;VyX8Ss>XwyZ7H0b}$HpNz zlsfR#Q8R;BYdY3N(-Eb*8n?eC-m93dYz?3hM18o8BS77k=Z*Uk$%#GLD4hs7@nj+vn;WWK zmyD*JP`b+rMLX*n0|6Y3V|-X>qZ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wA=e8D(>>Fm`Z? uL8*Wu-vV_hJVob($7X)T#}PbjPd?9^ZLQ@jz0oQh99#?Aeli*V+v`7xfjkW zr`mP=-Rh&A7j8RLNUwOl7p^KKi=|cu(+Ug5sULdX>RJ#u2MupO%p!y2406yJyrnUV zJR{e8{b1i!nBEWj9oG-{nV>NWmbh9Lr!b$vg2rhqD$I_4Z*OnZ6|#ZjcY1sFFkdW< z#f#0vpV2srbIcR=nqlDiy9%cVo~9RTrEd;P8W(U;A-C^_w!V#y!eY_lj(e9{;{UeB zCGpSDf797>#rBTIySO5Kx#8o$YqP~vv0iHB@IJ0)P}C@)e5@B~l?*za$y}D@TIrc^ z_kqTTxJKNzAx;XLf3q&}{7BIgP&X{ z@ZFC5xTR6U3cCtjr~TXw6lNM*c3b1V>FxSX*bms)(iq{=#Y&@Thgn;tXCa0+62ZdO zdmTpS8=miO_V;$&V9VL*(lX!ZwViIu2|PJR##H#+qd2A;b|M7UmV&!}(Cc=2EDqBO zdL|N-lszbiBi$VzX@(~m7-6}K#zYO*SrrWr#~7i?Xo>nK4z)8PLr|j}Eb+Jkje->} z4#Z~e#G5STsgsF(v<&mHxj{N^qI<=-)Pgu)Tdmn%nDE*Fn*`B#Im#_xIN2j7Ae--SFDaSjD6 z;|wp{S$xGmmxxMCtfS6Vc2c7qYj@&}Q*}^uzLh> Date: Mon, 11 Mar 2024 23:41:50 +0100 Subject: [PATCH 42/50] Implement tests and bonus command --- src/main/java/Application.java | 4 + src/main/java/CommandEnum.java | 3 +- src/test/java/Command9to10Test.java | 110 ++++++++++++++++++++++++++++ 3 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 src/test/java/Command9to10Test.java diff --git a/src/main/java/Application.java b/src/main/java/Application.java index 10815c3..26d8e53 100644 --- a/src/main/java/Application.java +++ b/src/main/java/Application.java @@ -148,6 +148,7 @@ public static void Selector(Commands comandos){ System.out.println("7. Show teachers\n"); System.out.println("8. Lookup teacher\n"); System.out.println("9. Show profit\n"); + System.out.println("10. Show course enrolled students\n"); try { int commandoption = scanner.nextInt(); switch (commandoption) { @@ -178,6 +179,9 @@ public static void Selector(Commands comandos){ case 9: comandos.commandSelector(CommandEnum.SHOW_PROFIT); break; + case 10: + comandos.commandSelector(CommandEnum.SHOW_COURSE_STUDENTS); + break; default: System.err.println("The option selected is not available"); break; diff --git a/src/main/java/CommandEnum.java b/src/main/java/CommandEnum.java index 6436ad3..8191981 100644 --- a/src/main/java/CommandEnum.java +++ b/src/main/java/CommandEnum.java @@ -7,5 +7,6 @@ public enum CommandEnum { LOOKUP_STUDENT, SHOW_TEACHERS, LOOKUP_TEACHER, - SHOW_PROFIT + SHOW_PROFIT, + SHOW_COURSE_STUDENTS } diff --git a/src/test/java/Command9to10Test.java b/src/test/java/Command9to10Test.java new file mode 100644 index 0000000..4752c3f --- /dev/null +++ b/src/test/java/Command9to10Test.java @@ -0,0 +1,110 @@ +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import java.util.LinkedHashMap; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class Command9to10Test { + Map testCourseList = new LinkedHashMap<>(); + Map testStudentList = new LinkedHashMap<>(); + Map testTeacherList = new LinkedHashMap<>(); + Commands commandsInstance = new Commands(testCourseList, testStudentList, testTeacherList); + Course sampleCourse; + Teacher sampleTeacher; + ByteArrayOutputStream outputStream; + Student sampleStudent; + + @BeforeEach + public void setUp() { + // Redirect System.out to capture the output + outputStream = new ByteArrayOutputStream(); + System.setOut(new PrintStream(outputStream)); + + // Create sample data and add it to the coursesMap + sampleCourse = new Course("Math", 200.0); + testCourseList.put(sampleCourse.getCourseId(), sampleCourse); + + // Create sample data and add it to the teachersMap + sampleTeacher = new Teacher("Prof. Smith", 500.0); + testTeacherList.put(sampleTeacher.getTeacherId(), sampleTeacher); + + // Create sample data and add it to the testStudentList + sampleStudent = new Student("John Smith", "123 Main St", "johnS@example.com"); + testStudentList.put(sampleStudent.getStudentId(), sampleStudent); + } + + @Test + public void testShowProfitPositive() { + // Assign Teacher to Course + sampleCourse.setTeacher(sampleTeacher); + + // SetMoneyEarned + sampleCourse.setMoney_earned(1000); + + // Call the method to be tested + commandsInstance.ShowProfit(); + + // Assert on the expected output + String expectedOutput = "Total profit: " + 500.0 + "€\n"; + + assertEquals(expectedOutput, outputStream.toString()); + } + + @Test + public void testShowProfitNegative() { + // Assign Teacher to Course + sampleCourse.setTeacher(sampleTeacher); + + // SetMoneyEarned + sampleCourse.setMoney_earned(100); + + // Call the method to be tested + commandsInstance.ShowProfit(); + + // Assert on the expected output + String expectedOutput = "Total profit: " + -400.0 + "€\n"; + + assertEquals(expectedOutput, outputStream.toString()); + } + + @Test + public void testShowCourseStudents() { + // Enroll student to Course + sampleCourse.courseEnroll(sampleStudent); + + // Call the method to be tested + commandsInstance.ShowCourseStudents(sampleCourse.getCourseId()); + + // Assert on the expected output + String expectedOutput = sampleCourse.getName() + " students:\n" + + sampleStudent.getStudentId() + ": " + sampleStudent.getName() + "\n"; + + assertEquals(expectedOutput, outputStream.toString()); + } + + @Test + public void testShowCourseStudentsEmpty() { + // Call the method to be tested + commandsInstance.ShowCourseStudents(sampleCourse.getCourseId()); + + // Assert on the expected output + String expectedOutput = sampleCourse.getName() + " has no students enrolled\n"; + + assertEquals(expectedOutput, outputStream.toString()); + } + + + @AfterEach + public void clear() { + // Reset the testCourseList + testCourseList.clear(); + + // Reset System.out + System.setOut(System.out); + } +} From e3a3471acd5901485efd3947cb076ea87f402d36 Mon Sep 17 00:00:00 2001 From: Celularfreak <82029406+celularfreak@users.noreply.github.com> Date: Tue, 12 Mar 2024 16:55:56 +0100 Subject: [PATCH 43/50] cleaned --- .gitignore | 1 + .idea/.gitignore | 3 --- .idea/codeStyles/Project.xml | 7 ------- .idea/codeStyles/codeStyleConfig.xml | 5 ----- .idea/compiler.xml | 14 -------------- .idea/encodings.xml | 7 ------- .idea/homework-java-ironschool.iml | 10 ---------- .idea/jarRepositories.xml | 20 -------------------- .idea/misc.xml | 14 -------------- .idea/modules.xml | 8 -------- .idea/vcs.xml | 6 ------ 11 files changed, 1 insertion(+), 94 deletions(-) delete mode 100644 .idea/.gitignore delete mode 100644 .idea/codeStyles/Project.xml delete mode 100644 .idea/codeStyles/codeStyleConfig.xml delete mode 100644 .idea/compiler.xml delete mode 100644 .idea/encodings.xml delete mode 100644 .idea/homework-java-ironschool.iml delete mode 100644 .idea/jarRepositories.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml diff --git a/.gitignore b/.gitignore index 278b59f..adc7ff9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ # Default ignored files /shelf/ /.idea/workspace.xml +.idea diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 26d3352..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml deleted file mode 100644 index 919ce1f..0000000 --- a/.idea/codeStyles/Project.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml deleted file mode 100644 index a55e7a1..0000000 --- a/.idea/codeStyles/codeStyleConfig.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index f54bd10..0000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml deleted file mode 100644 index aa00ffa..0000000 --- a/.idea/encodings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/.idea/homework-java-ironschool.iml b/.idea/homework-java-ironschool.iml deleted file mode 100644 index c03b9b2..0000000 --- a/.idea/homework-java-ironschool.iml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml deleted file mode 100644 index 712ab9d..0000000 --- a/.idea/jarRepositories.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index fdc35ea..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index a48a3b3..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From 3ed7253f1ea3d784dcafa2bcbf0079bc50926e91 Mon Sep 17 00:00:00 2001 From: Celularfreak <82029406+celularfreak@users.noreply.github.com> Date: Tue, 12 Mar 2024 17:01:03 +0100 Subject: [PATCH 44/50] nothing --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index adc7ff9..278b59f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ # Default ignored files /shelf/ /.idea/workspace.xml -.idea From 4731fd593bbe2eea18bdfe3d961806b70a8f1a1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwardin231=E2=80=9D?= Date: Mon, 11 Mar 2024 23:02:11 +0100 Subject: [PATCH 45/50] Course not null, getters and setters --- .idea/misc.xml | 2 +- .idea/modules.xml | 8 +++++ src/main/java/Application.java | 24 ++++++++++++++ src/main/java/Commands.java | 27 ++++++++++++++- src/main/java/Course.java | 49 ++++++++++++++++++++++++++++ src/test/java/Commands1to2Test.java | 12 +++++++ src/test/java/CourseTest.java | 27 +++++++++++++++ target/classes/Commands$1.class | Bin 986 -> 986 bytes target/classes/Commands.class | Bin 10182 -> 10889 bytes target/classes/Course.class | Bin 2168 -> 2570 bytes 10 files changed, 147 insertions(+), 2 deletions(-) create mode 100644 .idea/modules.xml create mode 100644 src/test/java/Commands1to2Test.java create mode 100644 src/test/java/CourseTest.java diff --git a/.idea/misc.xml b/.idea/misc.xml index a855768..fdc35ea 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -8,7 +8,7 @@ - + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..a48a3b3 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/main/java/Application.java b/src/main/java/Application.java index 10815c3..296f044 100644 --- a/src/main/java/Application.java +++ b/src/main/java/Application.java @@ -17,6 +17,30 @@ public Application() { setCourseList(courseDetails()); } + public Map getCourseList() { + return courseList; + } + + public void setCourseList(Map courseList) { + this.courseList = courseList; + } + + public Map getStudentList() { + return studentList; + } + + public void setStudentList(Map studentList) { + this.studentList = studentList; + } + + public Map getTeacherList() { + return teacherList; + } + + public void setTeacherList(Map teacherList) { + this.teacherList = teacherList; + } + public void run() { String response = " "; Commands commands = new Commands(this.getCourseList(), this.getStudentList(), this.getTeacherList()); diff --git a/src/main/java/Commands.java b/src/main/java/Commands.java index c279a18..9fee288 100644 --- a/src/main/java/Commands.java +++ b/src/main/java/Commands.java @@ -8,7 +8,7 @@ @Setter @Getter -public class Commands { +public class Commands{ private Map courseList = new LinkedHashMap<>(); private Map studentList = new LinkedHashMap<>(); private Map teacherList = new LinkedHashMap<>(); @@ -20,12 +20,37 @@ public Commands(Map courseList, Map studentList setTeacherList(teacherList); } + public Map getCourseList() { + return courseList; + } + + public void setCourseList(Map courseList) { + this.courseList = courseList; + } + + public Map getStudentList() { + return studentList; + } + + public void setStudentList(Map studentList) { + this.studentList = studentList; + } + + public Map getTeacherList() { + return teacherList; + } + + public void setTeacherList(Map teacherList) { + this.teacherList = teacherList; + } + public void commandSelector(CommandEnum commandAction){ String studentID = ""; String courseID = ""; String teacherID = ""; Boolean validOption = false; Scanner scanner = new Scanner(System.in); + switch (commandAction){ case ENROLL: do { diff --git a/src/main/java/Course.java b/src/main/java/Course.java index 92d3835..5f06cd7 100644 --- a/src/main/java/Course.java +++ b/src/main/java/Course.java @@ -1,5 +1,6 @@ import lombok.Getter; +import lombok.NonNull; import lombok.Setter; import java.util.ArrayList; @@ -23,6 +24,54 @@ public Course(String name, double price) { setPrice(price); } + public String getCourseId() { + return courseId; + } + + public void setCourseId(@NonNull String courseId) { + this.courseId = courseId; + } + + public String getName() { + return name; + } + + public void setName(@NonNull String name) { + this.name = name; + } + + public double getPrice() { + return price; + } + + public void setPrice(@NonNull double price) { + this.price = price; + } + + public double getMoney_earned() { + return money_earned; + } + + public void setMoney_earned(double money_earned) { + this.money_earned = money_earned; + } + + public Teacher getTeacher() { + return teacher; + } + + public void setTeacher(Teacher teacher) { + this.teacher = teacher; + } + + public List getStudents() { + return students; + } + + public void setStudents(List students) { + this.students = students; + } + public void courseEnroll(Student student){ students.add(student); } diff --git a/src/test/java/Commands1to2Test.java b/src/test/java/Commands1to2Test.java new file mode 100644 index 0000000..157ed23 --- /dev/null +++ b/src/test/java/Commands1to2Test.java @@ -0,0 +1,12 @@ +import static org.junit.jupiter.api.Assertions.*; + +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +public class Commands1to2Test { + + + + +} diff --git a/src/test/java/CourseTest.java b/src/test/java/CourseTest.java new file mode 100644 index 0000000..25d8e41 --- /dev/null +++ b/src/test/java/CourseTest.java @@ -0,0 +1,27 @@ + +import static org.junit.jupiter.api.Assertions.*; + +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +public class CourseTest { + + private Course course; + + @BeforeEach + public void setUp(){ + course = new Course("Math", 120); + } + + @Test + public void returns(){ + assertEquals("Math", course.getName()); + } + + @Test + public void priceTest(){ + assertEquals(120, course.getPrice()); + } + +} diff --git a/target/classes/Commands$1.class b/target/classes/Commands$1.class index 07d685535679e5016c24f79d64fef313b1e183fa..2997fc7b0fb44dae4a8216d2e92ad81a448b4eda 100644 GIT binary patch delta 13 Ucmcb`ev5rW0W+iQzCKoa?nTazK0j<{e zThyxcQK>I9_^woFqY@(o{^mq?cR1de5(FZN z-ek&Yi>63*L|c{!mo}+oBW(oLn(|b-x6_HI)lAjDmyNx3f7%I0x}2oy53qlN&$9kQ`s|BNKSJWBqT8Qq9CLij&m0E5ck#IcjB+D=vQ+$|eV;UOr zq~Eb2m3F!XR+QxTHWZ_YhSqpbFTp3BaCcJxwV0vwHdC;VyX8Ss>XwyZ7H0b}$HpNz zlsfR#Q8R;BYdY3N(-Eb*8n?eC-m93dYz?3hM18o8BS77k=Z*Uk$%#GLD4hs7@nj+vn;WWK zmyD*JP`b+rMLX*n0|6Y3V|-X>qZP*rs7L671UQ{r-kp*28ZMdNFl>Xrp* z@NG60p`A7zjzpXuBArm{YD;Tnb#FY9jwa#_^P|m)c&fMCNj8;Z36A&S1REV#N?Xe_ zTXJ2UNVd=_1ru|vZYWC13Tv^<#z{C?P#kyG6Tn^`fLySO=L#DuaSA0LNyO9PXgqbC zvtiKIjE6SWtxy^`&Bp0k15PsOM_5p^l;U&cOu-}*oxKsKlOlIgp?D%4a@Nz0e25Tv z)}mWuF=tIUHZQq`n~$ek)+;elB7Qh7#e{wjkF zcW7f-;m2CR0%HWOn-6UTLqsO*|A1xp8VJ%of`GSeFrjJ9DrITuO9_-H4#b zh~OL>=V}p{g?^mpZp@=!aAQh<-?njq3jXCCU5RzgI*_LPxJWR2IA@I|5^F=fJwt7> z*r2-9#%0Q1?KV#B?J<-U!z*lDsTkUdp&N?H@oK@GVJ%}AmL-PeMjO{DmKBDjOIz{0 z!NzwoJlz;io;PK9dZH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d2A;b|M7UmV&!}(Cc=2EDqBO zdL|N-lszbiBi$VzX@(~m7-6}K#zYO*SrrWr#~7i?Xo>nK4z)8PLr|j}Eb+Jkje->} z4#Z~e#G5STsgsF(v<&mHxj{N^qI<=-)Pgu)Tdmn%nDE*Fn*`B#Im#_xIN2j7Ae--SFDaSjD6 z;|wp{S$xGmmxxMCtfS6Vc2c7qYj@&}Q*}^uzLh> Date: Tue, 12 Mar 2024 18:36:00 +0100 Subject: [PATCH 46/50] recuperar --- .idea/misc.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index a855768..fdc35ea 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -8,7 +8,7 @@ - + \ No newline at end of file From 875a0d958f9cbc03a8f5d33d4a1d523c1fe3a646 Mon Sep 17 00:00:00 2001 From: arebelo Date: Tue, 12 Mar 2024 18:50:21 +0100 Subject: [PATCH 47/50] Upload lost command --- src/main/java/Commands.java | 38 +++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/src/main/java/Commands.java b/src/main/java/Commands.java index c279a18..7e5dbf3 100644 --- a/src/main/java/Commands.java +++ b/src/main/java/Commands.java @@ -1,10 +1,7 @@ import lombok.Getter; import lombok.Setter; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Scanner; +import java.util.*; @Setter @Getter @@ -168,6 +165,25 @@ public void commandSelector(CommandEnum commandAction){ case SHOW_PROFIT: ShowProfit(); break; + case SHOW_COURSE_STUDENTS: + do{ + System.out.println("Which course do you want to look up? (write the id):\n"); + courseList.forEach((key,value) -> { + System.out.println(key + " = " + value.getName() + " "); + }); + try{ + courseID = scanner.next(); + if(courseList.containsKey(courseID)){ + ShowCourseStudents(courseID); + validOption = true; + }else{ + System.err.println("The course introduced does not exist"); + } + }catch(IllegalArgumentException iae){ + System.err.println("The option introduced is not correct"); + } + } while(!validOption); + break; default: System.err.println("The command selected is not available"); break; @@ -264,5 +280,19 @@ public void ShowProfit(){ //This command will calculate (The total money earned System.out.println("Total profit: " + profit + "€"); } + + public void ShowCourseStudents(String courseID){ //This command will list the students enrolled in the given course + Course course = courseList.get(courseID); + List students = course.getStudents(); + + if (students.isEmpty()) { + System.out.println(course.getName() + " has no students enrolled"); + return ; + } + System.out.println(course.getName() + " students:"); + for (Student student : students) { + System.out.println(student.getStudentId() + ": " + student.getName()); + } + } } From 5bf1e0afd37eae159d2fcb5bfbf899c742ce715c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwardin231=E2=80=9D?= Date: Tue, 12 Mar 2024 20:44:01 +0100 Subject: [PATCH 48/50] Commands 1 and 2 test --- .idea/compiler.xml | 8 +++ .../shelved.patch | 56 ++++++++++++++++ .../shelved.patch | 17 +++++ .../shelved.patch | 20 ++++++ .../shelved.patch | 60 ++++++++++++++++++ ...e_Checkout_at_11_3_24__22_21__Changes_.xml | 4 ++ ..._Checkout_at_11_3_24__22_21__Changes_1.xml | 4 ++ ...e_Checkout_at_11_3_24__22_22__Changes_.xml | 4 ++ ...e_Checkout_at_11_3_24__22_29__Changes_.xml | 4 ++ src/test/java/Commands1to2Test.java | 56 +++++++++++++++- target/classes/Application.class | Bin 11461 -> 11581 bytes target/classes/CommandEnum.class | Bin 1417 -> 1486 bytes target/classes/Commands$1.class | Bin 986 -> 1048 bytes target/classes/Commands.class | Bin 10889 -> 11782 bytes target/test-classes/Command9to10Test.class | Bin 0 -> 3871 bytes target/test-classes/Commands1to2Test.class | Bin 0 -> 2493 bytes target/test-classes/Commands3To8Test.class | Bin 0 -> 6255 bytes target/test-classes/CourseTest.class | Bin 0 -> 938 bytes 18 files changed, 231 insertions(+), 2 deletions(-) create mode 100644 .idea/compiler.xml create mode 100644 .idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24,_22_21_[Changes]/shelved.patch create mode 100644 .idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24,_22_21_[Changes]1/shelved.patch create mode 100644 .idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24,_22_22_[Changes]/shelved.patch create mode 100644 .idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24,_22_29_[Changes]/shelved.patch create mode 100644 .idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24__22_21__Changes_.xml create mode 100644 .idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24__22_21__Changes_1.xml create mode 100644 .idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24__22_22__Changes_.xml create mode 100644 .idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24__22_29__Changes_.xml create mode 100644 target/test-classes/Command9to10Test.class create mode 100644 target/test-classes/Commands1to2Test.class create mode 100644 target/test-classes/Commands3To8Test.class create mode 100644 target/test-classes/CourseTest.class diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..a1757ae --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24,_22_21_[Changes]/shelved.patch b/.idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24,_22_21_[Changes]/shelved.patch new file mode 100644 index 0000000..d0336b9 --- /dev/null +++ b/.idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24,_22_21_[Changes]/shelved.patch @@ -0,0 +1,56 @@ +Index: src/main/java/Commands.java +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP +<+>import java.util.HashMap;\nimport java.util.Map;\n\npublic class Commands {\n private Map courseList = new HashMap<>();\n private Map studentList = new HashMap<>();\n private Map teacherList = new HashMap<>();\n\n\n public Commands(Map courseList, Map studentList, Map teacherList) {\n setCourseList(courseList);\n setStudentList(studentList);\n setTeacherList(teacherList);\n }\n\n public Map getCourseList() {\n return courseList;\n }\n\n public void setCourseList(Map courseList) {\n this.courseList = courseList;\n }\n\n public Map getStudentList() {\n return studentList;\n }\n\n public void setStudentList(Map studentList) {\n this.studentList = studentList;\n }\n\n public Map getTeacherList() {\n return teacherList;\n }\n\n public void setTeacherList(Map teacherList) {\n this.teacherList = teacherList;\n }\n\n public void commandSelector(CommandEnum commandAction){\n String studentID = \"asdfasdf\";\n String courseID = \"asdfasdf\";\n String teacherID = \"asdfasdf\";\n switch (commandAction){\n case ENROLL:\n\n enroll(studentID,courseID);\n break;\n case ASSIGN:\n assign(teacherID,courseID);\n break;\n case SHOW_COURSES:\n ShowCourses();\n break;\n case LOOKUP_COURSE:\n LookupCourse(courseID);\n break;\n case SHOW_STUDENTS:\n ShowStudents();\n break;\n case LOOKUP_STUDENT:\n LookupStudent(studentID);\n break;\n case SHOW_TEACHERS:\n ShowTeachers();\n break;\n case LOOKUP_TEACHER:\n LookupTeacher(teacherID);\n break;\n case SHOW_PROFIT:\n ShowProfit();\n break;\n default:\n System.err.println(\"The command selected is not available\");\n break;\n }\n }\n\n public void enroll(String studentID, String courseID){ // This command will help enroll the student specified in the corresponding course. While also updating the money_earned of that course based on its price\n }\n\n public void assign(String teacherID,String courseID){ //This command will help assign the teacher specified to the corresponding course\n\n }\n\n public void ShowCourses(){ //This command will display a list of all courses\n\n }\n\n public void LookupCourse(String courseID){ // This command will display the full details of the specified course\n\n }\n\n public void ShowStudents(){ //This command will display a list of all students\n\n }\n\n public void LookupStudent(String studentID){ //This command will display the full details of the specified student\n\n }\n\n public void ShowTeachers(){ //This command will display a list of all teachers\n\n }\n\n public void LookupTeacher(String teacherID){ // This command will display the full details of the specified teacher\n\n }\n\n public void ShowProfit(){ //This command will calculate (The total money earned from all courses) - (The sum of all the teachers' salaries) and return the result\n\n }\n}\n\n +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +diff --git a/src/main/java/Commands.java b/src/main/java/Commands.java +--- a/src/main/java/Commands.java ++++ b/src/main/java/Commands.java +@@ -41,35 +41,44 @@ + String studentID = "asdfasdf"; + String courseID = "asdfasdf"; + String teacherID = "asdfasdf"; ++ + switch (commandAction){ + case ENROLL: +- + enroll(studentID,courseID); + break; ++ + case ASSIGN: + assign(teacherID,courseID); + break; ++ + case SHOW_COURSES: + ShowCourses(); + break; ++ + case LOOKUP_COURSE: + LookupCourse(courseID); + break; ++ + case SHOW_STUDENTS: + ShowStudents(); + break; ++ + case LOOKUP_STUDENT: + LookupStudent(studentID); + break; ++ + case SHOW_TEACHERS: + ShowTeachers(); + break; ++ + case LOOKUP_TEACHER: + LookupTeacher(teacherID); + break; ++ + case SHOW_PROFIT: + ShowProfit(); + break; ++ + default: + System.err.println("The command selected is not available"); + break; diff --git a/.idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24,_22_21_[Changes]1/shelved.patch b/.idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24,_22_21_[Changes]1/shelved.patch new file mode 100644 index 0000000..68ddf05 --- /dev/null +++ b/.idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24,_22_21_[Changes]1/shelved.patch @@ -0,0 +1,17 @@ +Index: .idea/.gitignore +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP +<+># Default ignored files\n/shelf/\n/workspace.xml\n +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +diff --git a/.idea/.gitignore b/.idea/.gitignore +--- a/.idea/.gitignore ++++ b/.idea/.gitignore +@@ -1,3 +1,6 @@ + # Default ignored files + /shelf/ + /workspace.xml ++/jarRepositories.xml ++/compiler.xml ++/encodings.xml diff --git a/.idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24,_22_22_[Changes]/shelved.patch b/.idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24,_22_22_[Changes]/shelved.patch new file mode 100644 index 0000000..5c602be --- /dev/null +++ b/.idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24,_22_22_[Changes]/shelved.patch @@ -0,0 +1,20 @@ +Index: .idea/.gitignore +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP +<+># Default ignored files\n/shelf/\n/workspace.xml\n/misc.xml\n/vcs.xml\n/homework-java-ironschool.iml\n\n\n\n +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +diff --git a/.idea/.gitignore b/.idea/.gitignore +--- a/.idea/.gitignore (revision 878ef3ff79760b86937e8a4f8753d19bad0f7e45) ++++ b/.idea/.gitignore (date 1710192118606) +@@ -1,6 +1,9 @@ + # Default ignored files + /shelf/ + /workspace.xml ++/jarRepositories.xml ++/compiler.xml ++/encodings.xml + /misc.xml + /vcs.xml + /homework-java-ironschool.iml diff --git a/.idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24,_22_29_[Changes]/shelved.patch b/.idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24,_22_29_[Changes]/shelved.patch new file mode 100644 index 0000000..84a018d --- /dev/null +++ b/.idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24,_22_29_[Changes]/shelved.patch @@ -0,0 +1,60 @@ +Index: .idea/.gitignore +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP +<+># Default ignored files\n/shelf/\n/workspace.xml\n +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +diff --git a/.idea/.gitignore b/.idea/.gitignore +--- a/.idea/.gitignore (revision ad4b7edd47241cca602d690cade7aefa428eba3a) ++++ b/.idea/.gitignore (date 1710192181630) +@@ -1,3 +1,12 @@ + # Default ignored files + /shelf/ + /workspace.xml ++/jarRepositories.xml ++/compiler.xml ++/encodings.xml ++/misc.xml ++/vcs.xml ++/homework-java-ironschool.iml ++ ++ ++ +Index: src/main/java/Course.java +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP +<+>\nimport java.util.HashMap;\nimport java.util.UUID;\npublic class Course {\n private String courseId;\n private String name;\n\n\n private double price;\n private double money_earned;\n private Teacher teacher;\n private HashMap courseList = new HashMap();\n\n\n public Course(String courseId, String name, double price, double money_earned) {\n setCourseId(courseId);\n setName(name);\n setPrice(price);\n }\n\n public String getCourseId() {\n return UUID.randomUUID().toString();\n }\n\n public void setCourseId(String courseId) {\n this.courseId = courseId;\n }\n\n public String getName() {\n return name;\n }\n\n public void setName(String name) {\n this.name = name;\n }\n\n public double getPrice() {\n return price;\n }\n\n public void setPrice(double price) {\n this.price = price;\n }\n\n public double getMoney_earned() {\n return money_earned;\n }\n\n public void setMoney_earned(double money_earned) {\n this.money_earned = money_earned;\n }\n\n public Teacher getTeacher() {\n return teacher;\n }\n\n public void setTeacher(Teacher teacher) {\n this.teacher = teacher;\n }\n\n public void courseEnroll(Student student, Course x){\n courseList.put(student.getStudentId(), x);\n }\n}\n +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +diff --git a/src/main/java/Course.java b/src/main/java/Course.java +--- a/src/main/java/Course.java (revision ad4b7edd47241cca602d690cade7aefa428eba3a) ++++ b/src/main/java/Course.java (date 1710192506278) +@@ -1,5 +1,7 @@ + ++import java.util.ArrayList; + import java.util.HashMap; ++import java.util.List; + import java.util.UUID; + public class Course { + private String courseId; +@@ -9,7 +11,7 @@ + private double price; + private double money_earned; + private Teacher teacher; +- private HashMap courseList = new HashMap(); ++ private List studentList = new ArrayList<>(); + + + public Course(String courseId, String name, double price, double money_earned) { +@@ -58,7 +60,7 @@ + this.teacher = teacher; + } + +- public void courseEnroll(Student student, Course x){ +- courseList.put(student.getStudentId(), x); ++ public void courseEnroll(Student student){ ++ studentList.add(student); + } + } diff --git a/.idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24__22_21__Changes_.xml b/.idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24__22_21__Changes_.xml new file mode 100644 index 0000000..475614f --- /dev/null +++ b/.idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24__22_21__Changes_.xml @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/.idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24__22_21__Changes_1.xml b/.idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24__22_21__Changes_1.xml new file mode 100644 index 0000000..3c04b6e --- /dev/null +++ b/.idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24__22_21__Changes_1.xml @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/.idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24__22_22__Changes_.xml b/.idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24__22_22__Changes_.xml new file mode 100644 index 0000000..2afb38d --- /dev/null +++ b/.idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24__22_22__Changes_.xml @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/.idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24__22_29__Changes_.xml b/.idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24__22_29__Changes_.xml new file mode 100644 index 0000000..1cba5e1 --- /dev/null +++ b/.idea/shelf/Uncommitted_changes_before_Checkout_at_11_3_24__22_29__Changes_.xml @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/src/test/java/Commands1to2Test.java b/src/test/java/Commands1to2Test.java index 157ed23..56d277a 100644 --- a/src/test/java/Commands1to2Test.java +++ b/src/test/java/Commands1to2Test.java @@ -1,12 +1,64 @@ -import static org.junit.jupiter.api.Assertions.*; - import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import java.util.LinkedHashMap; +import java.util.Map; + public class Commands1to2Test { + Map testCourseList = new LinkedHashMap<>(); + Map testStudentList = new LinkedHashMap<>(); + Map testTeacherList = new LinkedHashMap<>(); + Commands commandsInstance = new Commands(testCourseList, testStudentList, testTeacherList); + + private Student student; + private Teacher teacher; + private Course course; + + @BeforeEach + public void setUp() { + + // Create sample data and add it to the coursesMap + course = new Course("Math", 200.0); + testCourseList.put(course.getCourseId(), course); + + // Create sample data and add it to the teachersMap + teacher = new Teacher("Prof. Smith", 500.0); + testTeacherList.put(teacher.getTeacherId(), teacher); + + // Create sample data and add it to the testStudentList + student = new Student("John Smith", "123 Main St", "johnS@example.com"); + testStudentList.put(student.getStudentId(), student); + } + + @AfterEach + public void cleanUp(){ + testCourseList.clear(); + testStudentList.clear(); + testStudentList.clear(); + } + + @Test + public void enrollTest(){ + + commandsInstance.enroll(student.getStudentId(), course.getCourseId()); + + assertEquals(1, testCourseList.size()); + assertEquals("Math", testCourseList.get(course.getCourseId()).getName()); + } + @Test + public void assignTest(){ + commandsInstance.assign(teacher.getTeacherId(), course.getCourseId()); + assertEquals(1, testCourseList.size()); + assertEquals("Prof. Smith", testTeacherList.get(teacher.getTeacherId()).getName()); + assertEquals("Math", testCourseList.get(course.getCourseId()).getName()); + } } diff --git a/target/classes/Application.class b/target/classes/Application.class index 29ed71796b70f03808c1cc7636e61d790515a4a2..3d2489f2b641b48861bce4a9dbebfd3e77a66fa2 100644 GIT binary patch delta 4041 zcmZ`+3tZGy7XHpK!wka+$jBRVL=YKJ!^8(JuY8A$7NqB$JJ?g%=)cTU=WlOqYw$F*wECNy8|po6m$uh8 zv|QTejF3Vpvdj4{86!S*q*qS(IG0=?#mWm-%}EV&TNXSVUr>Ls|s(!QPtsoWWiv z=E`E1Tq3P%TXaVBr8FC3j4g4=WpcUtAUZ$tDp_Wit6dV1<;oK?TCPzwF$40ibID4{ z6gcW?TZ%7fuWfe1BK?i-2ABK+H*lu0wyklTzrMj(?LQ{gVauU zhFTsMktT?r;;*Z1o>AM{R6DP^p=#;khAKl43?8WRdZ$yXm)haZvkWmlb1m63)HZjP z8s&DWC*y{y*L#02L)E>pebicaAC4|jAGj}6i~1aS^t-rZ8S!sH?`md_r>(Bh?{D@r zwH0{8As-8pQs$hOx5(GxX=rWrw|e|_b?vRK4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5PA+y^|E*2qz^IK+!a+8QNWCdi+dWd zPn!7}6nG8gt4&sdr+=4HBOOT9KsvgDJF?41rb8IOjX9}ZN~{}`{9`SDR6gN*0@L?< z@_nkuV|x5dkDu%Dq#jS{@w6WQs>i?S@r)k-p~rve@!xv&aXen4j@*T%v{3>f5W0jcW$NS}~+;K_f4 z5UHRdDtJX|e^SMr>%3G|EzR=HoO5T6=hXY{x%Yp5`~#LYpwP{ zSU(OA+Z*-fVdy|$+{XlRkrFSwJf>{qd`zPdt%!_Q#H@`uAM;pW4OVOQ} zo-9i^628PEi9q71#IVG3iI)-?m+G$hSVyg&G6G>0=`LP0VK%ze5oC}A)Tlm{mMu8g zK#dG_qAZR2b1#tnj>%i(&xr&!sZa8rApJbHV6c9PM(uC|QMkg)Eriw^f9V^v;>Rj< zx3NRGOU)wRH?5^WFu7WZMw7Pe!pztuNeSFv=A>4S3En7%@_kF5SB@oUV{gSM>vkcSgm OF$T%^@re`$4juqIs9041 delta 566 zcmZ{h%TB^T6o&t4DTQfG8c2*93;|JWK@q|G1@Ve_TNq<_n!0h}&ZLRYA&>}>Xjr@O zA$$z_#~x}V ztP^D^sv$c_zhGvF+%u8DKFv|i3DOsF0FCukipn7q!s}yx2%+@aFa05{*r5tXI3_xQ zPaBi(PHE}L(7Bq5I^|8Tkm_NvO~3z@GSQ#|sZu~(100I1=o y#~6|f8;;UZy>Z4(Csa-{Z8@Pd)yH-hX>|+X193{A3=0?*Gl&A!ngi9cfpr)&SOD2fKx_%b uCJZ8z8<}+t{n&xZ7+4srz;f0MHb9z%!4^o`gGFo^9Dp45NSq12+Q?h{eFc zV8~zuq>X_bBL-$5i-BS4vlfovuqHUnaP2BFEj ln00j+SQyN~!WImcK$?ZY3P{?3MXVTXfixG`A|OM60|2iw6kq@V diff --git a/target/classes/Commands.class b/target/classes/Commands.class index c3c851f06523f73acf45c05488f166e4d4a7b111..e10cd34c46efe28094f671557080e77dbe87a8b4 100644 GIT binary patch literal 11782 zcmcIq3wTu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xhvtji5Hud@o>gktM#yiyOuQFJ7uh*l7)+@h>sG6519Y{lo1xNC8O9aCZuE)d!^>Qf8AVQv;t<17Bt~LEagOFEK$=OS}Y3@{1{Oeh78JzQNe5BKE1u>9%$jOsoy{B7kkaZzOP^BekTpc*g?qaSxtc- zVr-gZ1*@JBQpCTQDQ1Ex;onP?vfA+xdl{>lfZmNd?aahDnXgj~VY>So!EoBl3c!Sj zN)%W816BOfsaK|bPTBKnigGc>xi-ElZIsqe<{>U?#S{R0%W`B^nvq#4Q;|9#9>f_c zRC6^d)p^T3TeYx{f4wvmhpIj0V2-4@9Mn0^<8U-N@QHP<6n2Ny&$<{(Lf+%r)!W=S{$sac)k*dK&Dhd*5BauZz5~&_c zq_QB9_Nsuoqa&#aMBfVIf+J~#>V!`B8key|vo-a%cA&9W;dV__rE8wo<#^V8>c5e4 z0t*WvSzZJdAp2P%vKN!=B?ZYIs>$-Uu>e`d+@aBSlWe>o*+xy4x0(gW78JrsBztl} zvPKBJIxRr9Aljoz_LzcX4O(8&79d+twg;2!tb$~XY*s~~d9i+8s-KtZ=au?-wSHc!pV#T<4f=Vbe%`E~x5)iOI~GOyHV0LH{$0Wn P=_@UhE%Kl|j4}TUi0e%p diff --git a/target/test-classes/Command9to10Test.class b/target/test-classes/Command9to10Test.class new file mode 100644 index 0000000000000000000000000000000000000000..0c4ab9ff6ba219e8d90634b9c74c5f0f3bfd5f6d GIT binary patch literal 3871 zcmb7H`&$&(8Ga8Svy3B{6-gA0D^+eLEEs*FpoUAZU>7t2*U&UghTS6!?9OavW>tDi zpY)d4rs=)u{eDmH0$$qm{!4%EU(i3KPv0{$yE`aY%k%7<+jqY2{qBc<{^#~P07mc+ z9d)SJ&|qL28U=PPnODqo!L%3B=jWGX&KGDrW!aX0MxegCC#xYL@Nhs>_N_uXW7*3x zKVf={Q)WqrhWaLKhoNDIfo8Oj;h0k_ns)xA?+o zd$LN*J_GylC{@UXDtME&=bLs;3h0@Nlpzf%f&GC3mXjV`@#To?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X z)Z;v*EN6d}GvHEl&<4K`=(YjBh0j5_aF!_}MkKn>1bvH@%Uc0O8n<0$swIGg&D z=*5WuLR-i>f^dMY_yyi3hzgir24H^m0AM~E1M}+rz?>$SVS*VWn6m^kK`@j52bf=1 z!Mqk(W>}enKl3r4 zucP#(N+T7r`Yn7_;CJ{s6QmX)%`_rlF>DJ=zG5K72=Ck#nCebF@2lkfJ#KJp=Ij<} USA*|5{=_|<>p$bK_&fIe7uP=Dc>n+a literal 0 HcmV?d00001 diff --git a/target/test-classes/Commands1to2Test.class b/target/test-classes/Commands1to2Test.class new file mode 100644 index 0000000000000000000000000000000000000000..8a5e56add0d936a5be3725742b5c91ed44fb7aa2 GIT binary patch literal 2493 zcma)7Yg5}+5IvWdj1hr2gfu{TBn>en#Q_ouHBbm7jj4eY6Q}N5*aAds$w+dNrjPX9 ze(x{oG(c!)I{n-q)#BJa0I<&;~> z>82~ST|76SoAK4@H(a zES4DX@oFG`p5s-f0!g*?K&0Re0VN1|2or>K-?r9=dQ$~Ml72oDkRC(74B@njw=lyi zuAe1=#$<4t#Kv%2#hfIjl2{;5GJ3-ns{Mr^CZ*UGVIxVjzFibibKadg`?EYo42HE(lgyQJm0t&b)W zzV%HN2DWIHnGoo&#&vQz$lA=SC`kGWFD_{XU1G8%pyCmFC)Zh8#>Q6Rc(EZuW5bly z!2mU;xYpc~O~%&_KibJ-QW(6M>A1l4|JN>O@s#T2!jerBY!{w^y~b zJSCB&mDTcT%{Jsd5Z1Yy2BRIRbd7Q|q@{XCcONiT7gtKAYZUaf;TXI*Ynqm;1zEe4 zJU+9x^>xeE@2~;VkRr>>l&1PlP@i3ANd($qzXbh`+;zeQc}mM+KPA3yIK{q{)$baT z?fG&WEE5`%{RVw}`ZeqX3P1h}K%m4`4IXo3SFh}!aL-O&*+1o;E!WfKoAYM&4{v6B zQYf*rxrSOr)<3m-ldG2hqS) zbQjmTjPBz`Egn*7EE5@T!<&1U+#zz};5W64Svggd<};DIk$aJaJtTLq%p-|-c^4@; z`C13SyS+$v5Nam@cjFe{G)4hTFa2^qz&Ju=@^$gEH%iFVOVcpqs2 z>H6^Ez;A@10-|Wd0P{LX@7Jn)bsh2bt>^2ziZ2(np08=T=#;d4b~0YO$kh1=J`#8d zEz&1<{N&+2Hfrz}dUo;XCCsB}Zm^<8$bFQ_x><#0`UsluJv2X5(EJjhkrg7*1R3$s vY#&B5&hv8C0yJa0aEazrK>a$KAka90P7>%8|0$-cz-EpG`y(OO;HQ59c63E; literal 0 HcmV?d00001 diff --git a/target/test-classes/Commands3To8Test.class b/target/test-classes/Commands3To8Test.class new file mode 100644 index 0000000000000000000000000000000000000000..8b969ae7bab2f28297b3a059d2d252af1b6eadde GIT binary patch literal 6255 zcmcgwi+dE+75`1LWY=W^A&Jod%BrY@M-m7qYywRPp#(QbO&Sb{GVBh?!0t@godqJk z>ZA2lsOaaT3Sw=2)K=>&OA@uTwXI@nYv1obrC)z{=FaSF+)%!+ekETf_ug~wIp_Y) z@1Aon=l(tU0e~+2D~bwKh7nRR3snkg_G^cVw9zQSsJsZXp@vbdVh-j~VYijZXl5$cHejtC&~sEc z$L61IE1%8j2}2CbO%xSUO}kJrPerX*KUYldxAQ68w8d;8t5^+k5k@noxyVP*svy*-*&|h*L!<)#MX>^_ zg(GVeG)Nr|6Sxb*9B$tvyjX$jRjkE21+#~B8O7d|g8C&*E~dd1v(b)@FxIQsfG;Vi zE(tRUMT8Wr4VrRE*B($MM}perPy}5H!u?4@XH2R(_nvij5kU_}w~!82cC4z?a0a=z z2K1`fDmXs7f5bZMqL8blIH95s+eqt-c0lj8%%o=TFzgYwM7Zsof~`RpB^m)2XB-JS zEhh;sY*+CWfndb8+|eldF%ZUARSaT>f|!*ZZrPvbspEIlu=Q+kZyZa#Ff?N@S+pXeO0oSZ#TGz4yz&$E7 z?4|L9WgWpdFrA_AtM-RDp*&>$_2%Mq)lN|#X$kNO43SqdQ%Y)y2w_|)Ln=2 zl&@-A?b@gL2oCe8I}Z0}$cPBW=wa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+Y!S-DB1blf8-Vz%##zh8apM`>^cHTW z17hg}Zc$L&*h;|(IzfxY+te zy~EWanD6p0Fz#bIBr%=%|6(ct9mj0~UV*D@I`FbR4esQH!M&Bt2G$Vn>j?KcLK7!= ze5&*31`=wBAnxaX4&|{C_n;e(Vl!V2UnZ1Wc%|Dcb12?rYw^O3GEI-yOZf<7g})(0o_f|Ze{B>WRQf7 zeS~)yV;CVX4Zh3{5MmQgk>jVy@gl4*_^>`BVZDMuIfDr@c>^^~vQ+xs-#{`q>2*Yuo$&{U_#}kwZBG(bE<35ood$Jx+Q|9ov zPQZ1%l*iu|%ETf^Hpw(uHY3-S4=jtavb;FEY^1`+O?{0ZUzlqK#n7OUR{053=qSCixd zW`%l>QIi0?hd~oCS5mh};*(`bTuHm)GV&qqf+e?#HWd8A`F`Yl&pF>;Ip0s6?{D!J P&W&>3U-5VR6OI1?2MUaV literal 0 HcmV?d00001 diff --git a/target/test-classes/CourseTest.class b/target/test-classes/CourseTest.class new file mode 100644 index 0000000000000000000000000000000000000000..d6bbb01f1ffb2dd45da1c463f6d0b0e9a0658747 GIT binary patch literal 938 zcmZ{i+iuf95QhIvlQ=QXv7t0jpe=_c0cuWnsesUwt56Uvk+?zHm?haLv4g$ly^w%b zAn^b^6k^u4nkW=sjCW>tzxiiofB*UM3qS{tO{B15AZ;OoEJJzBKXZG+-J$(zFcywt z$nHs3swWI9jb`6Kjw1VB=m#PPlOg?*t5NpZd!o^2!az}@N(^g_-W+zMeCZC`-DW?J z3aSQHE!1$4!HikQBG9Rv2+WY{#o@LFUb3)`I)gD3>X1(bL#@&Lmu=z-HVj;~a1GZP zHa&l6k3*79b|#hZZ9bEBCkTYEq~`_<7LS~RPa&U>yR#@buD-pHCW$orTGN(=ZQLNC zr0KOU9TG+D>1qwPw1C?TnMRk&r4H?TA85POldd=nrvu?1^TC87)t=|@NuT>t`$;gZ zMp8>l8ld~qCRQNS+ZjXsP3S5)6@3{n z8~-_;WX#WWRq Date: Tue, 12 Mar 2024 20:56:25 +0100 Subject: [PATCH 49/50] Fix of application tests --- src/main/java/Application.java | 22 +++++++++++++--------- src/main/java/Main.java | 1 + src/test/java/ApplicationTest.java | 26 ++++++++++++++++---------- 3 files changed, 30 insertions(+), 19 deletions(-) diff --git a/src/main/java/Application.java b/src/main/java/Application.java index 82e25a7..e2c1314 100644 --- a/src/main/java/Application.java +++ b/src/main/java/Application.java @@ -8,9 +8,13 @@ public class Application { private Map courseList = new HashMap<>(); private Map studentList = new HashMap<>(); private Map teacherList = new HashMap<>(); - private static final Scanner scanner = new Scanner(System.in); + private final Scanner scanner = new Scanner(System.in); public Application() { + + } + + public void SetUp(){ createSchoolName(); setTeacherList(teacherDetails()); setStudentList(studentDetails()); @@ -47,7 +51,7 @@ public void run() { Selector(commands); } - public static void createSchoolName() { + public void createSchoolName() { System.out.println("Welcome to the School Application"); while (true) { try { @@ -66,7 +70,7 @@ public static void createSchoolName() { } } - public static int numberOfComponents(SchoolComponents schoolComponents) { + public int numberOfComponents(SchoolComponents schoolComponents) { int number; do { @@ -92,7 +96,7 @@ public static int numberOfComponents(SchoolComponents schoolComponents) { } - public static Map teacherDetails() { + public Map teacherDetails() { Map teachersMap = new HashMap<>(); int number = numberOfComponents(SchoolComponents.TEACHERS); scanner.nextLine(); @@ -113,7 +117,7 @@ public static Map teacherDetails() { } - public static Map studentDetails() { + public Map studentDetails() { Map studentMap = new HashMap<>(); int number = numberOfComponents(SchoolComponents.STUDENTS); scanner.nextLine(); @@ -134,7 +138,7 @@ public static Map studentDetails() { - public static Map courseDetails() { + public Map courseDetails() { Map coursesMap = new HashMap<>(); int number = numberOfComponents(SchoolComponents.COURSES); scanner.nextLine(); @@ -155,7 +159,7 @@ public static Map courseDetails() { } - public static void Selector(Commands comandos){ + public void Selector(Commands comandos){ while(true) { Scanner scanner = new Scanner(System.in); System.out.println(("Do you want to use a command? (y/n)")); @@ -221,7 +225,7 @@ public static void Selector(Commands comandos){ } } - public static String validateInput(String fieldName, String emptyErrorMessage, String invalidErrorMessage) { + public String validateInput(String fieldName, String emptyErrorMessage, String invalidErrorMessage) { String input = ""; while (true) { try { @@ -241,7 +245,7 @@ public static String validateInput(String fieldName, String emptyErrorMessage, S } } - public static double validateDoubleInput(String fieldName, String errorMessage) { + public double validateDoubleInput(String fieldName, String errorMessage) { double input = 0; boolean validInput = false; while (!validInput) { diff --git a/src/main/java/Main.java b/src/main/java/Main.java index fc43032..25a847f 100644 --- a/src/main/java/Main.java +++ b/src/main/java/Main.java @@ -1,6 +1,7 @@ public class Main { public static void main(String[] args) { Application application = new Application(); + application.SetUp(); application.run(); } } diff --git a/src/test/java/ApplicationTest.java b/src/test/java/ApplicationTest.java index 9c8ed47..6838dc8 100644 --- a/src/test/java/ApplicationTest.java +++ b/src/test/java/ApplicationTest.java @@ -15,31 +15,36 @@ class ApplicationTest { private final InputStream originalSystemIn = System.in; private final PrintStream originalSystemOut = System.out; private final ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); - private final String input = "Ironhack School\n"; + private ByteArrayInputStream input; + Application application; @BeforeEach public void setUpStreams() { - System.setIn(new ByteArrayInputStream(input.getBytes())); System.setOut(new PrintStream(outputStream)); } @Test public void testCreateSchoolName() { - Application.createSchoolName(); - assertEquals("Welcome to the School Application\r\nPlease enter the name of the school:Your school is: Ironhack School\r\n", outputStream.toString()); + input = new ByteArrayInputStream("Ironhack School\n".getBytes()); + System.setIn(input); + + application = new Application(); + application.createSchoolName(); + assertEquals("Welcome to the School Application\nPlease enter the name of the school:Your school is: Ironhack School\n", outputStream.toString()); } @Test public void testNumberOfComponentsWithValidInput() { - ByteArrayInputStream input2 = new ByteArrayInputStream("5\n".getBytes()); - System.setIn(input2); + input = new ByteArrayInputStream("5\n".getBytes()); + System.setIn(input); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); System.setOut(new PrintStream(outputStream)); - int result = Application.numberOfComponents(SchoolComponents.TEACHERS); + application = new Application(); + int result = application.numberOfComponents(SchoolComponents.TEACHERS); assertEquals(5, result); assertTrue(outputStream.toString().contains("In your school there are 5 teachers")); @@ -49,13 +54,14 @@ public void testNumberOfComponentsWithValidInput() { @Test public void testNumberOfComponentsWithInvalidInput() { - ByteArrayInputStream input2 = new ByteArrayInputStream("invalid\n5\n".getBytes()); - System.setIn(input2); + input = new ByteArrayInputStream("invalid\n5\n".getBytes()); + System.setIn(input); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); System.setOut(new PrintStream(outputStream)); - int result = Application.numberOfComponents(SchoolComponents.TEACHERS); + application = new Application(); + int result = application.numberOfComponents(SchoolComponents.TEACHERS); assertEquals(5, result); assertTrue(outputStream.toString().contains("In your school there are 5 teachers")); From c8375762f33dbaeb67bc0d4b9e8abbe0acb462c9 Mon Sep 17 00:00:00 2001 From: Xavi Soria Date: Wed, 13 Mar 2024 19:27:29 +0100 Subject: [PATCH 50/50] add normal tests --- .idea/codeStyles/Project.xml | 7 ++ .idea/codeStyles/codeStyleConfig.xml | 5 ++ .idea/misc.xml | 1 + .idea/vcs.xml | 6 ++ src/test/java/ApplicationTest.java | 91 ++++++++++++++++++++++ target/classes/Application.class | Bin 11581 -> 12053 bytes target/classes/Main.class | Bin 453 -> 479 bytes target/test-classes/ApplicationTest.class | Bin 2532 -> 4968 bytes 8 files changed, 110 insertions(+) create mode 100644 .idea/codeStyles/Project.xml create mode 100644 .idea/codeStyles/codeStyleConfig.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..919ce1f --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index fdc35ea..de4b033 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -7,6 +7,7 @@ + diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/test/java/ApplicationTest.java b/src/test/java/ApplicationTest.java index 6838dc8..a032f48 100644 --- a/src/test/java/ApplicationTest.java +++ b/src/test/java/ApplicationTest.java @@ -69,6 +69,97 @@ public void testNumberOfComponentsWithInvalidInput() { } + @Test + public void testValidateInputWithValidInput() { + input = new ByteArrayInputStream("Ironhack\n".getBytes()); + System.setIn(input); + + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + System.setOut(new PrintStream(outputStream)); + + application = new Application(); + + String result = application.validateInput("Name", "Name cannot be empty", "Name cannot contain numbers"); + + assertEquals("Ironhack", result); + } + + @Test + public void testTeacherDetail() { + input = new ByteArrayInputStream("1\nJohn\n3000\n".getBytes()); + System.setIn(input); + + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + System.setOut(new PrintStream(outputStream)); + + application = new Application(); + + Map result = application.teacherDetails(); + + assertNotNull(result); + assertEquals(1, result.size()); + + Teacher teacher = result.values().iterator().next(); + assertEquals("John", teacher.getName()); + assertEquals(3000.0, teacher.getSalary()); + + assertTrue(outputStream.toString().contains("John")); + assertTrue(outputStream.toString().contains("3000.0")); + } + + + + @Test + public void testStudentDetail() { + input = new ByteArrayInputStream("1\nJohn\nCasa\ndsdad@fds.com".getBytes()); + System.setIn(input); + + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + System.setOut(new PrintStream(outputStream)); + + application = new Application(); + + Map result = application.studentDetails(); + + assertNotNull(result); + assertEquals(1, result.size()); + + Student student = result.values().iterator().next(); + assertEquals("John", student.getName()); + assertEquals("Casa", student.getAddress()); + assertEquals("dsdad@fds.com", student.getEmail()); + + assertTrue(outputStream.toString().contains("John")); + assertTrue(outputStream.toString().contains("Casa")); + assertTrue(outputStream.toString().contains("dsdad@fds.com")); + } + + @Test + public void testCourseDetail() { + input = new ByteArrayInputStream("1\nEnglish\n3000\n".getBytes()); + System.setIn(input); + + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + System.setOut(new PrintStream(outputStream)); + + application = new Application(); + + Map result = application.courseDetails(); + + assertNotNull(result); + assertEquals(1, result.size()); + + Course student = result.values().iterator().next(); + assertEquals("English", student.getName()); + assertEquals(3000.0, student.getPrice()); + + + assertTrue(outputStream.toString().contains("English")); + assertTrue(outputStream.toString().contains("3000.0")); + } + + + @AfterEach public void restoreSystemInputOutput() { diff --git a/target/classes/Application.class b/target/classes/Application.class index 3d2489f2b641b48861bce4a9dbebfd3e77a66fa2..e676d3cde7c8fbddb7a4879c8d5c8b549eacd032 100644 GIT binary patch literal 12053 zcmb7K3t&{m)&9$SgomJ3mt-L;o85GGqw?3j zZPk`)TdftVwzaKTYb$~-FQ09F)M{&MZELkp`);j$`L|Mp|2uQd(d#Ggm}2J?+uH5P~QvLpkgqDr}6vNJ071zP?1fE1Hd`l7diIsz05H zwZ$_Wa%9`U2<*L3dycXZHr+DW{_a>ZtCU)Ql8w=(J{ya6^~BOzAHAqm~Do4#pw>OO>=C_ z%@5T%AZ%?q%f@`|RpFrJ>C|Xrp?0d^{7nTYEi4vDB#5&GR#U3CH=69u=s-(tEHeXb z^^$8#vyB$R7+VI-ey)ub`6kaALs){9ip+U}GX}4Akf;W|IZgVd=*a4HJek)K3+n_EH^dTMsoq#5n~G$6Vi5<{h)3H) z*nkUy*l1%DE~I)GWv9A%hNAlP>A(rqM|Vxe>ZpzJRbUcs_OD)8(rw;qLZ;JX-vtO;H11}d1ne?3$_N)V8L zS3-t$wV6~lvN;yntYbEeyYP(O5VoOD0lqLyrCM zWR@0k`fvhskoT@Eh|BZBH`N8!Lg>epHnyvHLR7={SSAzQ8Vf^^wr~~MUXi*YLS5b- znUaY_(}bFiCl-k(y<(53&1|PEVVWXR|G#R{BFttc8qLIs^iFkJ;+26aFYC={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M;V*1=Y{kQ=-`#^7UH+zMr!FMe2KC4e(cFP))LHdbhL_&^%d<{9n{Rj z@`%>V1&(H}ayiyL@~ESkJI86prg}_khEyy>3TP&j)lAm0ZlPxQdlEYbcy3~ErbyXx z2t7UfWcq%oYNsB`>HYW73Ll`=?c>$!gLsx# zzRzJl?>P_P1&rdiID{ARFkZ$Zc#Wy!bv%y4yyF!n8ZVxZQamY>nQNxuX_RuOK)kEIhok@fhQ^zgn^l~9Z5)7SHg{&A*)B2t#f zSLJK8rc&u(9^T9~SMtU~l~o>PU-EU9RknSe!Ak!qp7f)K#fg;U{vC#~$}bT!@NYU< ziTZtkQ>e`5us%+?t6X9#HP(#EPUWFa{nb&Y>#wP*{;D07I4Fs}M{9z6v?{9V%B6oq zlD9w;%y$vIlp{!w$l#vw1aELRci3HoD@?iW8L-*<%ifMPf%j& z-!6HQkh1+<@=Yy8FMs6n6rmzr!Aybg2)vZwT+3?qlbI44iYjkZvGXbiE9T#h$)Tci zywkjU&^A$S2jm?g?>XLilW)EiL6VWe7N4@(W8ZG{@3q!7{T+u5y-cR~!GJ zivLLsy-qj%7byopkz`S0aiveu z6hDFBFeX*{SksLWEotuFe*@(&ah$})3e`E0+AuqQ8tL6KId^D}|~ysG4fgbXdG zTK-~``+&)Ql)ixqKRoipKC`T;j{-N!YKP&k8<7uOqVS6vy{e(o>$Dh34R+I# zMxSn?26QK*(x;nd78dGCd&1o2ZiD=YF-o0ntd}1X^3Y7z%1_8@5sh@A{FIQFrS5e3 z86lq*+Z8B2Mn|T9l?pdX9zJfP7d<$^Ns1e@2BHr}3M0TQT-Qh@`;YqlXZ?OzzhBkwzv}nj^!p$B f{knetTfhI~QM{;M%{_yMJl^6GkI&=xl%Vpz?OSMX diff --git a/target/classes/Main.class b/target/classes/Main.class index 8ba5aa62e1ae3aaa59a185f9412c49595e65c6c6..1e793e350e6e9b776a05f691616fd7c1b8ea630b 100644 GIT binary patch delta 207 zcmXAiO%4G;5QSe)>*<+JV}2OM?*XhF!QN&f7Pb;w5n=5N6DP4DLF{Z?!cD|$7WJy$ zOVw9T`IhGOxjq0)Ff2`xtJ!Kd-xz4rEb8zDJEY8< z1FJ!`zgeM)j4nhAZMVz0;H_iCH|WI$;dFF{VO38IJvdN;3RNOtw|o;3?V#EJ5IH(@ P0kK{5h!xO%1|9}qbhH$G delta 198 zcmYL?xedZl5Jcbi$M}$K?wbM-1g?P)iG+|Q2oS{7;8IAi1c;1;Cg=n)9|r_GqnX*A zecPvvU!Us(STZf*O}UD%My#YXJUOU(HfH-#=n(-J1t0&O}{ y5nXz6-0@0ft~9+7Y)hi`;zIl{$*>A7AvKbjp1QVvbs-)|g>r|C)Mpq=drZE>dJ*mb diff --git a/target/test-classes/ApplicationTest.class b/target/test-classes/ApplicationTest.class index da606e67764ff2a028aa38fccbd5c9645ed294ee..e36170c7fb028493a3f97dcd582a152eb1812dbb 100644 GIT binary patch literal 4968 zcmcIn33n6M8NFjWNFD~;D28A{KrAJeO)!L-Ha2!F3)9FkhG1iANJ_`j*d8L!2+fFM znuVlk(uVA5(j+aor8yzp6Y7nSrhA&E``&cl(tY^{J-u&cB#pcr8qVp_(df-vzVCkb zyYIbEum0zSmjFcZZy6;h4WLZHC0HP#>X3RwZAhucP{Xc)Lt4U?uwa{R=yt1w(%ML0 zIf5t;Kvu92O40P5QOnjwB$Viege6^$9o=k*8|kdwV`nsVq`4dws0^S=!D6wvGMY}O z^n_~brqQcebX8?$^da3)Q?9YNA>3W6pc+f)-pq1J!Se2mZul)&$mCZh(W0^b!1R$`R|h2HX`5?18{nsa$`0IMZjnsecUCL@fs zg4}fyYHIUV{JxtbeKO-*ui#45l5b11IV@pWVY<&CX9rLxVMWea9*~dfAU2TAc*Zn_ z)x^!=p2Vl-(0$C#SR5;bEKT0=xoi6y;~j8f{05P+^3}y=7<)y&9FVJdDMh`M&#Wo zO|`VJX4qQBnPYHq*c^1)mP2JzznRU1-F8^Fn!>ZGuEF&Ry0DX^+9o%E!*6wM#O2D_ zVQ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