Alexeys-HW-4 - student web server

advertisement

Alexey Strakovsky alexeys@gwu.edu

CS4243-4: Senior Design

HW4: Design Homework Part 1

Physics Exercise Generation and Simulation Interface

The general purpose of this project is to create a system which can be used by both students and instructors to help students gain a better understanding of physics. Students will be able to log into a web-based interface, which will then allow them to practice in whatever area of physics they choose.

The system will generate random word problems based on the student’s preference, as well as physical simulations matching those word problems. This will enable students to better understand what they are doing, as well as allow them to see the results of their solution in the simulation. Instructors will also be able to make use of the system, which will enable them to log in and write custom word problems and simulations for students to solve.

Users and Their Use Cases

Student: A student who will access the system in order to practice physics problems. o Use Case 1: A student wants to register into the system.

 Actors: System, Student.

 Pre-condition: An unknown user is accessing the web interface of the system.

 Trigger Action: The user asks the system to register them as a student.

 Workflow:

Student: clicks “register as student” button.

System: displays registration prompt asking for an email address and password.

Student: fills in prompt and clicks on “submit” button.

System: records the student in the database and returns the user to the main page, displaying a message that they have been registered and can now login.

 Features and components:

Web interface with options.

Database to record login data. o Use Case 2: A student wants to login into the system.

 Actors: System, Student.

 Pre-condition: An unknown user is accessing the web interface of the system.

 Trigger Action: The user asks the system to login as a student.

 Workflow:

Student: clicks “login as student” button.

System: displays login prompt asking for an email address and password.

Student: fills in prompt and clicks on “login” button.

System: accepts the student if the information matches the database, or rejects and redirects to main page if not.

 Features and components:

Web interface with options.

Database to read login data from. o Use Case 3: A student wants to practice on randomly generated physics problems in an area of their choice.

 Actors: System, Student.

 Pre-condition: A student is logged into the system.

 Trigger Action: The student asks to practice on randomly generated physics problems.

 Workflow:

Student: clicks “practice on random problems” button.

System: displays a list of known formulae/concepts

Student: selects one of the choices.

System: generates a random physics word problem based on the choice and simulates it.

Student: selects an answer.

System: simulates the student’s answer and informs them if they were correct or not, and if not, what the correct answer was. Then it records statistics and gives the student the option to go on to a new problem or exit.

Student: chooses to continue or exit.

System: generates a new problem or exits back to the main page based on the student’s choice.

 Features and components:

Web interface with options.

Sentence parser capable of generating physics word problems.

Physics simulator for simulating problems.

Database to record statistics. o Use Case 4: A student wants to practice on a specific custom problem created by an instructor.

 Actors: System, Student.

 Pre-condition: A student is logged into the system.

 Trigger Action: The student asks to find a custom problem based on a unique ID they have been given for finding it.

 Workflow:

Student: clicks “practice on custom problems” button.

System: displays prompt for custom problem ID.

Student: enters custom problem ID.

System: find and displays the custom problem, or gives an error and returns to the main page if the problem cannot be found.

Student: selects an answer to the problem.

System: simulates the student’s answer and informs them if they were correct or not, and if not, what the correct answer was. Then it records statistics and gives the student the option to enter a new problem ID or exit.

Student: chooses to continue or exit.

System: retrieves a new problem or exits back to the main page based on the student’s choice.

 Features and components:

Web interface with options.

Physics simulator for simulating problems.

Database to record statistics.

o Use Case 5: A student wants to view their statistics.

 Actors: System, Student.

 Pre-condition: A student is logged into the system.

 Trigger Action: The student asks to view their previous statistics.

 Workflow:

Student: clicks “view statistics” button.

System: reads statistics from the database and displays them.

Student: clicks on “exit” button when done.

System: returns the student to the main page.

 Features and components:

Web interface with options.

Database to read statistics from. o Use Case 6: A student wants to modify their login details.

 Actors: System, Student.

 Pre-condition: A student is logged into the system.

 Trigger Action: The student asks to modify their login details.

 Workflow:

Student: clicks “modify account” button.

System: displays prompt asking for the current password and a new email address and/or password.

Student: fills in prompt and clicks on “submit” button.

System: if the old password matches, records the student in the database and returns the user to the main page, displaying a message that modification of login data was successful. If no match, gives an error and returns the student to the main page.

 Features and components:

Web interface with options.

Database to read and record login data. o Use Case 7: A student wants to logout.

 Actors: System, Student.

 Pre-condition: A student is logged into the system.

 Trigger Action: The student asks to logout.

 Workflow:

