Hi! I'm currently working on a project that has 2 users with different roles (instructor and student).
These three are the requirements:
1. Both users should have to register, login, logoff, view the result of quiz.
2. Instructor should be able to create a quiz (I have to use a vector for loading quiz questions from question bank file)
3. Student should be able to take the quiz
I'm trying to plan/draw the program first before I write the code but I'm not sure what order I should write the code.
Should I make the users register first?
And if they register as 1)Instructor, then give choices of what instructor can do?
If you think about the project in a slightly different way you will see the logon order doesn't matter and both instructor and student don't need to be both logged on. Both need to be registered to use the data as permiited by their role though.
You have data (ie the quiz, results, registrations) and various users (instructors, students) who access the data in different ways.
So think about it as a set of menu options and who and how users interact with the data.
The student logon is one function, the instructor is another as you have done.
Maybe have a student menu, another one for an instructor and each will have separate functions using the same quiz and a results data set for each student.
The instructor can create a new quiz, mark a completed quiz and record the results.
A student gets to answer the quiz (if one exists) and read the results.