You are on page 1of 22

Computer Science Coursework Abhi Agarwal The subjects will also be auto-generated by the program and not

inserted by the user. This form adds the subject, the description, the difficulty and the time of the task taken entered by the user on this form as a new record in the database. These details are then saved into an object of Homework_database and wrote into the random access file and the linked list.

Add the tasks and different homework

Add the description of tasks for every type of homework

Set the priority of the tasks

Add the time required for each homework and task

S2 - Generating the subjects

Computer Science Coursework 63

Computer Science Coursework Abhi Agarwal

It generates the list of subjects by reading the random access file of the current logged in user, and searches for his subjects field.

Computer Science Coursework 64

Computer Science Coursework Abhi Agarwal S3 - Delete the tasks and the different homework (in terms of subjects and in this case also ID) This form deletes the specified homework by the user from the Homework database; the user is able to select the ID, subject, description or the time taken as a preference to what he/she wants to delete using. The  program  then  flags  the  delete  field  of  this  record  as  “1”  and  saves   into an object of Homework_database and writes into the rand om access file and the linked list.

Delete the task and the different homework (in terms of subjects and ID)

Computer Science Coursework 65

Computer Science Coursework Abhi Agarwal S4 - Edit the tasks and the different homework: edit the description of tasks for every different homework, edit the time required for each homework, edit the priority of the tasks (in terms of importance) This form edits the specified homework by the user from the Homework database; the user is able to enter the subject, description, difficulty, the time taken, and these are non-optional. The program then overrides the field of this record with this data saves into an object of Homework_database and writes into the random access file and the linked list.

Edit or leave the same subject if required by the user Edit the description of the homework that was entered previously by the user

Edit the priority of the tasks (in terms of importance (easy, medium, hard))

Edit the time required for each homework. Computer Science Coursework 66

Computer Science Coursework Abhi Agarwal S5 - Allow free time and take consideration that Mr. Kothari might get distracted at some points. Also gives the optimum sleep time required by the user (taking into account they finish their work). It outputs a simulated timetable of the day, and the estimated time of completion. This form allows a timetable to be generated: that gives the user free time, the optimum sleep after their homework has been finished, and simulates a timetable of the day. It also outputs the estimated time of completion. The algorithm behind this searches the homework to calculate the total time required and asks the user to suggest a time to start the process. The demonstration below is one that starts the homework at 8:00am, and in this case the user finishes his homework in 2 hours by 10:00. Estimated timetable of completion: In this case it would be 10:00, as it gives a 15minute cool-down period.

Allows free time and takes consideration that Mr. Kothari might get distracted at some points, and give a 15 minute break between every 2-4 activities.

After the user is finished his work, it gives them the optimum sleep and free time that is required by the user.

Sort and prioritize the homework into numbers. Computer Science Coursework 67

Computer Science Coursework Abhi Agarwal S6 - Create the same basic environment Mr. Kothari uses, and lists the current homework to the user in a table format. In order to allow him to have a similar environment as before I have created a timetable view, which is the closest thing to a whiteboard that could have been used. This will allow him to see all his homework in a clear timetable view, and he will be able to keep this tab open. Displays all the homework categorized in the different subjects

Displays all the homework categorized in the different descriptions

Displays all the homework categorized in the different difficulties

Displays all the homework categorized in the different times

Computer Science Coursework 68

Computer Science Coursework Abhi Agarwal S7 - Print the timetable and homework as displayed by the table, or within the database itself. As stated by the client, this program needs to be able to print the timetable that has been generated by the database, and this form will be able to print it. This program will also print the Homework database that can be seen in the Homework database table as shown above. Generated Timetable The user will be able to choose the printer it  wants  to  print  using,  in  this  case  a  “HP”   printer.

The user will also be able to choose the page setup, the page size, Ect.

The  user  will  primarily  click  the  “Print”   button and it will popup the menu. This is a form of the timetable that has been generated.

This is the button for it to send it to the printer.

Computer Science Coursework 69

Computer Science Coursework Abhi Agarwal S8 - Homework Database

