Question: Task 1 ( 8 marks ) In the provided file Student.java in the downloaded project, create a new Student class with the following fields, studentID,

Task 1(8 marks) In the provided file Student.java in the downloaded project, create a new Student class with the following fields, studentID, fullName, email and password. (2 marks) Please keep in mind that a student can change their email address or password at any time, their studentID should remain the same for as long as they are registered in the system. Each student's studentID should be unique, and assigned in increasing numerical order with each new registration, starting from 1000. Implement the following for the Student class: A 0-parameter (default) constructor with sensible default values, and a parameterized (non-default) constructor with sensible parameters. (3 marks) Appropriate getter and setter methods for each field. (2 marks) A toString() method to display the student details, formatted appropriately. Please refer to the sample output below. (Figure 1).(1 mark) Task 2(19 marks) In the Assignment2Driver class, write code that does the following, when the program is run: Initialises an empty ArrayList of Student objects. (1 mark) Display a main menu, which allows the user to select from the following options. The program should continue to run until Option 3 is selected. (1 marks)1. Register a new student. 2. Login as an existing student. 3. Exit the system. If Option 1 is selected, the student should be prompted to enter the name, email and password. A new Student object containing their details should be added to the list of students. If the registration is successful, the student should be informed that their registration is successful, before returning them to the main menu. (5 marks) If Option 2 is selected, the student should be prompted to login by entering their email address and password with a maximum of three attempts. If after the third attempt, no match for their email/password has been found, an appropriate error message should be printed and the student should be returned to the main menu. If the student logs in successfully, they should be presented with a new menu, with the following options: (12 marks)
1. View student details, which displays all the information associated with that student in the system. 2. Change email address, which allows the student to change their email address and updates their details in the system. Please refer to Task 3 below for the email address requirement. 3. Change password, which allows the student to change their password and updates their details in the system. Please refer to Task 3 below for the password requirement. 4. Register for a course, which allows the student to enter a course that they would like to register for. Please refer to the sample output below. (Figure 2)5. Delete account, which if selected, will prompt the student for confirmation, then remove their details from the ArrayList and return them to the main menu. 6. Log out, which returns the student to the main menu. Task 3(15 marks) Upgrade your system to include the following validation checks in the Assignment2Driver class. Write a method called validateEmail in the Assignment2Driver class. This method should take an email address as its parameter, and return a boolean value. It should check the provided email address to ensure it contains a character before and after @. If the email address meets these criteria, the method should return true. Otherwise, it should return false. For example, the strings hello@world,1@1, and student123@monash.edu should all return true, but the strings helloworld,john@, and @monash.edu should all return false. (4 marks) Write a method called validatePassword in the Assignment2Driver class. This method should take a password as its parameter, and return a boolean value. It should check the provided password to ensure it: o is at least 7 characters in length, o contains at least one number, one symbol and o contains a mix of upper and lowercase characters. If it meets these three conditions, it should return true, otherwise it should return false. (4 marks) Update the rest of your program so these validation checks are performed when a student first registers, and when they update their email address or password. If the student gives an invalid email address or password, they should be given an appropriate error message and prompted to try again. (7 marks) Note: Please ensure to include proper documentation in your program.
Figure 1: Display Student Details
Student Menu:
1. View student details
2. Change email address
3. Change password
4. Register for a course
5. Delete account
6. Log out
Choose an option:
Enter course name to register: Software Engineering
Course 'Software Engineering' registered successfully.
Task 1 ( 8 marks ) In the provided file

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!