Documente Academic
Documente Profesional
Documente Cultură
Table of content
Table of content 1
Overview 2
Problem Statement 2
Flow Diagram 4
User Interface 5
Suggested text file format 10
Object Oriented approach with C++ 11
Overview
This is second assignment you would work on as part of your training. Overall, this assignment is
designed in a way to test the concepts you learnt in module 1, module 2 and module 3.
I guess you have already gathered lot of experience on C language by now by executing the project
that you completed. This is going to be your C++ project and will build further over where we left
while doing our C project. I hope this project is also going equally or more interesting as the last one.
In this project we will build an outer layer over the Simple Quiz System that we made during the last
project. Here we will add a module to create the question bank and also have a system of
authentication for the administrators who will do it.
Please note : You may approach this problem using either procedural or object oriented
approach. However we recommend that you should do it using the new features you have learnt
in C++.
Problem Statement
The modified system will now behave following way ..
Authentication
Administrators account is a protected account and it requires user name and password to be checked
from available list of administrators. Initially in the screen SC-1.1 the user is prompted to type in his
user name and password and once compared successfully, user is then taken to Question
management menu screen SC 1.1.0. In this menu 4 options are displayed where the user chooses
one of the tasks which he will like to do.
1. Once the user decides what to do he chooses the right option in the menu and based on
what he chooses, he is taken to the appropriate screen.
2. Adding of question will refer screen SC 1.1.0.1
3. Modifying questions will require the screen SC 1.1.0.2
4. For deleting any question system will use SC 1.1.0.3
5. For printing any questions list the system will produce another text file in the format SC
1.0.0.4
6. Choosing exit will take the user back to previous menu.
As discussed earlier in this module the user will appear in a test where 10 questions , one at a time.
These questions will picked up from a file containing 30 questions. Each question will have 4 answers.
User has to choose the correct one. When he submits his answer, the program will evaluate it
against stored answer for the specific questions. All the 10 questions will be evaluated in the similar
manner and marks will be assigned to the correctly chosen answers. At the end it will display the
marks that the user has secured.
Question bank
The question bank will be available in from of a predefined text file. The format of the text file will
be given. The questions in the text file should include questions on various subject like general
knowledge, sports, music, etc. For this project in a run we ask 10 questions but it is up to the
student to decide how many questions he will like to ask. Whatever numbers of questions are asked
the number questions in question banks are to be at least three times to avoid displaying same
questions over and over again.
1) The first part will show the questions and the corresponding answers with the correct
answer.
2) The second part will show category wise performance.
3) The part will show the total marks obtained by the quiz player.
Flow Diagram
Start
Yes
User Interface
Main Menu Opt =1 Add Questions
No
Opening Screen – SC-1.0 Yes
==================== Opt = 2 Modify Questions
YesQuiz Game ..
Welcome to Simple
Ch = 1 Admin Menu
No
Your Options Yes
No ==========
Delete Questions
Opt = 3
1) Administer Quiz
2) Attend the Quiz No
Yes
3) Exit
Opt = 4 Print Questions
No
Administrator Login Screen – SC-1.1
============================= Opt = 5
Administrator Login
================
User Name : XXXXXXXXXXXXXXXXX
Password : XXXXXXXXXXXXXXXXX
Yes
Ch = 2(Y/N) : X
Confirm Quiz Module
No
Manage Questions Screen – SC-1.1.0
Ch = 3Questions
Manage
===============
1) Add New Questions
Yes 2) Modify Existing Questions
3) Delete Questions
4) Print Question List
Stop
5) Exit from this menu
Add New Questions – SC-1.1.0.1
Modify Questions
================
Question Id : XXXX
Field to modify
1) Question Text
2) 1st Option
3) 2nd Option
4) 3rd Option
5) 4th Option
6) Correct Option
7) Allotted Marks
Enter your choice (1/2/3/4/5/6) : X <to enter>
<to display>
<Field Name> : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Enter new text (skip if not to modify) :
Confirm (Y/N) : X <to enter>
Delete Questions– SC-1.1.0.3
Delete Questions
===============
Question Id : XXXX <to enter>
<to Display>
Question Text : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Ist Option : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2nd Option : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
3rd Option : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
4th Option : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Correct Option : X
Allotted Marks : XXX
Confirm Deletion (Y/N) : X <to enter>
Question List
============================================================================
Question Id : XXXX
Question Text : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Ist Option : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2nd Option : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
3rd Option : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
4th Option : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Correct Option : X
Allotted Marks : XXX
Question Id : XXXX
Question Text : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Ist Option : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2nd Option : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
3rd Option : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
4th Option : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Correct Option : X
Allotted Marks : XXX
…..
…..
Quiz Welcome Screen - SC-1.2
===========================
Welcome to Simple Quiz Game
Ready (Y/N) : X
Available Answers :
1) XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2) XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
3) XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
4) XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Lock it (Y/N) : X
class Controller
{
public :
void menuController() { …..} // Refer to description in the earlier section
}
private :
Int userId ;
String username;
String actualUserName;
String password
}
public class Questions
{
private :
Int questionId;
String questionText;
String answerText1;
String answerText2;
String answerText3;
String answerText4;
Int correctAnswer;