Download presentation
Presentation is loading. Please wait.
Published byAlicia Harrison Modified over 8 years ago
1
Java - KFT1 Task 4 RegiStudent Diagrams IT Java Course Mentors : - Pubali Banerjee, PhD - Cynthia Lang, PE, MSChE Western Governors University IT Java Course Mentors : - Pubali Banerjee, PhD - Cynthia Lang, PE, MSChE Western Governors University by Bernard Nsabimana Student ID: 000230752 BS - IT by Bernard Nsabimana Student ID: 000230752 BS - IT
2
UML Required Diagrams ◦ UML Use Case Diagrams ◦ UML Class Diagrams ◦ UML Sequence Diagrams
3
RegiStudent RegiStudent is an application written using a Java program. The purpose of the application is to maintain registrar database, useful for managing students in school institutions. In this application, there are an abstract superclass called “Student”, and three concrete subclasses: “Graduate”, “UnderGraduate”, and “Part_Time”. MySQL database is the relational database management system (RDBMS) used. NetBeans is used as an integrated development environment (IDE). The application allows users to add new student in the database, update existing student, and delete student from the database. It also helps users to retrieve student’s information from the database. The application calculates also student tuition.
4
RegiStudent Functional Requirements RegiStudent 1) The database “registrar” has “student” table with 10 fields. 2) The script “registrar.sql” can be executed to create and populate the registrar database. 3) Database connections are handled by regiConnect class. 4) Student is the abstract super class with several abstract methods : ◦ The calculateTuition() method that calculates student tuition according to student ‘s status and credit hours Graduate 300 Resident : CRHours x 300 ; 350 Non Resident Graduate : CRHours x 350 UnderGraduate 200 Resident : CRHours x 200 ; 400 Non Resident : CRHHours x 400 ; Part_Time 250 Resident : CRHours x 250 ; 450 Non Resident : CRHours x 450 ; ◦ The update() method that updates existing student in the database ◦ The add() method that adds new student to the database. ◦ The delete() method that deletes existing student record from the database ◦ The query() method that retrieves student info from the database by student ID ◦ The toString() method that is overridden to display the data variables in student concatenated in a string. 5) Three subclasses inherited from student class are Graduate, UnderGraduate, and Part_Time; ◦ The Graduate subclass has two additional attributes : thesisTitle and thesisAdvisor; ◦ The UnderGradute subclass has one additional attribute : level; ◦ The Part_Time subclass has also one additional attribute : company. 6) The tester class is RegiStudent.
5
Use Case Diagram: RegiStudent User Add student Delete Student Query Student Update Student Database RegiStudent Part_Time UnderGraduate Graduate Part_time UnderGraduate Graduate Graduate UnderGraduate Part_Time
6
Use Case Diagram : RegiStudent - Add Student functional requirement User Add Student Database RegiStudent Add Part_Time Add UnderGraduate Number 1 Functional Requirement : Number 1 Title: Title: Add Student Description: Description: The user will add student Graduate, or student UnderGraduate or student Part_Time to the collection database. Input: Input: - Graduate: studentID, firstName, lastName, gpa, status, mentor, thesisTitle, thesisAdvisor will be entered ; - UnderGraduate: studentID, firstName, lastName, gpa, status, mentor, level will be entered; - Part_Time: studentID, firstName, lastName, gpa, status, mentor, company will be entered. Results of process or output: Successfully New Student Added to the Results of process or output: The student (Graduate, UnderGraduate or Part_Time) is added to the database, and the message : “Successfully New Student Added to the DB” is displayed. Error handling: Could not Add New Student to the DB Error handling: When the input fails, the message : “"Could not Add New Student to the DB“ is displayed. Add Graduate
7
Use Case Diagram : RegiStudent - Update Student functional requirement User Update Student Database RegiStudent UpdatePart_Time Update UnderGraduate Number 2 Functional Requirement : Number 2 Title: Title: Update Student Description: Description: The user will update a chosen field of an existing student (Graduate, UnderGraduate or Part_Time) in the collection database. Input: Input: - Graduate: studentID, and one of firstName, lastName, gpa, status, mentor, thesisTitle, thesisAdvisor fields will be entered ; - UnderGraduate: studentID, and one of firstName, lastName, gpa, status, mentor, level fields will be entered; - Part_Time: studentID, and one of firstName, lastName, gpa, status, mentor, company fields will be entered. Results of process or output: Successfully Existing Student Updated Results of process or output: The field chosen by the user from the existing student (Graduate, UnderGraduate or Part_Time) fiields is updated, and the message : “Successfully Existing Student Updated” is displayed. Error handling: Student could not be Updated Error handling: When the input fails, the message : ““Student could not be Updated“ is displayed. UpdateGraduate
8
Use Case Diagram : RegiStudent - Query Student functional requirement User Delete Student Database RegiStudent Qelete Part_Time Delete UnderGraduate Number 3 Functional Requirement : Number 3 Title Title : Delete Student Description Description : The user will delete student (Graduate, UnderGraduate, or Part_Time) from the collection database. Inpu Inpu t: To delete Graduate, UnderGraduate, or Part_Time student from the database, the student collector will only enter studentID. Results of process or output Successfully Existing Student deleted from the DB Results of process or output : The student (Graduate, UnderGraduate, or Part_Time) is deleted from the database, and the message: “ Successfully Existing Student deleted from the DB ” is displayed. Error handlingCould not delete Existing Student from the DB Error handling : The message: " Could not delete Existing Student from the DB “ is displayed. Delete Graduate
9
Use Case Diagram : RegiStudent - Query Student functional requirement User Query Student Database RegiStudent Query Part_Time Query UnderGraduate Number 4 Functional Requirement : Number 4 Title: Title: Query Student Description: Description: The user will retrieve student (Graduate, UnderGraduate, or Part_Time) informations from the collection database. Input: Input: - Graduate: studentID will be entered to retrieve firstName, lastName, gpa, status, mentor, thesisTitle, thesisAdvisor from the collection database, and displayed ; - UnderGraduate: Also studentID will be entered to retrieve firstName, lastName, gpa, status, mentor, level from the collection database, and displayed; - Part_Time: studentID is entered to retrieve firstName, lastName, gpa, status, mentor, company from the collection database, and displayed. Results of process or output: Results of process or output: The student (Graduate, UnderGraduate or Part_Time) informations are retrieved from the collection database and displayed. Error handling: Could not retrieve any information : SQL ERROR Error handling: When the iquery fails, the message : “Could not retrieve any information : SQL ERROR“ is displayed. Query Graduate
10
Class Diagram : RegiStudent Student > Student - studentID : Integer - firstName : String - lastName : String - gpa : Float - status : String - mentor : String + Student() + setStudentID(stuID : Integer) : void + setFirstName(stuFirst : String) : void + setLastName(stuLast : String) : void + setGpa(stuGpa : Float) : void + setStatus(stuStatus : String) : void + setMentor(stuMentor : String) : void + getStudentID() : Integer + getFirst() : String + getLast() : String + getGpa() : Float + getStatus() : String + getMentor() : String + add() : void + update() : void + delete() : void + query() : void + calculateTuition() : double + toString() : String UnderGraduate - level : String + UnderGraduate() +setLevel(stuLevel : String) : void + getLevel() : String + add() : void + update() : void + delete() : void + query() : void + calculateTuition() : double + toString() : StringGraduate - thesisTitle : String - thesisAdvisor : String + Graduate() + setThesis(stuThesis : String) : void + setAdvisor(stuAdvisor : String) : void + getThesis() : String + getAdvisor() : String + add() : void + update() : void + delete() : void + query() : void + calculateTuition() : double + toString() : String RegiStudent - stuOption : Integer - menuint : Scanner + main() + AddStudent() : void + UpdateStudent() : void + DeleteStudent() : void + QueryStudent() : void + Tuitionstudent() : void 1 1..* 0..* 0..*regiConnect - stuConn : Connection + regiConnect() + makeConnection() : Connection + makeStatement() : Statement + close() : int 1 0..1 1 1 0..1Part_Time - company : String + Part_Time() +setCompany(stuCompany : String) : void + getCompany() : String + add() : void + update() : void + delete() : void + query() : void + calculateTuition() : double + toString() : String 0..* 1 0..10..1
11
Sequence Diagram : Add Student RegistudentStudentGraduateUnderGrauatePart_Time Database User Start program. Show Maijn Menu. Select Add Student Request Student Category (Graduate, UnderGraguate, Part_Time) Graduate Select Graduate UnderGraduate Select UnderGraduate Part_Time Select Part_Time Part_Time Create Part_Time Object Insert Student in database Call Student Constructor Constructor info Return success message Request studentID, firstName, lastName, gpa, status, mentor, thesisTitle, thesisAdvisor Enter studentID, firstName, lastName, gpa, status, mentor, thesisTitle, thesisAdvisor UnderGraduate Create UnderGraduate Object Graduate Create a Graduate Object Enter studentID, firstName, lastName, gpa, status, mentor, level Enter studentID, firstName, lastName, gpa, status, mentor, company Enter studentID, firstName, lastName, gpa, status, mentor, level Enter studentID, firstName, lastName, gpa, status, mentor, company
12
Sequence Diagram : Update Student RegistudentStudentGraduateUnderGrauatePart_Time Database User Start program. Show Maijn Menu. Select Update Student Request Student Category (Graduate, UnderGraguate, Part_Time) Graduate Select Graduate UnderGraduate Select UnderGraduate Part_Time Select Part_Time Part_Time Update Part_Time Object Update existing Student in database Call Student Constructor Constructor info Return success message Select a Field to update ( firstName, lastName, gpa, status, mentor, thesisTitle, thesisAdvisor ) Enter New (firstName, lastName, gpa, status, mentor, thesisTitle, thesisAdvisor) UnderGraduate Update UnderGraduate Object Graduate Update Graduate Object Enter New ( firstName, lastName, gpa, status, mentor, level ) Enter New ( firstName, lastName, gpa, status, mentor, company ) Select a Field to update ( firstName, lastName, gpa, status, mentor, level ) Select a Field to update ( firstName, lastName, gpa, status, mentor, company ) Request Student ID Enter Student ID
13
Sequence Diagram : Delete Student RegistudentStudentGraduateUnderGrauatePart_Time Database User Start program. Show Maijn Menu. Select Delete Student Request Student Category (Graduate, UnderGraguate, Part_Time) Graduate Select Graduate UnderGraduate Select UnderGraduate Part_Time Select Part_Time Part_Time Delete Part_Time Object Delete Student From the database Call Student Constructor Constructor info Return success message UnderGraduate Delete UnderGraduate Object Graduate Delete Graduate Object Request Student ID Enter Student ID
14
Sequence Diagram : Query Student RegistudentStudentGraduateUnderGrauatePart_Time Database User Start program. Show Maijn Menu. Select Query Student Request Student Category (Graduate, UnderGraguate, Part_Time) Graduate Select Graduate UnderGraduate Select UnderGraduate Part_Time Select Part_Time Part_Time Retrieve Part_Time Object Retrieve Student info From the database Call Student Constructor Constructor info Return success message UnderGraduate Retrieve UnderGraduate Object Graduate Retrieve Graduate Object Request Student ID Enter Student ID
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.