Student: clicks “logout” button.

System: logs the student out and displays a “logout successful” message.

 Features and components:

Web interface with options.

Instructor: An instructor who will access the system in order to create custom problems for students to solve. o Use Case 1: An instructor wants to register into the system.

 Actors: System, Instructor.

 Pre-condition: An unknown user is accessing the web interface of the system.

 Trigger Action: The user asks the system to register them as an instructor.

 Workflow:

Instructor: clicks “register as instructor” button.

System: displays registration prompt asking for an email address and password.

Instructor: fills in prompt and clicks on “submit” button.

System: records the instructor in the database and returns the user to the main page, displaying a message that they have been registered and can now login.

 Features and components:

Web interface with options.

Database to record login data. o Use Case 2: An instructor wants to login into the system.

 Actors: System, Instructor.

 Pre-condition: An unknown user is accessing the web interface of the system.

 Trigger Action: The user asks the system to login as an instructor.

 Workflow:

Instructor: clicks “login as instructor” button.

System: displays login prompt asking for an email address and password.

Instructor: fills in prompt and clicks on “login” button.

System: accepts the instructor if the information matches the database, or rejects and redirects to main page if not.

 Features and components:

Web interface with options.

Database to read login data from. o Use Case 3: An instructor wants to create a custom problem for students to practice with.

 Actors: System, Instructor.

 Pre-condition: An instructor is logged into the system.

 Trigger Action: The instructor asks to create a new custom problem.

 Workflow:

Instructor: clicks “create new custom problem” button.

System: displays prompt for writing the word problem and setting up the simulator.

Instructor: writes problem and sets up the simulator.

System: accepts the problem and allows the instructor to test it.

Instructor: tests problem and chooses to keep it or start a new one.

System: records the problem in the database if it was accepted by the instructor or scraps it, then returns the instructor to the main page with a code for sending the problem to students if it was accepted.

 Features and components:

Web interface with options.

Physics simulator for simulating problems.

Database to record problems. o Use Case 4: An instructor wants to edit a custom problem they previously created.

 Actors: System, Instructor.

 Pre-condition: An instructor is logged into the system.

 Trigger Action: The instructor asks to edit one of their custom problems.

 Workflow:

Instructor: clicks “edit custom problems” button.

System: displays the instructor’s custom problems and places an “edit” button next to each one.

Instructor: clicks “edit” button.

System: allows the instructor to edit all aspects of the problem as if they were creating it, then allows them to test it.

Instructor: tests problem and chooses to keep the changes or go back to editing.

System: records the changes when the instructor is happy with the results and sends the instructor back to the main page.

 Features and components:

Web interface with options.

Physics simulator for simulating problems.

Database to read and record problems. o Use Case 5: An instructor wants to view the statistics on their custom problems.

 Actors: System, Instructor.

 Pre-condition: An instructor is logged into the system.

 Trigger Action: The instructor asks to view the statistics on their problems.

 Workflow:

Instructor: clicks “view statistics” button.

System: reads statistics for each custom problem from the database and displays them.

Instructor: clicks on “exit” button when done.

System: returns the instructor to the main page.

 Features and components:

Web interface with options.

Database to read statistics from. o Use Case 6: An instructor wants to modify their login details.

 Actors: System, Instructor.

 Pre-condition: An instructor is logged into the system.

 Trigger Action: The instructor asks to modify their login details.

 Workflow:

Instructor: clicks “modify account” button.

System: displays prompt asking for the current password and a new email address and/or password.

Instructor: fills in prompt and clicks on “submit” button.

System: if the old password matches, records the instructor in the database and returns the user to the main page, displaying a message that modification of login data was successful. If no match, gives an error and returns the instructor to the main page.

 Features and components:

Web interface with options.

Database to read and record login data. o Use Case 7: An instructor wants to logout.

 Actors: System, Instructor.

 Pre-condition: An instructor is logged into the system.

 Trigger Action: The instructor asks to logout.

 Workflow:

Instructor: clicks “logout” button.

System: logs the instructor out and displays a “logout successful” message.

 Features and components:

Web interface with options.

A Basic Diagram of the System and its Components

Component requirements

Web interface o Display options clearly o Allow easy navigation o Allow physics engine and sentence parser to integrate with it properly

Sentence Parser o Must properly generate sentences o Must maintain correct physics and be clear

Physics engine o Must simulate real physics correctly o Must understand instructions from parser

Database o Store user login details o Store statistics o Store custom problems

Download