PAT Menachem Altman Part 2 1|Page Table of contents Interface Design ------------------------------------------------------------------------------------------------- 3 Program Flow --------------------------------------------------------------------------------------------------- 15 Class Design and OOP Principles --------------------------------------------------------------------------- 31 Secondary Storage Design ----------------------------------------------------------------------------------- 45 Explanation of Secondary storage design ---------------------------------------------------------------- 55 Explanation of Primary data structure related to secondary storage ----------------------------- 56 2|Page Login Screen Description This screen gives access to admin and guest to login into MySched. To login the user must enter a valid username and a password. The guest only needs to press the guest button to login. 3|Page Data Username Password Action Login button – Validates input information to allow access Guest button- allows unsecured access to any guest Exit- closes the program Main screen Description This screen provides allows the user to enter a separate screen of the user’s weekly schedule 4|Page Data None Action Go to weekly schedule- Opens schedule Screen Logout- logs the admin out and secures program Teacher screen Description This screen allows the user to add a new teacher/ person to add into the weekly schedule Data TeacherID Teacher name Teacher surname Subject email Action 5|Page Add teacher- takes the information entered into the different fields and creates a new teacher object added to the table Edit teacher- edits a certain field of the teacher object Delete teacherdeletes the teacher object selected Clear- clears the information into the text fields Logout- logs the admin out and secures program Periods and subjects screen Description This screen allows the user to edit a period time and allows the user to add a new subject Data start Time end Time Subject Action Edit period- edits the start Time and end Time for period selected Delete subject- deletes selected subject Add new subject – adds a new subject object from data entered into the subject text field Logout- logs the admin out and secures program 6|Page Statistics Screen Description This screen allows the user to choose a subject and see how many periods the selected subject has in a week Data Select lesson 7|Page Action Get lessons in the week- runs the program to get the number of lessons in a week for the selected subject Logout- logs the admin out and secures program Settings page Description This screen allows the user to change the username and password for the admin 8|Page Data New username New password Action Confirm buttonupdates new username and password for admin login Help screen Description This screen allows the new admin/ owner of program to understand how to use the program Data N/A 9|Page Action Teacher help- gives information regarding how to add new teacher Periods and subject help- gives information regarding period and subject adding, deleting, and editing Admin help- gives information on admin settings such as changing password Okay- clears text area Customer careallows the user of the program to contact the maker for bugs and more help Schedule screen Description This screen allows the admin to edit which lessons happen at which period times Data Selected person Action Edit lesson- updates table at selected period which selected new person Back to main- takes admin back to schedule screen NOTE: All schedule screens (Monday- Friday) are the same and thus do not need to be documented individually. The documentation here applies to all the tabs connected to this panel 10 | P a g e Customer care Description This screen allows the admin to contact the developer to report bugs, access more help 11 | P a g e Data Firstname Surname Email Description of issue Action Send button- sends the issue to the developer email adress Adding person screen (guest login) Description This screen allows the user to add a new teacher/ person to add into the weekly schedule 12 | P a g e Data TeacherID Teacher name Teacher surname Subject email Action Add new person- takes the information entered into the different fields and adds a teacher object into the table Schedule Screen (guest login) Description This screen allows the guest to add themselves to the schedule at a free slot only Data Selected person 13 | P a g e Action Edit lesson- updates table at selected period which selected new person logout- takes guest back to login screen NOTE: All schedule screens (Monday- Friday) are the same and thus do not need to be documented individually. The documentation here applies to all the tabs connected to this panel except for “add guest” and “help” tabbed panes Help screen (guest login) Description This screen allows the guest of program to understand how to add themselves to schedule Data N/A 14 | P a g e Action schedule help- gives information to the user to understand how to add themselves into the schedule guest help- gives information to the guest on how to add Program flow Login Screen input username input password if username or password are incorrect output “Username and password not found” end if else if username and password correct logging in opens schedule pane on main panel end else if if guest opens guest schedule screen end if 15 | P a g e themselves to guest table okay- clears text area from previous help customer care- takes guest to customer care screen teacher screen Fill Teachers: filltblTeacher (DefaultTableModel model) model.setRowCount(0) sql "SELECT * FROM Teachers ORDER BY TeacherID" rs db.getResults(sql) try while rs.next model.addRow({getInt("TeacherID"), getString("Firstname"), getString("Surname"), getInt("Subject"), getString("Email”)}) end while catch (SQLException ex) output("error") Adding teacher Input(firstname, surname, subject, email) sql <-- insert into Teachers(Firstname, Surname, Subject, Email) values(Firstname, Surname, Subject, Email) Update Teacher: Input(firstname, surname, subject, Email) sql update Students set Firstname = firstname, surname = surname, Subject = Subject, Emial = Email WHERE TeacherID = TeacherID Delete Teacher: sqlA delete from Teacher where TeacherID = TeacherID Logout Button: Logs out and Opens the login screen Clear button: 16 | P a g e setTextFields(“ “) Schedule Screen “Go to schedule” button - takes the admin to new panel with the weekly schedule logout button - logs admin out and goes back to login screen periods and subjects screen filling tblSubjects filltblSubjects (DefaultTableModel model) model.setRowCount(0) sql " select * from subjects order by subjectID" rs db.getResults(sql) try while rs.next model.addRow({getInt("SubjectID"), getString("Subject")}) end while catch (SQLException ex) output("error") add new subject button Input(subject) 17 | P a g e sql <-- insert into Subjects(subject) values(subject) delete subject sqlA delete from Students where StudentID = studentID filling tblPeriods filltblPeriods (DefaultTableModel model) model.setRowCount(0) sql " select * from periods order by periodID" rs db.getResults(sql) try while rs.next model.addRow({getInt("SubjectID"), getString("StartTime"), getString(“EndTime”)}) end while catch (SQLException ex) output("error") edit period time Input(StartTime, EndTime) sql update Periods set StartTime=StartTime, endTime = endTime WHERE PeriodID = periodID logout button - logs admin out and goes back to login screen Settings Screen Update admin button: Input(username, password) sql update Login set Username =username, password = password Where ID = ID 18 | P a g e Help Screen Customer care button - Opens customer care screen Teacher Help button - Displays information in text area about teacher panel Period and Subject Help button - Displays information on period an subject panel in text area Admin help button - Displays information in the text area regarding the admin Okay button - Clears text area Customer Care Screen Send help email sendCustomerCareEmail(String email, String messageSend, String subject, String name) throws IOException session Session.getInstance props, new javax.mail.Authenticator() protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(username, password)}) try message new MimeMessage(session) setFrom(new InternetAddress("my.sched@outlook.com")) setRecipients(Message.RecipientType.TO, InternetAddress.parse(email)) setRecipients(Message.RecipientType.TO, InternetAddress.parse(“my.sched@outlook.com)) setSubjectSubject) setText(messageSend + \n\n + name") 19 | P a g e Transport.send(message) catch (MessagingException e) Output(“Error”) Statistics screen Get lessons in the week button Input(num) sqlMon "SELECT count(*) AS total\n" + "FROM Schedule2\n" + "where monday = ' " + num + " ' " rsMon db.getResults(sqlMon) sqlTue "SELECT count(*) AS total\n" + "FROM Schedule2\n" + "where Tuesday = ' " + num + " ' " rsTue db.getResults(sqlTue) sqlWed "SELECT count(*) AS total\n" + "FROM Schedule2\n" + "where Wednesday = ' " + num + " ' " rsWed db.getResults(sqlWed) sqlThu "SELECT count(*) AS total\n" + "FROM Schedule2\n" + "where Thursday = ' " + num + " ' " rsThu db.getResults(sqlThu sqlFri "SELECT count(*) AS total\n" + "FROM Schedule2\n" + "where Friday = ' " + num + "'" rsFri db.getResults(sqlFri) while(rsMon.next) rsMon.getInt(“total”) endWhile while(rsTue.next) rsTue.getInt(“total”) endWhile 20 | P a g e while(rsWed.next) rsWed.getInt(“total”) endWhile while(rsThu.next) rsThu.getInt(“total”) endWhile while(rsFri.next) rsFri.getInt(“total) endWhile catch (SQLException ex) output("error") output(mon + tue + wed + thu+fri) Schedule Screen Monday filltblMonday(DefaultTableModel model) model.setRowCount(0) sql "SELECT Schedule2.periodID, teachers.firstname, teachers.surname, teachers.subject, periods.starttime, periods.endtime \n" + "FROM periods INNER JOIN (Teachers INNER JOIN Schedule2 ON Teachers.TeacherID = Schedule2.monday) ON periods.periodID = Schedule2.periodID\n" + "WHERE teachers.teacherid = Schedule2.monday;" rs db.getResults(sql) try while rs.next model.addRow(new Object[] {rs.getInt("periodID") , rs.getString("firstname"), rs.getString("surname"),rs.getString("subject"),rs.getString("startTime"),rs.getString("endTi me")}) endWhile catch (SQLException ex) output("error") 21 | P a g e Schedule Screen Tuesday filltblTuesday(DefaultTableModel model) model.setRowCount(0) sql "SELECT Schedule2.periodID, teachers.firstname, teachers.surname, teachers.subject, periods.starttime, periods.endtime \n" + "FROM periods INNER JOIN (Teachers INNER JOIN Schedule2 ON Teachers.TeacherID = Schedule2.tuesday) ON periods.periodID = Schedule2.periodID\n" + "WHERE teachers.teacherid = Schedule2.Tuesday” rs db.getResults(sql) try while rs.next model.addRow(new Object[] {rs.getInt("periodID") , rs.getString("firstname"), rs.getString("surname"),rs.getString("subject"),rs.getString("startTime"),rs.getString("endTi me")}) endWhile catch (SQLException ex) output("error") Schedule Screen Wednesday filltblWednesday(DefaultTableModel model) model.setRowCount(0) sql "SELECT Schedule2.periodID, teachers.firstname, teachers.surname, teachers.subject, periods.starttime, periods.endtime \n" + "FROM periods INNER JOIN (Teachers INNER JOIN Schedule2 ON Teachers.TeacherID = Schedule2.Wednesday) ON periods.periodID = Schedule2.periodID\n" + "WHERE teachers.teacherid = Schedule2.Wednesday" rs db.getResults(sql) try while rs.next 22 | P a g e model.addRow(new Object[] {rs.getInt("periodID") , rs.getString("firstname"), rs.getString("surname"),rs.getString("subject"),rs.getString("startTime"),rs.getString("endTi me")}) endWhile catch (SQLException ex) output("error") Schedule Screen Thursday filltblThursday(DefaultTableModel model) model.setRowCount(0) sql "SELECT Schedule2.periodID, teachers.firstname, teachers.surname, teachers.subject, periods.starttime, periods.endtime \n" + "FROM periods INNER JOIN (Teachers INNER JOIN Schedule2 ON Teachers.TeacherID = Schedule2.thursday) ON periods.periodID = Schedule2.periodID\n" + "WHERE teachers.teacherid = Schedule2.thursday" rs db.getResults(sql) try while rs.next model.addRow(new Object[] {rs.getInt("periodID") , rs.getString("firstname"), rs.getString("surname"),rs.getString("subject"),rs.getString("startTime"),rs.getString("endTi me")}) endWhile catch (SQLException ex) output("error") Schedule Screen Friday filltblFriday(DefaultTableModel model) model.setRowCount(0) sql "SELECT Schedule2.periodID, teachers.firstname, teachers.surname, teachers.subject, periods.starttime, periods.endtime \n" + 23 | P a g e "FROM periods INNER JOIN (Teachers INNER JOIN Schedule2 ON Teachers.TeacherID = Schedule2.friday) ON periods.periodID = Schedule2.periodID\n" + "WHERE teachers.teacherid = Schedule2.friday" rs db.getResults(sql) try while rs.next model.addRow(new Object[] {rs.getInt("periodID") , rs.getString("firstname"), rs.getString("surname"),rs.getString("subject"),rs.getString("startTime"),rs.getString("endTi me")}) endWhile catch (SQLException ex) output("error") fill combo box with names for schedule for everyday of week fillComboBoxWithName(JComboBox cmbMon, JComboBox cmbTue, JComboBox cmbWed, JComboBox cmbThu, JComboBox cmbFri) cmbMon.removeAllItems() cmbTue.removeAllItems() cmbWed.removeAllItems() cmbThu.removeAllItems() cmbFri.removeAllItems() sql "Select firstname, surname from teachers" rs db.getResults(sql) try while rs.next() cmbMon.addItem(rs.getString("firstname")+ " " + rs.getString("surname")) cmbTue.addItem(rs.getString("firstname")+ " " + rs.getString("surname")) cmbWed.addItem(rs.getString("firstname")+ " " + rs.getString("surname")) cmbThu.addItem(rs.getString("firstname")+ " " + rs.getString("surname")) 24 | P a g e cmbFri.addItem(rs.getString("firstname")+ " " + rs.getString("surname")) end while catch (SQLException ex) Output("Error") Guest Schedule Screen Monday filltblMondayG(DefaultTableModel model) model.setRowCount(0) sql "SELECT Schedule2.periodID, teachers.firstname, teachers.surname, teachers.subject, periods.starttime, periods.endtime \n" + "FROM periods INNER JOIN (Teachers INNER JOIN Schedule2 ON Teachers.TeacherID = Schedule2.monday) ON periods.periodID = Schedule2.periodID\n" + "WHERE teachers.teacherid = Schedule2.monday;" rs db.getResults(sql) try while rs.next model.addRow(new Object[] {rs.getInt("periodID") , rs.getString("firstname"), rs.getString("surname"),rs.getString("subject"),rs.getString("startTime"),rs.getString("endTi me")}) endWhile catch (SQLException ex) output("error") Guest Schedule Screen Tuesday filltblTuesdayG(DefaultTableModel model) model.setRowCount(0) 25 | P a g e sql "SELECT Schedule2.periodID, teachers.firstname, teachers.surname, teachers.subject, periods.starttime, periods.endtime \n" + "FROM periods INNER JOIN (Teachers INNER JOIN Schedule2 ON Teachers.TeacherID = Schedule2.tuesday) ON periods.periodID = Schedule2.periodID\n" + "WHERE teachers.teacherid = Schedule2.Tuesday” rs db.getResults(sql) try while rs.next model.addRow(new Object[] {rs.getInt("periodID") , rs.getString("firstname"), rs.getString("surname"),rs.getString("subject"),rs.getString("startTime"),rs.getString("endTi me")}) endWhile catch (SQLException ex) output("error") Guest Schedule Screen Wednesday filltblWednesdayG(DefaultTableModel model) model.setRowCount(0) sql "SELECT Schedule2.periodID, teachers.firstname, teachers.surname, teachers.subject, periods.starttime, periods.endtime \n" + "FROM periods INNER JOIN (Teachers INNER JOIN Schedule2 ON Teachers.TeacherID = Schedule2.Wednesday) ON periods.periodID = Schedule2.periodID\n" + "WHERE teachers.teacherid = Schedule2.Wednesday" rs db.getResults(sql) try while rs.next model.addRow(new Object[] {rs.getInt("periodID") , rs.getString("firstname"), rs.getString("surname"),rs.getString("subject"),rs.getString("startTime"),rs.getString("endTi me")}) endWhile catch (SQLException ex) 26 | P a g e output("error") Guest Schedule Screen Thursday filltblThursdayG(DefaultTableModel model) model.setRowCount(0) sql "SELECT Schedule2.periodID, teachers.firstname, teachers.surname, teachers.subject, periods.starttime, periods.endtime \n" + "FROM periods INNER JOIN (Teachers INNER JOIN Schedule2 ON Teachers.TeacherID = Schedule2.thursday) ON periods.periodID = Schedule2.periodID\n" + "WHERE teachers.teacherid = Schedule2.thursday" rs db.getResults(sql) try while rs.next model.addRow(new Object[] {rs.getInt("periodID") , rs.getString("firstname"), rs.getString("surname"),rs.getString("subject"),rs.getString("startTime"),rs.getString("endTi me")}) endWhile catch (SQLException ex) output("error") Guest Schedule Screen Friday filltblFridayG(DefaultTableModel model) model.setRowCount(0) sql "SELECT Schedule2.periodID, teachers.firstname, teachers.surname, teachers.subject, periods.starttime, periods.endtime \n" + "FROM periods INNER JOIN (Teachers INNER JOIN Schedule2 ON Teachers.TeacherID = Schedule2.friday) ON periods.periodID = Schedule2.periodID\n" + "WHERE teachers.teacherid = Schedule2.friday" rs db.getResults(sql) 27 | P a g e try while rs.next model.addRow(new Object[] {rs.getInt("periodID") , rs.getString("firstname"), rs.getString("surname"),rs.getString("subject"),rs.getString("startTime"),rs.getString("endTi me")}) endWhile catch (SQLException ex) output("error") fill combo box with names for Guest schedule for everyday of week fillComboBoxWithNameG(JComboBox cmbMonG, JComboBox cmbTueG, JComboBox cmbWedG, JComboBox cmbThuG, JComboBox cmbFriG) cmbMonG.removeAllItems() cmbTueG.removeAllItems() cmbWedG.removeAllItems() cmbThuG.removeAllItems() cmbFriG.removeAllItems() sql "Select firstname, surname from teachers" rs db.getResults(sql) try while rs.next() cmbMonG.addItem(rs.getString("firstname")+ " " + rs.getString("surname")) cmbTueG.addItem(rs.getString("firstname")+ " " + rs.getString("surname")) cmbWedG.addItem(rs.getString("firstname")+ " " + rs.getString("surname")) cmbThuG.addItem(rs.getString("firstname")+ " " + rs.getString("surname")) 28 | P a g e cmbFriG.addItem(rs.getString("firstname")+ " " + rs.getString("surname")) end while catch (SQLException ex) Output("Error") Guest Screen Help Schedule help button - Displays information on how to use the schedule as a guest Guest help button - Displays information on how to add yourself to teacher’s table Okay button - Clears text area Customer care button - Opens customer care screen Add Guest Screen Fill tblTeachers filltblTeacher(DefaultTableModel model) model.setRowCount(0) sql "SELECT * FROM Teachers ORDER BY TeacherID" rs db.getResults(sql) try while rs.next model.addRow({getInt("TeacherID"), getString("Firstname"), getString("Surname"), getInt("Subject"), getString("Email”)}) end while catch (SQLException ex) 29 | P a g e output("error") Adding teacher Input(firstname, surname, subject, email) sql <-- insert into Teachers(Firstname, Surname, Subject, Email) values(Firstname, Surname, Subject, Email) Logout Button: Logs out and Opens the login screen Clear button: setTextFields(“ “) 30 | P a g e Class diagrams and OOP Principles ConnectDB Fields - url: string conn: Connection resultSet: ResultSet Methods: + Constructor() + getResults(query : String) : ResultSet + updateDatabase(query : String) + getConn : Connection Method Constructor getResults updateDatabase 31 | P a g e Functions Default constructor that locates and assigns the location of the database to a variable and then creates a connection to it. Typed method that executes the entered String as a query in the RegisterPATDB database and returns a ResultSet of the results. Void method that accepts a string and executes it as an update query in the RegisterPATDB database. Teacher Fields - teacherID : integer firstname: String surname : String Subject: String Email : String Methods + Constructor (teacherID : integer, firstname : String, surname : String, Subject : String, Email : String) + Constructor (firstname : String, surname : String, subject : String, email: String) + getTeacherID() : integer + getFirstname() : String + getSurname() : String + getSubject() : String + getEmail() : String + setTeacherID(teacherID : integer) + setFirstname(firstname : String) + setSurname(surname : String) + setSubject(subject : String) + setEmail(Email: String) Constructor getTeacherID, getFirstname, getSurname, getSubject, getEmail setTeacherID, setFirstname, setSurname, setSubject,setEmail 32 | P a g e Parametrised constructor that assigns the values of the parameters to the object’s fields. Accessor methods to get and return the values of the various fields. Mutator methods to set the values of various fields teacherManager Fields - db : ConnectDB Methods + Constructor() + fillTblTeacher(model : DefaultTableModel) + addTeacher(teacher:Teacher) + deleteTeacher(teacherID : integer) + getSelectedTeacher(studentID : integer) : Teacher + updateTeacher(selectedTeacher :Teacher) + getTeacherIDByName(name : String) + fillComboBoxWithSubject(cmbTeacherSubject : JComboBox) Methods Constructor fillTblTeacher addTeacher deleteTeacher getSelectedTeacher updateTeacher fillComboBoxWithSubject 33 | P a g e Functions Constructor creates the teacherManager object Void method that fills a table with the teacher’s information in the UI Void method that creates a new Teacher object with fields from the Teacher class and adds to the table “teachers” in the database. Void method that deletes a student and all its details from the Teachers table in the database. Typed method to get the Teachers information out from the table when you click on their row. Void method that updates the details of an existing student in the table ‘Students’ of the database. Void method that fills the comboBox with each subject login Fields - id : int Username : String Password : String Methods + Constructor( id : int, username : String, password : String) + Constructor( username : String, password : String) + getId() : integer + getUsername() : String + getPassword() : String + setId(id : integer) + setUsername(username: String) + setPassword (password : String) Methods Constructor getId, getUsername, getPassword setId, setUsername, setPassword 34 | P a g e Functions Parametrised constructor that assigns the values of the parameters to the object’s fields. Accessor methods to get and return the values of the various fields Mutator methods to set the values of various fields LoginManager Fields - db : ConnectDB Methods + Constructor() + updateAdmin(selectedAdmin : Admin) Methods Constructor updateAdmin 35 | P a g e Functions Constructor creates the admin object Void method that updates the admins username and password in the Access database DataValidation Fields - db : ConnectDB - valid : boolean Methods + isValid() : Boolean + checkName(Firstname : String, lblError : JLabel) + checkSName: (sname : String, lblError : JLabel) + checkEmail(email: String, lblError : JLabel) + checkSubject (subject: String, lblError : JLabel) + checkPeriodEdit (period : String, lblError : JLabel) Methods isValid checkName checkSName checkEmail checkSubject checkPeriodEdit 36 | P a g e Function Returns the Boolean variable Void method that validates Any input of a name and returns an error message if it is invalid Void method that validates any surname and returns an error message if they are invalid. Void method that validates an email address and returns an error message if they are invalid. Void method that validates the name of a subject and returns an error message if they are invalid. Void method that validates format of a period time and returns an error message if they are invalid. EmailManager Fields Methods + sendCustomerCareEmail(email : String, messageSend : String, Subject : String, name : String) Methods sendCustomerCareEmail 37 | P a g e Functions Void method to send an email to app developer with a personal message Output Fields - outputMon : int - outputTue : int - outputWed : int - outputThu : int - outputFri ; int Methods + constructor(outputMon : int Methods sendCustomerCareEmail 38 | P a g e Functions Void method to send an email to app developer with a personal message NotificationManager Fields - outputMon : int - outputTue : int - outputWed : int - outputThu : int - outputFri ; int Methods + constructor(outputMon : int Methods sendCustomerCareEmail 39 | P a g e Functions Void method to send an email to app developer with a personal message Period Fields - periodID: int - startTime : String - endTime : String Methods + + + + + + + + constructor(periodID : int, startTime : String, endTime : String) constructor(startTime : String, endTime : String) getPeriodID() setPeriodID(periodID : int) getStartTime() setStartTime(startTime : String) getEndTime() SetEndTime(endTime : String) Methods constructor getPeriodID, getStartTime, getEndTime setPeriodID, setStartTime, setEndTime 40 | P a g e Functions Parametrised constructor that assigns the values of the parameters to the object’s fields Accessor methods to get and return the values of the various fields Mutator methods to set the values of various fields PeriodManager Fields - db : ConnectDB Methods + + + filltblPeriods(model : DefaultTableModel) getSelectedPeriod(periodID : int) updatePeriod(selectedPeriod : Period) Methods filltblPeriods getSelectedPeriod updatePeriod 41 | P a g e Functions Void method that fills a table with the period information and returns the generated table model. Typed method to get period object out from the table when you click on its row Void method that updates the details of an existing period in the Periods table of the database. Subjects Fields - subjectID: int - subject Methods + + + + + + constructor(subjectID : int, subject : String) constructor(Subject) getSubjectID() setSubjectID(subjectID : int) getSubject() setSubject(subject : String) Methods constructor getSubjectID, getSubject setSubjectID, SetSubject 42 | P a g e Functions Parametrised constructor that assigns the values of the parameters to the object’s fields Accessor methods to get and return the values of the various fields Mutator methods to set the values of various fields SubjectManager Fields - db : ConnectDB Methods + + + + + filltblSubject(model : DefaultTableModel) addSubject(subject : Subjects) fillComboBoxWithSubjects(cmbSubjectG : JComboBox) getSelectedSubject(subjectID : int) deleteSubject(id : int) Methods filltblSubjects addSubject fillComboBoxwithSubjects getSelectedSubject deleteSubject 43 | P a g e Functions Void method that fills a table with the Subject information and returns the generated table model. Void method that adds a new subject with all the necessary fields of the Student class to the table Subjects table in the access database Void method that fills a specified comboBox with all the subject names Typed method to get the subject information out from the table when you click on its row. Void method that deletes a Subject and all its details from the subject table in the database ScheduleManager Fields - db : ConnectDB Methods + + + + + + + + + + + + + constructor() filltblMonday(model : DefaultTableModel) filltblTuesday(model : DefaultTableModel) filltblWednesday(model : DefaultTableModel) filltblthursday(model : DefaultTableModel) filltblFriday(model : DefaultTableModel) fillComboBoxWithName(cmbMon : JComboBox, cmbTue : JComboBox, cmbWed : JComboBox, cmbThu : JComboBox, cmbFri : JComboBox) fillComboBoxWithNameG(cmbMonG : JComboBox, cmbTueG : JComboBox, cmbWedG : JComboBox, cmbThuG : JComboBox, cmbFriG : JComboBox) updatePeriod(selectedPeriod : UpdatePerson) updatePeriodTue(selectedPeriodTue : UpdatePerson) updatePeriodWed(selectedPeriodWed : UpdatePerson) updatePeriodThu(selectedPeriodThu : UpdatePerson) updatePeriodFri(selectedPeriodFri : UpdatePerson) Methods Constructor Functions Constructor creates the ScheduleManager object filltblMonday, filltblTuesday, Void method that fills a table with filltblWednesday, filltblThursday, the relevant information for each day filltblFriday of the week and returns the generated table models. fillComboBoxwithName, Void method that fills distinct fillComboBoxWithnameG comboBoxes with the name and surname of teachers/ persons to be added to the tables updatePeriod, updatePeriodTue, Void method that updates the details updatePeriodWed, updatePeriodThu, of an existing Table in the relevant updatePeriodFri tables in the database. 44 | P a g e Secondary Storage design My choice of secondary storage was to use Microsoft access as my data base to store subjects, periods, days of the week, teachers/persons and their data as well as the user login username and password. My databased in normalised in 3NF. I used a txt file as well to keep integers to read to show a notification depending on the number placement. - Login(ID : integer, username : String, password : String) - Subjects(SubjectID : int, subjects : string) Periods(periodID : int, startTime : String, endTime : String) Schedule2(PeriodID : int, Monday : Int, Tuesday : int, Wednesday : int, Thursday : int, Friday : int) Teachers(teacherID : int, firstname : String, Surname : String, Subject: String, Email :String) Relationships: The subject name in subjects table is connected to the subject in the teacher table Help pages: The help in my application can be accessed by the help tabs 45 | P a g e Help in admin login 46 | P a g e Help in guest login 47 | P a g e CustomerCare help 48 | P a g e Login Table 49 | P a g e Schedule2 table 50 | P a g e Subject Table 51 | P a g e Period Table 52 | P a g e Teacher Table 53 | P a g e Txt File full 54 | P a g e Explanation of Secondary Storage Design: A database is an efficient way to store lots of data. The data is easily divided and connected through tables. By using normalisation, the database will not have redundancy or abnormalities. Using a query is a simple and easy way to access, change, add or delete certain data from tables of your choosing. I have learned how to work with Microsoft access and code in SQL through my school curriculum therefore it has been the best choice of imine to use for my application. My application makes use of 5 tables which information is taken from and put into different tables in my application. I have used a txt file for storing the integers needed for my Notification code because it uses little space and I only need 5 integers maximum written into the txt file. 55 | P a g e Explanation of Primary data structure related to secondary storage: Teacher table: - - An OOP Teacher class was created with fields that mapped to fields of the Teacher table in my database. This allowed me to make teacher objects to work with the data from the Teacher table. A TeacherManager manager class was used to retrieve, edit, add, delete and manipulate data from the Teacher table using various SQL statements. Period table: - - An OOP Period class was created with fields that mapped to fields of the period table in my database. This allowed me to make period objects to work with the data from the Period table. A PeriodManager manager class was used to retrieve, edit, add, delete and manipulate data from the Period table using various SQL statements. Subject table: - - An OOP Subject class was created with fields that mapped to fields of the Subject table in my database. This allowed me to make subject objects to work with the data from the Teacher table. A SubjectManager class was used to retrieve, edit, add, delete and manipulate data from the Subject table using various SQL statements 56 | P a g e