Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider a web application that allows a user to browse the education history of every student in a department. The details of each component are
Consider a web application that allows a user to browse the education history of every student in a department. The details of each component are as follows: User the user should be allowed the following actions: i) Load): loads and displays the records of the first student in the database ii) Next() : advance to the next student and loads and displays the records Database - stores the personal information and education history of every student in the following fields i) ii) iii) iv) v) vi) Student Name Student ID University Attended Year Graduated from University High School Attended Year Graduated from High School Display - displays the above student and education information for one student at a time. (a) Design a system where the above three components can be modified independently without affecting other parts of the program. Your design must allow the user to iterate through all the records in the database. State what Design Pattern(s) you have used and draw the Class diagram (b) In a web application, the user has to submit, through the web browser, an http request to the system and the final formatted output will be returned to the web browser as an http response. Taking these two additional messages into consideration, draw the Sequence diagram of your design. 7 marks) (c) Assume that the Student Database is implemented in the following way public class StudentEducationHistory private String studentName; private String studentID; private String universityAttended; private String yearGraduatedFromUniversity: private String highSchoolAttended; private String yearGraduatedFromHighSchool: public String getStudentName () public void setStudentName (String studentName) public String getStudentIDO return studentName; this.studentNamestudentName; return studentID; 6 of 8 public void setStudentID(String studentID) this.studentIDstudentID; /7 other get and set class methods Explain what is undesirable about this code and refactor it to make it better Consider a web application that allows a user to browse the education history of every student in a department. The details of each component are as follows: User the user should be allowed the following actions: i) Load): loads and displays the records of the first student in the database ii) Next() : advance to the next student and loads and displays the records Database - stores the personal information and education history of every student in the following fields i) ii) iii) iv) v) vi) Student Name Student ID University Attended Year Graduated from University High School Attended Year Graduated from High School Display - displays the above student and education information for one student at a time. (a) Design a system where the above three components can be modified independently without affecting other parts of the program. Your design must allow the user to iterate through all the records in the database. State what Design Pattern(s) you have used and draw the Class diagram (b) In a web application, the user has to submit, through the web browser, an http request to the system and the final formatted output will be returned to the web browser as an http response. Taking these two additional messages into consideration, draw the Sequence diagram of your design. 7 marks) (c) Assume that the Student Database is implemented in the following way public class StudentEducationHistory private String studentName; private String studentID; private String universityAttended; private String yearGraduatedFromUniversity: private String highSchoolAttended; private String yearGraduatedFromHighSchool: public String getStudentName () public void setStudentName (String studentName) public String getStudentIDO return studentName; this.studentNamestudentName; return studentID; 6 of 8 public void setStudentID(String studentID) this.studentIDstudentID; /7 other get and set class methods Explain what is undesirable about this code and refactor it to make it better
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started