Skip to content

Commit 61c36b2

Browse files
author
AmiyahJo
committed
feat: adds more member variables
fix: illegal start expression in checkReadiness , and boolean verifyIsSuccessful feat: adds final to variables
1 parent 7964aad commit 61c36b2

File tree

1 file changed

+41
-7
lines changed
  • lesson_16/objects/objects_app/src/main/java/com/codedifferently/lesson16/amiyahjones

1 file changed

+41
-7
lines changed

lesson_16/objects/objects_app/src/main/java/com/codedifferently/lesson16/amiyahjones/jobReadinessLab.java

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
import java.util.ArrayList;
44

55
public class JobReadinessLab {
6-
private int mentorSession;
7-
private String teacherAssistant, socialSupport, jobTutor;
6+
private final int mentorSession;
7+
private final String teacherAssistant, socialSupport, jobTutor;
88
private boolean isSuccessful;
99
ArrayList<String> students;
10-
private level readinessLevel;
10+
private final level readinessLevel;
1111

1212
enum level {
1313
BEGINNER ,
@@ -24,15 +24,49 @@ public JobReadinessLab(String teacherAssistant, int mentorSession){
2424
readinessLevel = level.BEGINNER;
2525
}
2626

27-
public Boolean verifyisSuccessful() {
28-
if (!isSuccessful){
29-
System.out.println("At least you got to know what software engineering is like!");
27+
public String checkReadiness() {
28+
return (readinessLevel == level.INTERMEDIATE) ? "Ready for job applications!" : "Needs more training.";
29+
}
30+
31+
public Boolean verifyIsSuccessful() {
32+
if (isSuccessful){
33+
System.out.println("Congraulations! You made it through your journey!");
34+
} else {
35+
System.out.println("At least you got to know what software engineering is like!");
3036
}
3137
return isSuccessful;
3238
}
3339

3440
public int getStudentCount() {
35-
return students.size();
41+
int count = students.size();
42+
System.out.println("Total students enrolles: " + count);
43+
return count;
44+
}
45+
46+
public void addStudent(String studentName){
47+
students.add(studentName);
48+
}
49+
50+
public void printStudents() {
51+
for (String student : students) {
52+
System.out.println(student);
53+
}
3654
}
55+
56+
public int getMentorSession () {
57+
return mentorSession;
58+
}
59+
60+
public String getTeacherAssistant() {
61+
return teacherAssistant;
62+
}
63+
64+
public String getSocialSupport() {
65+
return socialSupport;
66+
}
67+
68+
public String getJobTutor() {
69+
return jobTutor;
70+
}
3771
}
3872

0 commit comments

Comments
 (0)