Examples of the application processing are given below. The user's inputs are highlighted in green colour....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Examples of the application processing are given below. The user's inputs are highlighted in green colour. 1. Display all students 2. Display all subjects 13456 Display all enrolments 3. 4. Find a student 5. Find a subject 6. 7. 8. Find a student's enrolments Add an enrolment Exit Please select one from the menu: 1 100100, Albert, 13/10/1965, a100@uni.edu.au, 12 Robert street Woonona NSW 2517, 12345678, Bachelor of CS, [Artificial Intelligence and Big Data, Cyber Security] 100110, Alvin, 13/10/1977, al10@uni.edu.au, 56 Marlo road Wollongong NSW 2500, 11223344, Bachelor of CS, [Artificial Intelligence and Big Data, Cyber Security] 100120, Alice, 17/06/1973, a120@uni.edu.au, 43 Collaery road Russell Vale NSW 2517, 12345677, Bachelor of CS, [Artificial Intelligence and Big Data, Cyber Security] 100150, Bob, 02/07/1960, a150@uni.edu.au, 23 Kendall street Wollongong NSW 2500, 12345688, Bachelor of CS, [Artificial Intelligence and Big Data, Cyber Security] 100200, Carl, 02/02/1967, c200@uni.edu.au, 44 Mount Keira road West Wollongong NSW 2500, 21345687, Bachelor of IT, [Artificial Intelligence and Big Data, Cyber Security] 100250, Douglass, 14/04/1983, d250@uni.edu.au, 78 Uralba street West Wollongong NSW 2500, 010123456, Bachelor of CS, [Artificial Intelligence and Big Data, Cyber Security] 100101, Peter, 13/11/1976, p101@uni.edu.au, 77 Gipps road Wollongong NSW 2500, 0102123456, Bachelor of IT, [Artificial Intelligence and Big Data, Cyber Security] 100103, Ami, 12/09/1985, a103@uni.edu.au, 51 Mackie street Coniston NSW 2500, 0242211234, Bachelor of IT, [Artificial Intelligence and Big Data, Cyber Security] 100107, Wendy, 12/09/1988, w107@uni.edu.au, 41 Wall street Wollongong NSW 2500, 0281234567, Master of CS, Coursework 100109, Michael, 12/09/1990, m109@uni.edu.au, 112 Smith road Wollongong NSW 2500, 0242201234, Master of CS, Coursework 100125, Angela, 20/11/1990, a125@uni.edu.au, 23 Gibsons road Figtree NSW 2525, 0201123456, Master of IT, Coursework 100105, Robert, 15/01/1986, r105@uni.edu.au, 66 Risely road Figtree NSW 2525, 0202213123, Master of IT, Coursework 100136, Aban, 15/01/1990, a136@uni.edu.au, 187 Princes Highway Wollongong NSW 2500, 0103123456, Master of Philosophy, Research 100187, Eadger, 07/04/1986, e187@uni.edu.au, 73 Ocean street Wollongong NSW 2500, 0104123321, Master of Philosophy, Research Display all students. Display all subjects. 1. 2. 3. Display all enrolments 4. Find a student 5. Find a subject CSIT 121/821 Object Oriented Desion and Programming 6. Find a student's enrolments 7. Add an enrolment 8. Exit Please select one from the menu: 2 CSCI213, Java Programming & Object Oriented Design, 6, This subject provides an introduction to the Java language and some of its standard class libraries, you will have experience with object oriented design and implementation techniques, CSCI124 or CSCI121 or CSCI192, 3, 2 CSCI124, Applied Programming, 6, This subject develops a thorough understanding of program design using data structures. It extends CSCI114 and presents pointers, dynamic memory management and exception handling, CSCI114 & CSCI103 or CSCI111 & CSCI103, 4, 2 CSCI235, Database system, 6, This subject investigates three major areas of modern database systems: 1. design of relational databases 2. programming of relational databases, CSIT115, 3, 2 CSIT115, Data management and security, 6, The subject investigates three major areas of modern data management systems: data modelling, data processing, and data security.,, 2, 2 CSIT111, Programming Fundamentals, 6, The broad aim of this subject is to develop in students an understanding of the fundamental principles of programming.,, 2, 2 CSIT121, Object oriented design and programming, 6, The aims of this subject are to consolidate and extend student's knowledge and skills in structured programming and to develop their understanding and practice of object oriented programming., CSIT111 OR ENGG100, 2, 2 CSCI251, Advanced programming, 6, This subject develops a thorough understanding of advanced programming features, and how to implement them in modern C++., CSIT121, 3, 2 1. Display all students. 2. Display all subjects. Display all enrolments 3. 4. Find a student 5. Find a subject 6. 7. Find a student's enrolments Add an enrolment 8. Exit Please select one from the menu: 4 Input a student number: 123456 The student 123456 does not exist. 1. Display all students. 2. Display all subjects 3. Display all enrolments 4. Find a student 5. Find a subject 6. 7. Find a student's enrolments Add an enrolment 8. Exit Please select one from the menu: 4 Input a student number: 100100 100100, Albert, 13/10/1965, a100@uni.edu.au, 12 Robert street Woonona NSW 2517, 12345678, Bachelor of CS, [Artificial Intelligence and Big Data, Cyber Security] 1. Display all students. 2. Display all subjects 3. Display all enrolments 4. Find a student 5. Find a subject 6. Find a student's enrolments 7. Add an enrolment 8. Exit Please select one from the menu: 5 Input a subject code: CSIT111 CSIT111, Programming Fundamentals, 6, The broad aim of this subject is to develop in students an understanding of the fundamental principles of programming.,, 2, 2 1. Display all students. 2. Display all subjects 3. Display all enrolments 456 4. Find a student 5. Find a subject 6. Find a student's enrolments 7. 8. Add an enrolment Exit Please select one from the menu: 5 Input a subject code: CSIT222 The subject CSIT222 does not exist. 1. Display all students. 2. Display all subjects 3. Display all enrolments 4. Find a student 5. Find a subject 6. 7. 8. Find a student's enrolments Add an enrolment Exit Please select one from the menu: 7 Input a student number: 100100 Input a subject code: CSIT111 A new enrolment for the student 100100 on the subject CSIT111 has been added to the list. 1. Display all students. 2. Display all subjects 3. 4. 5. 6. 7. Display all enrolments Find a student Find a subject Find a Add an enrolment student's enrolments 8. Exit Please select one from the menu: 7 Input a student number: 100100. Input a subject code: CSIT121 A new enrolment for the student 100100 on the subject CSIT121 has been added to the list. 1. Display all students 2. Display all subjects. 3. Display all enrolments 4. Find a student 5. Find a subject 6. Find a student's enrolments 7. Add an enrolment 8. Exit Please select one from the menu: 6 Input a student number: 100100 100100, CSIT111, 26/07/2022 100100, CSIT121, 26/07/2022 1. Display all students. 2. Display all subjects Display all enrolments Find a student 3. 4. 5. Find a subject 6. Find a student's enrolments 7. Add an enrolment 8. Exit Please select one from the menu: 3 100100, CSIT111, 26/07/2022 100100, CSIT121, 26/07/2022 1. Display all students. 2. Display all subjects 3. Display all enrolments 4. Find a student 5. Find a subject 6. Find a student's enrolments 7. Add an enrolment 8. Exit Please select one from the menu: 8 Bye Tasks Task 1 (2 marks): Complete the UML class diagram of this program. The class diagram shall ⚫ contain at least the classes mentioned above; ⚫ contain the class name, fields, and methods definitions for each class; 11- ⚫ use correct and sufficient UML notations; ⚫ specify the associations between classes; • specify the multiplicities for both sides of the associations. CSIT121/821 Object Oriented Design and Programming 9/ Task 2 (6 marks): Implement the system according to the UML class diagrams. The program shall be consistent with the UML class diagrams; ⚫ follow the conventions for naming all classes, variables, and methods; ⚫ provide sufficient comments; use proper blank spaces, indentation, and braces to make your code easy to read and understand; follow the specified steps in the UML activity diagram; ⚫ be able to repeat the main menu until the user exits the system. Task 3 (2 marks): Compilation and test. Please carefully compile your program. Make sure your program can pass the compilation by using the "javac" command. Test your program to all the items. See the examples of the processing results for the details. Please do not define the package in your program (a special alert for students who use IDE to complete the assignment). Submission: ⚫ Please submit your solution to Moodle (Assignment 1 submission). Email submission is NOT accepted. ⚫ Please submit an individual PDF document (SES.pdf) that contains your answers for Task 1 and Task 3. For Task 1, please include your UML class diagram. For Task 3, please include the snapshots to show the compilation and the execution of your program based on the testing request. • Please submit all java codes for Task 2. Objectives In this assignment, you are required to design and implement a Student Enrolment System (SES) in Java. This system helps a university to manage enrolments for the students. Background A university needs a Student Enrolment System (SES) to manage students' enrolment in subjects. We assume that the information of students and subjects are given below. Students: 100100, Albert, 13/10/1965, a100@uni.edu.au, 12 Robert street Woonona NSW 2517, 12345678, Bachelor of CS, [Artificial Intelligence and Big Data, Cyber Security] 100110, Alvin, 13/10/1977, a110@uni.edu.au, 56 Marlo road Wollongong NSW 2500, 11223344, Bachelor of CS, [Artificial Intelligence and Big Data, Cyber Security] 100120, Alice, 17/06/1973, a120@uni.edu.au, 43 Collaery road Russell Vale NSW 2517, 12345677, Bachelor of CS, [Artificial Intelligence and Big Data, Cyber Security] 100150, Bob, 02/07/1960, a150@uni.edu.au, 23 Kendall street Wollongong NSW 2500, 12345688, Bachelor of CS, [Artificial Intelligence and Big Data, Cyber Security] 100200, Carl, 02/02/1967, c200@uni.edu.au, 44 Mount Keira road West Wollongong NSW 2500, 21345687, Bachelor of IT, [Artificial Intelligence and Big Data, Cyber Security] WOLLONGONG 100250, Douglass, 14/04/1983, d250@uni.edu.au, 78 Uralba street West Wollongong NSW 2500, 010123456, Bachelor of CS, [Artificial Intelligence and Big Data, Cyber Security] 100101, Peter, 13/11/1976, p101@uni.edu.au, 77 Gipps road Wollongong NSW 2500, 0102123456, Bachelor of IT, [Artificial Intelligence and Big Data, Cyber Security] 100103, Ami, 12/09/1985, a103@uni.edu.au, 51 Mackie street Coniston NSW 2500, 0242211234, Bachelor of IT, [Artificial Intelligence and Big Data, Cyber Security] 100107, Wendy, 12/09/1988, w107@uni.edu.au, 41 Wall street Wollongong NSW 2500, 0281234567, Master of CS, Coursework 100109, Michael, 12/09/1990, m109@uni.edu.au, 112 Smith road Wollongong NSW 2500, 0242201234, Master of CS, Coursework 100125, Angela, 20/11/1990, a125@uni.edu.au, 23 Gibsons road Figtree NSW 2525, 0201123456, Master of IT, Coursework 100105, Robert, 15/01/1986, r105@uni.edu.au, 66 Risely road Figtree NSW 2525, 0202213123, Master of IT, Coursework 100136, Aban, 15/01/1990, a136@uni.edu.au, 187 Princes Highway Wollongong NSW 2500, 0103123456, Master of Philosophy, Research 100187, Eadger, 07/04/1986, e187@uni.edu.au, 73 Ocean street Wollongong NSW 2500, 0104123321, Master of Philosophy, Research Subjects: CSCI213, Java Programming & Object Oriented Design, 6, This subject provides an introduction to the Java language and some of its standard class libraries, you will have experience with object oriented design and implementation techniques, CSCI124 or CSCI121 or CSCI192, 3, 2 CSCI124, Applied Programming, 6, This subject develops a thorough understanding of program design using data structures. It extends CSCI114 and presents pointers, dynamic memory management and exception handling, CSCI114 & CSC1103 or CSC1111 & CSCI103, 4, 2 CSCI235, Database system, 6, This subject investigates three major areas of modern database systems: 1. design of relational databases 2. programming of relational databases, CSIT115, 3,2 CSIT115, Data management and security, 6, The subject investigates three major areas of modern data management systems: data modelling, data processing, and data security.,, 2, 2 CSIT111, Programming Fundamentals, 6, The broad aim of this subject is to develop in students an understanding of the fundamental principles of programming.,, 2, 2 CSIT121, Object oriented design and programming, 6, The aims of this subject are to consolidate and extend student's knowledge and skills in structured programming and to develop their understanding and practice of object oriented programming., CSIT111 OR ENGG100, 2, 2 CSCI251, Advanced programming, 6, This subject develops a thorough understanding of advanced programming features, and how to implement them in modern C++., CSIT121, 3, 2 Your program shall contain at least the following classes for the SES. • Define a new class Subject in a new source file Subject.java that contains private data members: code: is a string started by letters, such as "CSCI121", "CSC1235"; name: is a string of the subject's name, such as "Java Programming"; credit: is the credit points of the subject; description: contains the description of the subject; preRequisites: the pre-requisite code of subjects; ■ classTime: how many hours of classes per week; ■ labTime: how many hours of labs per week. Implement Java methods in the file Subject.java that include: ■ Initialization constructor that assigns values to all data members; ■ Public access methods getCode(), getName(), getCredit(), getDescription(), getPreRequisites(), getClassTime() and getLabTime() that return values of private data members; Public update methods setCode(String newCode), setName(String newName), setCredit(int newCredit), setDescription(String newDesc), setPreRequisites(String req), setClass Time(int ct) and setLabTime(int It) that update values of private data members; ■ Public overriding method toString() that returns subject information. • Define a new class Student in a new source file Student.java that contains private data members: number: is a student number; ■ name: is a string of the student's name, such as "Alice Wonderland"; · dob: is the date of birth; · email: contains the email of the student; address: the address of the student; phone: contact phone number; ■ degree: degree of the student, such as "Bachelor of CS", "Master of IT"; Implement Java methods in the file Student.java that include: ■ Initialization constructor that assigns values to all data members; ■ Public access methods getNumber(), getName(), getDOB(), getEmail(), getAddress(), getPhone() and getDegree() that return values of private data members; Public update methods set Number(int newNumber), setName(String newName), setDOB(String newDOB), setEmail(String new Email), setAddress(String newAddress), setPhone(String new Phone) and setDegree(String newDegree) that update values of private data members; Public overriding method toString()) that returns of student information. • Define a new class Student in a new source file Student.java that contains private data members: · number: is a student number; name: is a string of the student's name, such as "Alice Wonderland"; dob: is the date of birth; email: contains the email of the student; address: the address of the student; phone: contact phone number; ■ degree: degree of the student, such as "Bachelor of CS", "Master of IT"; Implement Java methods in the file Student.java that include: Initialization constructor that assigns values to all data members; Public access methods getNumber(), getName(), getDOB(), getEmail(), getAddress(), getPhone() and getDegree() that return values of private data members; Public update methods setNumber(int newNumber), setName(String newName), setDOB(String newDOB), setEmail(String newEmail), setAddress(String newAddress), setPhone(String new Phone) and setDegree(String new Degree) that update values of private data members; Public overriding method toString() that returns of student information. Define a new class Undergraduate that is the subclass of Student in a new source file Undergraduate.java that contains extra private data members: majors: is an ArrayList of String, such as ["Artificial Intelligence and Big Data", "Cyber Security"]; Implement Java methods in the file Undergraduate.java that include: ■ Initialization constructor that assigns values to all data members; ■ Public access methods getMajors() that return values of private data members; ■ Public update methods setMajors(ArrayList<String> newMajors) that update values of private data members; Public overriding method toString() that returns of undergraduate information. Define a new class Postgraduate that is the subclass of Student in a new source file Postgraduate.java that contains extra private data members: ■ type: is an Enum called Type, including Research and Coursework; Implement Java methods in the file Postgraduate.java that include: ■ Initialization constructor that assigns values to all data members; ■ Public access methods getType() that return values of private data members; ■ Public update methods setType(Type newType) that update values of private data members; ■ Public overriding method toString() that returns of postgraduate information. • Define a new class Enrolment in a new source file Enrolment.java that contains private data members: number: is a student number; ■ code: is a string of the subject code; ■ date: is the date of enrolment. Implement Java methods in the file Enrolment.java that include: Initialization constructor that assign values to all data members; Public access methods getNumber(), getCode() and getDate() that return values of private data members; Public update methods setNumber(int newNumber), setCode(String new Code) and setDate(String newDate) that update values of private data members; ■ Public overriding method toString() that returns of enrolment information. Define a new class Student EnrolmentSystem in a new source file Student Enrolment System.java that contains private data members: students: is a list of Student objects; ■ subjects: is a list of Subject objects; enrolments: is a list of Enrolment objects. Implement Java methods in the file Student Enrolment System.java that include: Initialization constructor that creates empty lists for all data members; ⚫ Use the students' information provided above to add the objects of students to the correct list; ⚫ Use the subjects' information provided above to add the objects of subjects to the correct list; ■ Display a menu that includes 8 items below: 1. Display all students 2. Display all subjects 3. Display all enrolments 4. Find a student 5. Find a subject 6. Find a student's enrolments 7. Add an enrolment 8. Exit The Java program gets an input number of the menu, processes the required method for that item until 8 is input. When item 1 is selected, all the students' information is displayed. When item 2 is selected, all the subjects' information is displayed. When item 3 is selected, all the enrolments' information is displayed. When item 4 is selected, a user inputs a student number. Then the method finds the student record according to the student number and displays the student's information. If the student does not exist, display messages such as The student <student number> does not exist. When item 5 is selected, a user inputs a subject code. Then the method finds the subject record according to the subject code and displays the subject's information. If the subject does not exist, display messages such as The subject <subject code> does not exist. When item 6 is selected, a user inputs a student number. Then the method finds and displays all the enrolments' information for the student. If no enrolment found for the student, display messages such as The student <student number> hasn't enrolled in a subject. When item 7 is selected, a user inputs a student number. If the student exists, then the user inputs a subject code. If the subject exists, then check if the student has already enrolled in the subject or not. If the student hasn't enrolled in the subject, a new enrolment object is added to the enrolment list. Otherwise, the method displays messages such as The student <student number> has enrolled in the subject <subject code> already. The whole UML activity diagram of the system is given below. Initialize lists Add subject and student data Display menu Yes input is 1? Display all students No Yes input is 2? Display all subjects No Yes input is 3? Display all enrolments No Yes Input a student number input is 4? Display the student's information if exists No Yes Input a subject code input is 5? Display its information if it exists No Yes input is 67 Input a student number Display all her/his enrolments) No Yes input is 7? No Input a student number and a subject code Check input validity Add this enrolment if it does no exist Yes input is 8? No Display error of invalid input Examples of the application processing are given below. The user's inputs are highlighted in green colour. 1. Display all students 2. Display all subjects 13456 Display all enrolments 3. 4. Find a student 5. Find a subject 6. 7. 8. Find a student's enrolments Add an enrolment Exit Please select one from the menu: 1 100100, Albert, 13/10/1965, a100@uni.edu.au, 12 Robert street Woonona NSW 2517, 12345678, Bachelor of CS, [Artificial Intelligence and Big Data, Cyber Security] 100110, Alvin, 13/10/1977, al10@uni.edu.au, 56 Marlo road Wollongong NSW 2500, 11223344, Bachelor of CS, [Artificial Intelligence and Big Data, Cyber Security] 100120, Alice, 17/06/1973, a120@uni.edu.au, 43 Collaery road Russell Vale NSW 2517, 12345677, Bachelor of CS, [Artificial Intelligence and Big Data, Cyber Security] 100150, Bob, 02/07/1960, a150@uni.edu.au, 23 Kendall street Wollongong NSW 2500, 12345688, Bachelor of CS, [Artificial Intelligence and Big Data, Cyber Security] 100200, Carl, 02/02/1967, c200@uni.edu.au, 44 Mount Keira road West Wollongong NSW 2500, 21345687, Bachelor of IT, [Artificial Intelligence and Big Data, Cyber Security] 100250, Douglass, 14/04/1983, d250@uni.edu.au, 78 Uralba street West Wollongong NSW 2500, 010123456, Bachelor of CS, [Artificial Intelligence and Big Data, Cyber Security] 100101, Peter, 13/11/1976, p101@uni.edu.au, 77 Gipps road Wollongong NSW 2500, 0102123456, Bachelor of IT, [Artificial Intelligence and Big Data, Cyber Security] 100103, Ami, 12/09/1985, a103@uni.edu.au, 51 Mackie street Coniston NSW 2500, 0242211234, Bachelor of IT, [Artificial Intelligence and Big Data, Cyber Security] 100107, Wendy, 12/09/1988, w107@uni.edu.au, 41 Wall street Wollongong NSW 2500, 0281234567, Master of CS, Coursework 100109, Michael, 12/09/1990, m109@uni.edu.au, 112 Smith road Wollongong NSW 2500, 0242201234, Master of CS, Coursework 100125, Angela, 20/11/1990, a125@uni.edu.au, 23 Gibsons road Figtree NSW 2525, 0201123456, Master of IT, Coursework 100105, Robert, 15/01/1986, r105@uni.edu.au, 66 Risely road Figtree NSW 2525, 0202213123, Master of IT, Coursework 100136, Aban, 15/01/1990, a136@uni.edu.au, 187 Princes Highway Wollongong NSW 2500, 0103123456, Master of Philosophy, Research 100187, Eadger, 07/04/1986, e187@uni.edu.au, 73 Ocean street Wollongong NSW 2500, 0104123321, Master of Philosophy, Research Display all students. Display all subjects. 1. 2. 3. Display all enrolments 4. Find a student 5. Find a subject CSIT 121/821 Object Oriented Desion and Programming 6. Find a student's enrolments 7. Add an enrolment 8. Exit Please select one from the menu: 2 CSCI213, Java Programming & Object Oriented Design, 6, This subject provides an introduction to the Java language and some of its standard class libraries, you will have experience with object oriented design and implementation techniques, CSCI124 or CSCI121 or CSCI192, 3, 2 CSCI124, Applied Programming, 6, This subject develops a thorough understanding of program design using data structures. It extends CSCI114 and presents pointers, dynamic memory management and exception handling, CSCI114 & CSCI103 or CSCI111 & CSCI103, 4, 2 CSCI235, Database system, 6, This subject investigates three major areas of modern database systems: 1. design of relational databases 2. programming of relational databases, CSIT115, 3, 2 CSIT115, Data management and security, 6, The subject investigates three major areas of modern data management systems: data modelling, data processing, and data security.,, 2, 2 CSIT111, Programming Fundamentals, 6, The broad aim of this subject is to develop in students an understanding of the fundamental principles of programming.,, 2, 2 CSIT121, Object oriented design and programming, 6, The aims of this subject are to consolidate and extend student's knowledge and skills in structured programming and to develop their understanding and practice of object oriented programming., CSIT111 OR ENGG100, 2, 2 CSCI251, Advanced programming, 6, This subject develops a thorough understanding of advanced programming features, and how to implement them in modern C++., CSIT121, 3, 2 1. Display all students. 2. Display all subjects. Display all enrolments 3. 4. Find a student 5. Find a subject 6. 7. Find a student's enrolments Add an enrolment 8. Exit Please select one from the menu: 4 Input a student number: 123456 The student 123456 does not exist. 1. Display all students. 2. Display all subjects 3. Display all enrolments 4. Find a student 5. Find a subject 6. 7. Find a student's enrolments Add an enrolment 8. Exit Please select one from the menu: 4 Input a student number: 100100 100100, Albert, 13/10/1965, a100@uni.edu.au, 12 Robert street Woonona NSW 2517, 12345678, Bachelor of CS, [Artificial Intelligence and Big Data, Cyber Security] 1. Display all students. 2. Display all subjects 3. Display all enrolments 4. Find a student 5. Find a subject 6. Find a student's enrolments 7. Add an enrolment 8. Exit Please select one from the menu: 5 Input a subject code: CSIT111 CSIT111, Programming Fundamentals, 6, The broad aim of this subject is to develop in students an understanding of the fundamental principles of programming.,, 2, 2 1. Display all students. 2. Display all subjects 3. Display all enrolments 456 4. Find a student 5. Find a subject 6. Find a student's enrolments 7. 8. Add an enrolment Exit Please select one from the menu: 5 Input a subject code: CSIT222 The subject CSIT222 does not exist. 1. Display all students. 2. Display all subjects 3. Display all enrolments 4. Find a student 5. Find a subject 6. 7. 8. Find a student's enrolments Add an enrolment Exit Please select one from the menu: 7 Input a student number: 100100 Input a subject code: CSIT111 A new enrolment for the student 100100 on the subject CSIT111 has been added to the list. 1. Display all students. 2. Display all subjects 3. 4. 5. 6. 7. Display all enrolments Find a student Find a subject Find a Add an enrolment student's enrolments 8. Exit Please select one from the menu: 7 Input a student number: 100100. Input a subject code: CSIT121 A new enrolment for the student 100100 on the subject CSIT121 has been added to the list. 1. Display all students 2. Display all subjects. 3. Display all enrolments 4. Find a student 5. Find a subject 6. Find a student's enrolments 7. Add an enrolment 8. Exit Please select one from the menu: 6 Input a student number: 100100 100100, CSIT111, 26/07/2022 100100, CSIT121, 26/07/2022 1. Display all students. 2. Display all subjects Display all enrolments Find a student 3. 4. 5. Find a subject 6. Find a student's enrolments 7. Add an enrolment 8. Exit Please select one from the menu: 3 100100, CSIT111, 26/07/2022 100100, CSIT121, 26/07/2022 1. Display all students. 2. Display all subjects 3. Display all enrolments 4. Find a student 5. Find a subject 6. Find a student's enrolments 7. Add an enrolment 8. Exit Please select one from the menu: 8 Bye Tasks Task 1 (2 marks): Complete the UML class diagram of this program. The class diagram shall ⚫ contain at least the classes mentioned above; ⚫ contain the class name, fields, and methods definitions for each class; 11- ⚫ use correct and sufficient UML notations; ⚫ specify the associations between classes; • specify the multiplicities for both sides of the associations. CSIT121/821 Object Oriented Design and Programming 9/ Task 2 (6 marks): Implement the system according to the UML class diagrams. The program shall be consistent with the UML class diagrams; ⚫ follow the conventions for naming all classes, variables, and methods; ⚫ provide sufficient comments; use proper blank spaces, indentation, and braces to make your code easy to read and understand; follow the specified steps in the UML activity diagram; ⚫ be able to repeat the main menu until the user exits the system. Task 3 (2 marks): Compilation and test. Please carefully compile your program. Make sure your program can pass the compilation by using the "javac" command. Test your program to all the items. See the examples of the processing results for the details. Please do not define the package in your program (a special alert for students who use IDE to complete the assignment). Submission: ⚫ Please submit your solution to Moodle (Assignment 1 submission). Email submission is NOT accepted. ⚫ Please submit an individual PDF document (SES.pdf) that contains your answers for Task 1 and Task 3. For Task 1, please include your UML class diagram. For Task 3, please include the snapshots to show the compilation and the execution of your program based on the testing request. • Please submit all java codes for Task 2. Objectives In this assignment, you are required to design and implement a Student Enrolment System (SES) in Java. This system helps a university to manage enrolments for the students. Background A university needs a Student Enrolment System (SES) to manage students' enrolment in subjects. We assume that the information of students and subjects are given below. Students: 100100, Albert, 13/10/1965, a100@uni.edu.au, 12 Robert street Woonona NSW 2517, 12345678, Bachelor of CS, [Artificial Intelligence and Big Data, Cyber Security] 100110, Alvin, 13/10/1977, a110@uni.edu.au, 56 Marlo road Wollongong NSW 2500, 11223344, Bachelor of CS, [Artificial Intelligence and Big Data, Cyber Security] 100120, Alice, 17/06/1973, a120@uni.edu.au, 43 Collaery road Russell Vale NSW 2517, 12345677, Bachelor of CS, [Artificial Intelligence and Big Data, Cyber Security] 100150, Bob, 02/07/1960, a150@uni.edu.au, 23 Kendall street Wollongong NSW 2500, 12345688, Bachelor of CS, [Artificial Intelligence and Big Data, Cyber Security] 100200, Carl, 02/02/1967, c200@uni.edu.au, 44 Mount Keira road West Wollongong NSW 2500, 21345687, Bachelor of IT, [Artificial Intelligence and Big Data, Cyber Security] WOLLONGONG 100250, Douglass, 14/04/1983, d250@uni.edu.au, 78 Uralba street West Wollongong NSW 2500, 010123456, Bachelor of CS, [Artificial Intelligence and Big Data, Cyber Security] 100101, Peter, 13/11/1976, p101@uni.edu.au, 77 Gipps road Wollongong NSW 2500, 0102123456, Bachelor of IT, [Artificial Intelligence and Big Data, Cyber Security] 100103, Ami, 12/09/1985, a103@uni.edu.au, 51 Mackie street Coniston NSW 2500, 0242211234, Bachelor of IT, [Artificial Intelligence and Big Data, Cyber Security] 100107, Wendy, 12/09/1988, w107@uni.edu.au, 41 Wall street Wollongong NSW 2500, 0281234567, Master of CS, Coursework 100109, Michael, 12/09/1990, m109@uni.edu.au, 112 Smith road Wollongong NSW 2500, 0242201234, Master of CS, Coursework 100125, Angela, 20/11/1990, a125@uni.edu.au, 23 Gibsons road Figtree NSW 2525, 0201123456, Master of IT, Coursework 100105, Robert, 15/01/1986, r105@uni.edu.au, 66 Risely road Figtree NSW 2525, 0202213123, Master of IT, Coursework 100136, Aban, 15/01/1990, a136@uni.edu.au, 187 Princes Highway Wollongong NSW 2500, 0103123456, Master of Philosophy, Research 100187, Eadger, 07/04/1986, e187@uni.edu.au, 73 Ocean street Wollongong NSW 2500, 0104123321, Master of Philosophy, Research Subjects: CSCI213, Java Programming & Object Oriented Design, 6, This subject provides an introduction to the Java language and some of its standard class libraries, you will have experience with object oriented design and implementation techniques, CSCI124 or CSCI121 or CSCI192, 3, 2 CSCI124, Applied Programming, 6, This subject develops a thorough understanding of program design using data structures. It extends CSCI114 and presents pointers, dynamic memory management and exception handling, CSCI114 & CSC1103 or CSC1111 & CSCI103, 4, 2 CSCI235, Database system, 6, This subject investigates three major areas of modern database systems: 1. design of relational databases 2. programming of relational databases, CSIT115, 3,2 CSIT115, Data management and security, 6, The subject investigates three major areas of modern data management systems: data modelling, data processing, and data security.,, 2, 2 CSIT111, Programming Fundamentals, 6, The broad aim of this subject is to develop in students an understanding of the fundamental principles of programming.,, 2, 2 CSIT121, Object oriented design and programming, 6, The aims of this subject are to consolidate and extend student's knowledge and skills in structured programming and to develop their understanding and practice of object oriented programming., CSIT111 OR ENGG100, 2, 2 CSCI251, Advanced programming, 6, This subject develops a thorough understanding of advanced programming features, and how to implement them in modern C++., CSIT121, 3, 2 Your program shall contain at least the following classes for the SES. • Define a new class Subject in a new source file Subject.java that contains private data members: code: is a string started by letters, such as "CSCI121", "CSC1235"; name: is a string of the subject's name, such as "Java Programming"; credit: is the credit points of the subject; description: contains the description of the subject; preRequisites: the pre-requisite code of subjects; ■ classTime: how many hours of classes per week; ■ labTime: how many hours of labs per week. Implement Java methods in the file Subject.java that include: ■ Initialization constructor that assigns values to all data members; ■ Public access methods getCode(), getName(), getCredit(), getDescription(), getPreRequisites(), getClassTime() and getLabTime() that return values of private data members; Public update methods setCode(String newCode), setName(String newName), setCredit(int newCredit), setDescription(String newDesc), setPreRequisites(String req), setClass Time(int ct) and setLabTime(int It) that update values of private data members; ■ Public overriding method toString() that returns subject information. • Define a new class Student in a new source file Student.java that contains private data members: number: is a student number; ■ name: is a string of the student's name, such as "Alice Wonderland"; · dob: is the date of birth; · email: contains the email of the student; address: the address of the student; phone: contact phone number; ■ degree: degree of the student, such as "Bachelor of CS", "Master of IT"; Implement Java methods in the file Student.java that include: ■ Initialization constructor that assigns values to all data members; ■ Public access methods getNumber(), getName(), getDOB(), getEmail(), getAddress(), getPhone() and getDegree() that return values of private data members; Public update methods set Number(int newNumber), setName(String newName), setDOB(String newDOB), setEmail(String new Email), setAddress(String newAddress), setPhone(String new Phone) and setDegree(String newDegree) that update values of private data members; Public overriding method toString()) that returns of student information. • Define a new class Student in a new source file Student.java that contains private data members: · number: is a student number; name: is a string of the student's name, such as "Alice Wonderland"; dob: is the date of birth; email: contains the email of the student; address: the address of the student; phone: contact phone number; ■ degree: degree of the student, such as "Bachelor of CS", "Master of IT"; Implement Java methods in the file Student.java that include: Initialization constructor that assigns values to all data members; Public access methods getNumber(), getName(), getDOB(), getEmail(), getAddress(), getPhone() and getDegree() that return values of private data members; Public update methods setNumber(int newNumber), setName(String newName), setDOB(String newDOB), setEmail(String newEmail), setAddress(String newAddress), setPhone(String new Phone) and setDegree(String new Degree) that update values of private data members; Public overriding method toString() that returns of student information. Define a new class Undergraduate that is the subclass of Student in a new source file Undergraduate.java that contains extra private data members: majors: is an ArrayList of String, such as ["Artificial Intelligence and Big Data", "Cyber Security"]; Implement Java methods in the file Undergraduate.java that include: ■ Initialization constructor that assigns values to all data members; ■ Public access methods getMajors() that return values of private data members; ■ Public update methods setMajors(ArrayList<String> newMajors) that update values of private data members; Public overriding method toString() that returns of undergraduate information. Define a new class Postgraduate that is the subclass of Student in a new source file Postgraduate.java that contains extra private data members: ■ type: is an Enum called Type, including Research and Coursework; Implement Java methods in the file Postgraduate.java that include: ■ Initialization constructor that assigns values to all data members; ■ Public access methods getType() that return values of private data members; ■ Public update methods setType(Type newType) that update values of private data members; ■ Public overriding method toString() that returns of postgraduate information. • Define a new class Enrolment in a new source file Enrolment.java that contains private data members: number: is a student number; ■ code: is a string of the subject code; ■ date: is the date of enrolment. Implement Java methods in the file Enrolment.java that include: Initialization constructor that assign values to all data members; Public access methods getNumber(), getCode() and getDate() that return values of private data members; Public update methods setNumber(int newNumber), setCode(String new Code) and setDate(String newDate) that update values of private data members; ■ Public overriding method toString() that returns of enrolment information. Define a new class Student EnrolmentSystem in a new source file Student Enrolment System.java that contains private data members: students: is a list of Student objects; ■ subjects: is a list of Subject objects; enrolments: is a list of Enrolment objects. Implement Java methods in the file Student Enrolment System.java that include: Initialization constructor that creates empty lists for all data members; ⚫ Use the students' information provided above to add the objects of students to the correct list; ⚫ Use the subjects' information provided above to add the objects of subjects to the correct list; ■ Display a menu that includes 8 items below: 1. Display all students 2. Display all subjects 3. Display all enrolments 4. Find a student 5. Find a subject 6. Find a student's enrolments 7. Add an enrolment 8. Exit The Java program gets an input number of the menu, processes the required method for that item until 8 is input. When item 1 is selected, all the students' information is displayed. When item 2 is selected, all the subjects' information is displayed. When item 3 is selected, all the enrolments' information is displayed. When item 4 is selected, a user inputs a student number. Then the method finds the student record according to the student number and displays the student's information. If the student does not exist, display messages such as The student <student number> does not exist. When item 5 is selected, a user inputs a subject code. Then the method finds the subject record according to the subject code and displays the subject's information. If the subject does not exist, display messages such as The subject <subject code> does not exist. When item 6 is selected, a user inputs a student number. Then the method finds and displays all the enrolments' information for the student. If no enrolment found for the student, display messages such as The student <student number> hasn't enrolled in a subject. When item 7 is selected, a user inputs a student number. If the student exists, then the user inputs a subject code. If the subject exists, then check if the student has already enrolled in the subject or not. If the student hasn't enrolled in the subject, a new enrolment object is added to the enrolment list. Otherwise, the method displays messages such as The student <student number> has enrolled in the subject <subject code> already. The whole UML activity diagram of the system is given below. Initialize lists Add subject and student data Display menu Yes input is 1? Display all students No Yes input is 2? Display all subjects No Yes input is 3? Display all enrolments No Yes Input a student number input is 4? Display the student's information if exists No Yes Input a subject code input is 5? Display its information if it exists No Yes input is 67 Input a student number Display all her/his enrolments) No Yes input is 7? No Input a student number and a subject code Check input validity Add this enrolment if it does no exist Yes input is 8? No Display error of invalid input
Expert Answer:
Answer rating: 100% (QA)
implement the application described well need to create classes to represent students subjects and enrolments Well also need a main class to handle user inputs and interactions Below is a simple Java ... View the full answer
Related Book For
Stats Data and Models
ISBN: 978-0321986498
4th edition
Authors: Richard D. De Veaux, Paul D. Velleman, David E. Bock
Posted Date:
Students also viewed these programming questions
-
A survey of information systems managers was used to predict the yearly salary of beginning programmer/analysts in a metropolitan area. Managers specified their standard salary for a beginning...
-
Question 4: Artistic Hand for engineering Services was formed on Jun 1, 2018. The following transactions took place during the month of Jun: I The owner invested $20,000 cash in business. 2 Hired an...
-
Tumbikti, a country on the Atlantis continent, has a government deficit of 40 billion while private investment exceeds private savings by 10 billion. What is Tumbikti's current account balance if its...
-
Write and evaluate the definite integral that represents the area of the region bounded by the graph of the function and the tangent line to the graph at the given point. f(x) = 2x 3 - 1, (1, 1)
-
Determine if the mixed method aspect is concurrent, sequential,, or nested. Develop a hypothetical research scenario that would necessitate the use of the Mixed Method A-B-A Design. The research will...
-
Echeverria SA is an Argentinian manufacturing company whose total factory overhead costs fluctuate somewhat from year to year according to the number of machine-hours worked in its production...
-
Yvonne can use two coupons for the same purchase at her favorite department store. One coupon gives her $20 off and the other gives her 25% off. She wants to buy a bedspread that sells for...
-
A firm is analyzing their pricing and operations for next year based on the following anticipated cost structure, the given level of production and sales, and their target operating income margin of...
-
1. KCL is based on the fact that: a) There is a possibility for a node to store energy. b) There cannot be an accumulation of charge at a node. c) Charge accumulation is possible at node d) Charge...
-
Taking Possession of the Collateral When the debtor defaults, the secured party may take possession of the collateral. How does the secured party do so?
-
Government mandated controls on wealth accumulation and how it improves the national economy ?
-
The expanded contribution margin model provides a structure for explaining the effect on operating income of changes in...?
-
2.1 The ISO 9000 family addresses various aspects of quality management and contains some of ISO's best known standards. The standards provide guidance and tools for companies and organizations who...
-
Impact Corporation reported $460,000 of revenue for the year. Selling expenses amounted to $52,000, and administrative expenses were $78,000. Cost of goods sold was 42% of revenue. Impact's gross...
-
Greg has $385 in his bank account and has $86,750 in his Registered Retirement Savings Account (RRSP account). Gregs Notice of Assessment from CRA indicates that he has $59,000 of unused RRSP...
-
Find the market equilibrium point for the following demand and supply functions. Demand: 2p = - q + 56 Supply: 3p - q = 34
-
In Chapter 8, Exercise 9, we created a linear model describing the trend in the number of passengers departing from the Oakland (CA) airport each month since the start of 1997. Here's the residual...
-
As mentioned in the chapter, opinion-polling organizations contact their respondents by sampling random telephone numbers. Although interviewers can reach about 62% of U.S. households, the percentage...
-
Use the data from Exercise 53 to examine the association between Weight and %Body Fat. In Exercise 53 a) Find a 90% confidence interval for the slope of the regression line of % Body Fat on Weight....
-
Repeat problem 41 with the specimen of size \(100 \times 100 \times 10 \mathrm{~mm}^{3}\) and the dimensions of the cavity \(104 \times 104 \times 9 \mathrm{~mm}^{3}\). Elastic constants of the...
-
Repeat problem 41 with elastic constants of the plastic as \(E=10 \mathrm{GPa}\) and \(v=0.485\). Problem 42: A rectangular plastic specimen of size \(100 \times 100 \times 10 \mathrm{~mm}^{3}\) is...
-
A rectangular plastic specimen of size \(100 \times 100 \times 10 \mathrm{~mm}^{3}\) is placed in a rectangular metal cavity. The dimensions of the cavity are \(101 \times 101 \times 9...
Study smarter with the SolutionInn App