.: About The Project :. .: About The Project :. The software Jabberwocky is a quizzing management software which is suited for a wide range of users – end users wanting to participate in quizzes, quizmasters who want a quizzing software during stage events, and quiz database administrators who want an easy way to manage large databases. To achieve this, the program offers the following user modes, with different feature sets: ➔ Normal User Mode: Anyone can use this mode, which allows a user to attempt questions in the included database. Questions are presented in a multiple-choice format, with automatic scoring. After the user chooses to exit the session, he / she is presented with extended statistics about his / her quizzing session. ➔ Administrator Mode: An authenticated mode, it allows the user to carry out advanced functions like managing question and / or user database, accessing overall statistics about all users, searching users by different criteria, and changing current administration password. It also offers a Quizmaster Mode, intended to be stage-round specific mode for a quiz, which allows the authenticated user to view the correct answer along with the questions and their options. Jabberwocky – The Quizzing Software also provides a help file accessible providing introductory information to users about its different features. Users have the option to use any one of the two versions of the program – a text- mode version, and a graphics-mode version dependent on the Borland Graphics Library. Both the versions are bundled with a demo question and user database, and also with the necessary graphics libraries for the graphics-mode version. page1
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
.: About The Project :..: About The Project :.
The software Jabberwocky is a quizzing management software which is suited for a wide range of users – end users wanting to participate in quizzes, quizmasters who want a quizzing software during stage events, and quiz database administrators who want an easy way to manage large databases. To achieve this, the program offers the following user modes, with different feature sets:
➔ Normal User Mode: Anyone can use this mode, which allows a user to attempt questions in the included database. Questions are presented in a multiple-choice format, with automatic scoring. After the user chooses to exit the session, he / she is presented with extended statistics about his / her quizzing session.
➔ Administrator Mode: An authenticated mode, it allows the user to carry out advanced functions like managing question and / or user database, accessing overall statistics about all users, searching users by different criteria, and changing current administration password. It also offers a Quizmaster Mode, intended to be stage-round specific mode for a quiz, which allows the authenticated user to view the correct answer along with the questions and their options.
Jabberwocky – The Quizzing Software also provides a help file accessible providing introductory information to users about its different features. Users have the option to use any one of the two versions of the program – a text-mode version, and a graphics-mode version dependent on the Borland Graphics Library. Both the versions are bundled with a demo question and user database, and also with the necessary graphics libraries for the graphics-mode version.
flag = 1;cout<<endl<<"Enter new details for user "<<name<<endl;u2.getuser();u2.score = u1.score; // To prevent reset of scoreu2.pass = u1.pass;u2.perc = u1.perc;temp.write((char*)&u2, sizeof(u2));
}else temp.write((char*)&u1, sizeof(u1));
}if (flag == 0)
cout<<endl<<"Username you searched for does not exist!"<<endl;
else cout<<endl<<"User with username "<<check<<" has been edited."<<endl;
cout<<endl<<"Press any key to continue...";getch();file.close();temp.close();remove("user.dat");rename("temp.dat", "user.dat");
flag = 1;u1.showuser();cout<<endl<<"Press any key to
continue...";getch();
}
page6
}if (flag == 0){
cout<<endl<<"Age you searched for does not exist in any record!"<<endl;
cout<<endl<<"Press any key to continue...";getch();
}break;
default : cout<<endl<<"You entered an invalid choice! Press any key to continue...";
getch();}file.close();
}
void highscore() // Display highest score achieved till now{
clearviewport();border();file.open("user.dat", ios::in|ios::binary);file.read((char*)&u1, sizeof(u1));cout<<endl<<"Display High Score According To Selected Criteria"
<<endl<<"\t1. Actual Score"<<endl<<"\t2. Accuracy Percentage"<<endl<<"Enter your choice (1-2): ";
cin>>ich;switch(ich){
case 1 : r1 = u1.score;while (file.read((char*)&u1, sizeof(u1))){
r2 = u1.score;if (r2 > r1)r1 = r2;
}cout<<endl<<"High Score is: "<<r1<<endl
<<"Details of user(s) with high score: ";file.close();file.open("user.dat", ios::in|ios::binary);while (file.read((char*)&u1, sizeof(u1))){
if (u1.score == r1){
u1.showuser(); cout<<endl<<"Press any key to
continue..."; getch();
clearviewport();border();
}}
page7
file.close();break;
case 2 : float p1, p2;p1 = u1.perc;while (file.read((char*)&u1, sizeof(u1))){
p2 = u1.perc;if (p2 > p1)
p1 = p2;}cout<<endl<<"Highest Accuracy Percentage is: "
<<p1<<endl<<"Details of user(s) with high score: ";
default : cout<<endl<<"You entered an incorrect choice! Press any key to continue...";
getch();}
}
void playquiz() // Normal mode playquiz{
clearviewport();border();cout<<endl<<"Jabberwocky Normal User Mode"
<<endl<<endl<<"Rules" <<endl<<"\t1. Each correct answer gets you +42 points" <<endl<<"\t2. Each incorrect answer gets you -21 points" <<endl<<"\t3. No points / penalties for a pass";
cout<<endl<<endl<<"Get ready to play the quiz! Press any key to continue...";
<<u1.pass<<" passes out of a total of "<<r3<<" questions"<<" resulting in an accuracy of "<<u1.perc<<" percentage.";
file.close();file.open("user.dat", ios::app|ios::binary);file.write((char*)&u1, sizeof(u1));file.close();cout<<endl<<endl<<"Press any key to continue...";getch();
}
void countq() // Count the number of questions in database{
clearviewport();border();file.open("ques.dat", ios::app|ios::binary);cout<<endl<<"Enter new questions in the question database";cout<<endl<<endl<<"Press any key to continue...";getch();do{
q1.getq();file.write((char*)&q1, sizeof(q1));cout<<endl<<"Question added to database"<<endl
<<"Do you want to enter another question? (Y/N) : ";cin>>cch;
} while (cch == 'y' || cch == 'Y');file.close();
}
void editq() // Edit existing questions in database{
adminedit:clearviewport();border();cout<<endl<<"Enter question number to be edited (0 to exit): ";cin>>r2;countq();if ((r2 < 0) || (r2 > r3)){
cout<<endl<<"Sorry, record number you requested does not exist!";
cout<<endl<<endl<<"Press any key to continue...";getch();goto adminedit;
r3++;clearviewport();border();cout<<endl<<"Question Number "<<r3;q1.showq();r1 = q1.retans();cout<<"Option number "<<r1<<" is correct"<<endl
<<"Press any key to continue (or '0' to exit QM mode)...";
cch = getch();if (cch == '0')
break;}file.close();
}
void viewusers() // To view details of all users till now{
clearviewport();border();
page12
cout<<endl<<"Showing records of all users till now...";cout<<endl<<endl<<"Press any key to continue...";getch();file.open("user.dat", ios::in|ios::binary);while(file.read((char*)&u1, sizeof(u1))){
clearviewport();border();u1.showuser();cout<<endl<<"Press any key to continue (or '0' to exit this
flag = 1;cout<<endl<<"Authentication confirmed"<<endl;
}else cout<<endl<<"Sorry! Invalid password!";cout<<endl<<endl<<"Press any key to continue...";getch();
}
void pswd() // Password manipulation{
pwdchk();if (flag == 1){
pwdchange:cout<<endl<<"Enter new password (alphanumeric): ";for (int i = 0; ;i++){
check[i]=getch();if(check[i]=='\r')
break;cout<<"*";
}check[i]='\0';cout<<endl<<"Confirm new password: ";for( i = 0; ;i++){
name[i]=getch();if(name[i]=='\r')
break;cout<<"*";
}name[i]='\0';if (strcmp(check,name) == 0){
file.open("pwd.dat", ios::out|ios::binary);file.write((char*)&name, 42);file.close();cout<<endl<<"Password has been changed successfully!";cout<<endl<<endl<<"Press any key to continue...";getch();
}
page15
else{
cout<<endl<<"Sorry! Passwords do not match! Try again!";
cout<<endl<<endl<<"Press any key to continue...";getch();goto pwdchange;