The Homework Database table has been generated from the Linked List and the database.

The  user  will  primarily  click  the  “Print”   button and it will popup the menu. This form will be the same as the previous print function.

Computer Science Coursework 70

Computer Science Coursework Abhi Agarwal S9 - The user will be able to add users to the database, and control who has access to the program, and the subjects will be auto generated and the  user  doesn’t  have  to  insert  them  himself. This program will be able to add multiple users to the program, who will be able to access and add their own homework. The databases of different users will be kept different on a day -to-day basis so everyone is able to access the right homework. The user is added to the database initially, and this is static throughout the program. When homework is added to the database, these selections of subjects are shown for the user to add. This is the username that is required for the user to authenticate into the program. This is the 4-digit pin code that the program uses for authentication. The user will type this twice for confirmation and the program will check if it's the same.

The  user  will  primarily  click  the  “Add   user”  button  and  it  will  insert  the  user   into the database.

The 7 groups of subjects you have in the IB, all the subjects possible are already put into a combo box, to save time. Computer Science Coursework 71

Computer Science Coursework Abhi Agarwal S10 - View users in the database. All the users within the program will also be able to view all the users, but  they  won’t  be  able  to  see  the  Password  or  the  Passcode  of  the   different users. This is the username of the different users in the database.

The password in this form is hidden  so  that  other  users  can’t   login and authenticate into the program.

This button will different users to view all the different users, it will allow them to go back and forth on different records.

The users will all be able to view all the subjects of each user.

Computer Science Coursework 72

Computer Science Coursework Abhi Agarwal S11 - Easy  and  simple  to  use  for  Mr.  Kothari  as  it  shouldn’t  take  more   than 5 minutes a day to put information into this program database. The menu is adaptable and easy to add/edit/delete/view/search and simulate. The menu opens next to it, and is easy to close. The File/Edit/Print is also easy to use. There are easy to use keyboard commands such as control A, in order to open the administration menu. This will be quick and easy, and Mr. Kothari will be able to adapt to them easily. The menus also open side by side so they will be able to quickly add and close them. These menus have keyboard commands in order to increase efficiency for the user.

The forms from default open in a side-by-side layout in order for the user to quickly access them and be able to intuitively predict the location of the forms. Computer Science Coursework 73

Computer Science Coursework Abhi Agarwal S12 - The backups will be taken by the program itself, this will take backups daily and override all the files. The program when logged out of the program will backup the databases itself and save them into a backup folder. This is the folder of the backups that are saved when you have logged out from the program.

Below this one are the files for the database itself, these are saved within the directory and it is made for both Mac and Windows directories.

This is the code that allows the program to backup when the logout sequence is started; it copies the directory into a separate directory.

Computer Science Coursework 74

Computer Science Coursework Abhi Agarwal S13 - The predefined range of the homework will be 0 -3 hours, so Mr. Kothari  won’t  be  able  to  add  homework,  which  is  more  than  3  hours  long   per day. When  you’re  adding  the  homework,  the  pre -defined till will be 15 minutes to 180 minutes, and it will allow the program to have a predefined range check. It saves an error to be created within the program. The task time in minutes goes from 15 minutes to 180 minutes, therefore it will go from 0-3 hours.

Computer Science Coursework 75

Computer Science Coursework Abhi Agarwal S14 - It will only handle a single user at a time, only one user can use the program at one time from one computer. This single-input user login system will only be able authenticate only one user at one time. Only one person will be able to login to this form at one time.

Computer Science Coursework 76

Computer Science Coursework Abhi Agarwal S15 - Program settings. This is where the part of the program where the user will be able to pick what time he wants to start generating the timetable at that point. It then saves it into a database and is read every time, and it is saved specifically for every different user. The time goes from 8:00 to 20:00, this is the time where the person will start working.

Computer Science Coursework 77

Computer Science Coursework Abhi Agarwal S16 - First time user created. When a new user uses the program for the first time, the program recognizes this, and pop-ups a different form for that user to put their details in.

Allows the first user to enter his details about the subjects and the username and password.

Allows the user to choose when to start studying, and set the time to simulate the timetable.

Computer Science Coursework 78

Computer Science Coursework Abhi Agarwal S17 - Mac or Windows The program will ask the user to decide whether the computer he/she is using is Windows or Macintosh.

The  user  will  either  enter  “m”  or  “w”   either for Mac or Windows, which will then change the URL of the file accordingly. Summary These satisfy the objectives which were proposed in A2: Mr. Kothari is able to add, edit, and delete tasks for every homework and the description, time and properties. This then is generated and sorted to allow for the maximum free time, and the optimum sleep th at he can get, and gives the same basic environment as before. This then is outputted to give the estimated time of completion and simulates a timetable of the day. Then Mr. Kothari is able to print this or use it in the way he requires to do so, also as a Table. It is easy to use and the clean menu allows for quick adding of information, and the command keys (when used too) can help the process be quicker. Backups are self-taken and the subjects are also generated by the user to decrease them typing it. Th ere are error checking embedded within the program, and this allows the errors to be caught before the simulation is ran. The program is also secure and uses a ten -digit pin system, which would mean that there would be 10! (10 factorial) ways to crack the system. There are 3 628 800 ways to break the system, and this would take a long time to crack it. This program is also written in Java so it can be used in both Windows or Mac as required by the user in the future. However, the program also only allows h omework from 1-3 hours, as shown by the user having to select the time frame, and this program will only work on Windows or Mac as there is no Linux support and Mr. Kothari  hasn’t  expressed  the  wanting  to  use  Linux.  There  is  also  no  

Computer Science Coursework 79

Computer Science Coursework Abhi Agarwal support for applications on the computer, and also messaging. It is single-user environment, so only one user uses at it a single time. Errors (EM – Error Message) EM1 - Login Screen (ERROR E4) This is the error generated when the username or password is incorrect in the databas e,  or  in  this  case  it  is  “not  found!”:

EM2 - Logout Message (ERROR E16) This is the option that is given to the user when the user wants to log out, this is a verification check:

EM3 - Opening multiple forms at once (ERROR E19) This is an error generated when multiple forms are trying to be opened, so you are only able to open one form, and when you close it you can open another one:

Computer Science Coursework 80

Computer Science Coursework Abhi Agarwal EM4 - Add Members - Validation length check, and verification check (ERROR E12) When two passcodes are different then it will generate an error message to ask the user to re-enter the passcodes again. This is the form of what it would look like when you are adding the code:

I have now entered data into the passcodes, and I have entered the 4 Digit Codes differently:

It will now generate this error message to show that the two passcodes don’t  match,  the  user  has  to  re -enter the data.

Computer Science Coursework 81

Computer Science Coursework Abhi Agarwal EM5 - Add Tasks – Limiting the amounts of tasks (ERROR E13) There is a limit on the amount of tasks that you can add to the database, it is 11 in this program, and there will be an error generated when one tries to add more than 11 tasks. This is what the error would look like:

EM6 - Add Tasks/Edit Tasks – 500 word limit on the description (ERROR E5, E6) There is a limit on the size of the description that you can add to the database, it is 500 words in this program, and this particular error will be generated if the description is larger than 500 words. This is what the error would look like:

Computer Science Coursework 82

Computer Science Coursework Abhi Agarwal EM7 - Member file not found error (ERROR E2) There will be no error generated but it will create a new member in the database, this is the form that will pop up in order to do this:

EM8 - Changing Operating system (ERROR E14) When the user tries to change the operati ng system there is a check that the program asks to confirm if the choice they have made is correct.

EM9 – Checking space left (ERROR E3) When the program loads and if there is not sufficient amount of memory this message will popup telling them to fix the space.

Computer Science Coursework 83

Computer Science Coursework Abhi Agarwal EM10, EM11 – Add new member (ERROR E20, E15) EM10 - When the adds a new member, the username has to be lower than or equal to 10 letters, or this error will be displayed to the user:

EM11 - When the adds a new member, the password has to be a integer or this error will be displayed:

Computer Science Coursework 84