The program is a course simulator where users can create and take different courses and get evaluated for them. We chose to create this program as it felt relevant as we are all students and the subject matter felt familiar! Moreover, the program can be used as a way for students to create quizzes that they can test themselves for upcoming assessments with that allows them to monitor how they progress. The Tests cover 76% of all components but this includes portions that we would not be testing below is a picture showing the coverage of our tests:
#Set up (Windows)
In order to set up the databases on Windows use this link (https://dev.mysql.com/downloads/mysql/) and
download the version above all the default settings that the installer provides ensuring that the configuration is typical and when it asks for a root password please type coursesimgroup. After you have successfully installed the server login to the mysQl command using the root password and carry out the commands (press enter after each semicolon). To install on mac, first, go to https://dev.mysql.com/downloads/mysql/ or search MySQL Community Server.
Choose the operating system as MacOS, then select the OSVersion. If you are using MacBook M1 or M2, choose the ARM, if you are using MacBook Intel, Choose x86.
Second, open the download package, (if the Mac says the program can not be authenticated, just open the setting->Security and privacy->allow the file to install.) After installation is successful, if you did everything in the instructions, you can open the setting on MacBook now, and you will see a cute dolphin and two green dots. Finally, activate your MySQL. Go to terminal to type: mysql -u root -p If there is an error like: “zsh:command not found: mysql” Just type: alias mysql=/user/local/mysql/bin/mysql Then re-enter: mysql -u root -p, enter your password (coursesimgroup). Tip, you can use terminal to operate MySQL, or you can choose to download MySQL Workbench(to download workbench are pretty easy, just go to the MySQL website and choose your version of workbench, install it as other normal apps.)
Note: only perform these commands in MySQL if the files do not work.
-
Create database course_simulator;
-
use course_simulator;
-
create table students (StudentID Varchar(25), Password Varchar(25), CourseID Varchar(25), CourseGrade float);
-
create table courses (CourseID Varchar(25), PrerequisiteCourseID Varchar(25), PrerequisiteGrade float, Question Varchar(250), Answer Varchar(250), Points int);
-
create table sessioncourse (CourseID Varchar(25), Question Varchar(250), Answer Varchar(250), Points int);
-
create table sessionstudent (StudentID Varchar(25), Password Varchar(25), CourseID Varchar(25), CourseGrade float);
-
Show tables; (use this command to confirm that the above tables were made successfully!)
This is a course simulator in which the user can pick between an instructor mode and a student mode.
In instructor mode, the user can create a course. They must give a course code, prerequisites and the grade in them if the prerequisite field is left blank default is fifty and if they don't have prereqs this is reflected in the database, questions, answers and their corresponding number of points. Then that specific course is saved if all inputs are valid and the instructor can no longer modify the course.
In the student mode, the student must input a unique username and a password which creates a student account. They can go to the login screen and log in to this new account using the username and password.
The student is then able to see a list of all the courses. The student can choose to enroll in a course, however, they must meet the prerequisites to do that, if they don’t, they are not allowed to enroll.
Once the student picks a course, they can answer questions and then the course is evaluated for a grade.
- The user can create different student users that will have their own respective data on how they performed in different courses
- The user can log in to a created student user using a unique username and a password
- The user can create a course with a unique course id that may or may not have a prerequisite but will have questions and answers (as well as points assigned to them)
- The user can enrol in a course that they have the appropriate prerequisites for
- The user can run a course and answer its questions
- the user can evaluate their course and see what grade they got for that attempt
The different files are separated by what layer they fall in according to the clean architecture guidelines and are further divided by what feature they are specifically needed for.
We implemented a factory design patterns so that our program could potentially be extended and future subclasses of our courses, prerequisites or student entities can be incorporated and it also allowed for greater separation between our layers.
We included a builder design pattern for the creation of our courses as the courses are containing both questions and prerequisites which both require different methods to construct so it felt cleaner to implement this design pattern for this more complex class.
We also implemented an iterator design pattern within our course class as we needed a way to seamlessly iterate through the questions so that they can be presented to the user so they can answer them.
We used mock gateways so that we could test our interactors without causing issues to our set-up databases.
This is the diagram showing the related relationships regarding the create student feature:
This diagram illustrates the relationships between the components for the Login feature:
This is the diagram illustrating the course evaluator feature:
This is the diagram illustrating the run course feature:
This is a diagram for the course enrollment feature:
This is a diagram for the courses creation feature: