Question about an assignment!

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?

Please give advice!
Do you have to make two versions, for the instructor, and for the student?
Have you started the assignment yet?
I need to make one program that runs with two different roles...
I only wrote up to here...:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
using namespace std;

int main()
{
	string instructor, student;
	int registerChoice;

	cout << "Welcome to Titanium Dashboard!\n";
	cout << "------------------------------------------------------\n";
	cout << "How can I help you?\n1)Register as Instructor\n2)Register as Student\n2)Login\n\nPlease Enter>> ";
	cin >> registerChoice;
Yes, both users shall register first. Otherwise, they cannot login and cannot do anything with the quiz.

Example, first we both registered on this forum and now are able to login, then you entered this question and I can answer it now.


Last edited on
closed account (48T7M4Gy)
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.
Topic archived. No new replies allowed.