Aditya Oop Repoarts
Aditya Oop Repoarts
Aditya Oop Repoarts
TECHNICALEDUCATION
K.V.N.NAIK S.P.SANSTHA’S POLYTECHNIC
NASHIK-422 002
MICRO PROJECT REPORT
Academic year: 2019-20
QUIZE GAME
Seal of institute
INDEX
4 System specification 4
5 Project Description 5
9 Conclusion 28
WEEKLY PROGRESS REPORT
MICRO PROJECT
10 14th Seminar
Prof. S.G.Bodke
(Signature of Faculty)
Project Content
Defination :-
In this QUIZ GAME we have to answer some exiting questions Then we will get the
result.
INTRODUCTION
The Project “Quiz Game” has been developed as a very understandable Database of
Questions that can be created and handled easily. When you add any question to the
Database, the serial number has been assigned to it automatically and settled in the
binary file named as Questions. Generally the Database is being a Master file that
possesses the tabular format of Quiz, the Sub menu for the subjects like Computer or
Mathematics or Science or General studies and Menu option Return.
The software is used on the basis of the Questions asked to the user that belongs to the
Menu topics and the user gets only 10 seconds to answer. The Quiz goes like this, the
user has to answer the question and if the user is right he or she gains 10 points and if
question attempt goes wrong the Quiz will stop and closed.
The Project aimed to create a easy Database which can be handled and created easily.
The Quiz Game is made by considering the interest of the customer in mind. The
Reports is made according to the customers presence on the Quiz and payment for the
Quiz has to be paid by the customer
History Of Turbo C++
The C++ programming language has a history going back to 1979, when Bjarne
Structure was doing work for his Ph.D. thesis. He began work on "C with Classes",
which as the name implies was meant to be a superset of the C language. His goal was
to add object-oriented programming into the C language, which was and still is a
language well-respected for its portability without sacrificing speed or low-level
functionality.
His language included classes, basic inheritance, inline, default function arguments, and
strong type checking in addition to all the features of the C language. The first C with
Classes compiler was called c Front, which was derived from a C compiler called CPre.
It was a program designed to translate C with Classes code to ordinary C.
In 1983, the name of the language was changed from C with Classes to C++. The ++
operator in the C language is an operator for incrementing a variable, which gives some
insight into how Structure regarded the language. Many new features were added around
this time, the most
notable of which are virtual functions, function overloading, references with the &
symbol, the const keyword, and single-line comments using two forward slashes.
In 1985, C++ was implemented as a commercial product. The language was not
officially standardized yet. The language was updated again in 1989 to include protected
and static members, as well as an inheritance from several classes.
In 1990, Turbo C++ was released as a commercial product. Turbo C++ added a lot of
additional libraries which have had a considerable impact on C++'s development.
In 1998, the C++ standards committee published the first international standard for C++
ISO/IEC 14882:1998, which is informally known as C++98. The Standard Template
Library, which began its conceptual development in 1979, was also included. In 2003,
the committee responded to multiple problems that were reported with their 1998
standard and revised it accordingly. The changed language was named C++03.
In mid-2011, the new C++ standard (C++11) was finished. The new features included
Regex support, a randomization library, a new C++ time library, atomics support, a
standard threading library, a new for loop syntax providing functionality similar to for
each loops in certain other languages, the auto keyword, new container classes, better
support for unions and array-initialization lists and variadic templates.
System specification
Minimum RAM:4GB
Hard Disk:-128 GB
Processor: intel Pentium 4(1.50GHZ) or above
1) The purpose of the game is to entertain Player by playing this game, return the
result. The Facility to choose the count of player is given.
2) This game also have the facility to display same score of player an d according
to score we also display the wining player’s name.
3) Here we have used two classes Student and question which are inherited by
single inheritance.
4) In student class it will accept the name of Player by using accept function and
welcome them by using display function.
5) We have use function like
a) void accept() : To accept the name of player.
b) void display() : To welcome the Player.
c) void quiz() : To display the question question and accept correct choice
from player and count the score.
d) void count() : To display the counted score.
A. CLASS
i. Collection of member variable and member function.
ii. It also includes objects.
iii. Classes are user defined datatype.
iv. Objects are variables of type class.
B.INHERITANCE
1. The mechanism of deriving a new class from old class is called as
Inheritance.
2. The object of one class can acquire the property of another class is
called as Inheritance.
3. The old class is referred as base class or super class. New class is
referred as derived class or sub class.
cout<<"
Q.7 A derived class with only one base class is called______ inheritance."<<endl;
cout<<" A) single\t B) multiple\n C) multilevel\t D)hierarchical\n";
cin>>ch;
if(ch=='a' || ch=='A')
{
score++;
}
cout<<"
Q.8 The derivation of child class from base class is indicated by______
symbol."<<endl;
cout<<" A} :: \t B) ;\n C) :\t D) | \n";
cin>>ch;
if(ch=='c' || ch=='C')
{
score++;
}
cout<<"**********************************QUIZ
GAME*************************************\n";
cout<<"Rules of Game:"<<endl;
cout<<"1) First Enter the Player count."<<endl;
cout<<"2) Answer the 10 questions."<<endl;
cout<<"3) Each question have 4 options."<<endl;
cout<<"4) Please enter valid choise otherwise your marks will be not calculated
for that question."<<endl;
cout<<"5) Each question has 1 mark."<<endl;
cout<<"6) After all questions your score will appear on screen."<<endl;
cout<<"7) And at last your result will be displayed."<<endl;
cout<<endl<<endl<<endl;
cout<<"*********************************ALL THE
BEST***********************************"<<endl;
cout<<"Press ENTER->";
getch();
clrscr();
clrscr();
for(i=0;i<n;i++)
{
cout<<"Questions for "<<Q[i].name<<endl;
cout<<"\n********************************************************
**********************\n";
Q[i].quiz(); //Displaying question
cout<<endl;
Q[i].count(); //Displaying score
cout<<endl<<"Press ENTER->";
getch();
clrscr();
}
if(n>1)
{
for(i=0;i<n;i++)
{
for(int j=i+1;j<n;j++)
{
if(Q[i].score==Q[j].score)
{
a=1;
cout<<"\n********************************************************
**********************\n";
cout<<"\t\t\t\t";
cout<<Q[i].name<<" and "<<Q[j].name<<" have same
marks"<<endl;
cout<<"\n********************************************************
**********************\n";
}
}
}
if(a!=1)
{
for(i=0;i<n;i++)
{
if(Q[0].score<Q[i].score)
{
Q[0]=Q[i];
}
cout<<"\n********************************************************
**********************\n\n";
cout<<endl<<"\t\t\t\t"<<Q[0].name<<" WON"<<endl;
cout<<"\n********************************************************
**********************\n";
}
}
else
if(n==1)
{
for(i=0;i<n;i++)
{
if(Q[i].score==10 || Q[i].score>8)
{
cout<<"\nYou played EXCELLENT\n";
}
else
if(Q[i].score<8 || Q[i].score>6)
{
cout<<"\nYou played GOOD\n";
}
else
if(Q[i].score<6 || Q[i].score>4)
{
cout<<"\nYou played NICE\n";
}
if(Q[i].score<4)
{
cout<<"\nYou played POOR\n";
}
}
}
}
getch();
}
OUTPUT
**********************************QUIZ
GAME*************************************
Rules of Game:
1) First Enter the Player count.
2) Answer the 10 questions.
3) Each question have 4 options.
4) Please enter valid choise otherwise your marks will be not calculated for tha
t question.
5) Each question has 1 mark.
6) After all questions your score will appear on screen.
7) And at last your result will be displayed.
*********************************ALL THE
BEST***********************************
Press ENTER->
****************************************************************
**************
Player 1
Enter your Name : Aditya
Player 2
Enter your Name : Ritikesh
Player 3
Enter your Name : Abhishek
Player 4
Enter your Nmae : Ritik
****************************************************************
**************
Welcome :- Aditya
****************************************************************
**************
Press ENTER->
****************************************************************
**************
A] operator B) function
C) macro D) object
Ans:- D
A) Top-down B) Bottom-up
C) Right-left D) Left-right
Ans:- B
A) for B) do
C) while D)none of above
Ans:- B
Q.7 A derived class with only one base class is called______ inheritance.
A) single B) multiple
C) multilevel D)hierarchical
Ans:-A
Q.8 The derivation of child class from base class is indicated by______ symbol.
A} :: B) ;
C) : D) |
Ans:- C
Q.9 In_____ inheritance, the constructor are executed in the order of inheritanc
e.
A) multipath B) multiple
C) multilevel D) hierachical
Ans:- C
YOUR SCORE = 9
Press ENTER->
****************************************************************
**************
Press ENTER->
****************************************************************
**************
A] operator B) function
C) macro D) object
Ans:- D
A) Top-down B) Bottom-up
C) Right-left D) Left-right
Ans:- B
A) for B) do
C) while D)none of above
Ans:- C
Q.7 A derived class with only one base class is called______ inheritance.
A) single B) multiple
C) multilevel D)hierarchical
Ans:- B
Q.8 The derivation of child class from base class is indicated by______ symbol.
A} :: B) ;
C) : D) |
Ans- B
Q.9 In_____ inheritance, the constructor are executed in the order of inheritanc
e.
A) multipath B) multiple
C) multilevel D) hierachical
AnS;-C
YOUR SCORE = 8
Press ENTER->
****************************************************************
*************
Welcome :- Abhishek
****************************************************************
**************
A] operator B) function
C) macro D) object
Ans:-D
A) Top-down B) Bottom-up
C) Right-left D) Left-right
Ans:-B
A) for B) do
C) while D)none of above
Ans:-C
Q.7 A derived class with only one base class is called______ inheritance.
A) single B) multiple
C) multilevel D)hierarchical
Ans:-A
Q.8 The derivation of child class from base class is indicated by______ symbol.
A} :: B) ;
C) : D) |
Ans:-C
Q.9 In_____ inheritance, the constructor are executed in the order of inheritanc
e.
A) multipath B) multiple
C) multilevel D) hierachical
Ans:-C
YOUR SCORE = 9
Press ENTER->
****************************************************************
**************
Welcome Ritik
****************************************************************
**************
A] operator B) function
C) macro D) object
Ans:- D
A) Top-down B) Bottom-up
C) Right-left D) Left-right
Ans:-B
A) for B) do
C) while D)none of above
Ans:-C
Q.7 A derived class with only one base class is called______ inheritance.
A) single B) multiple
C) multilevel D)hierarchical
Ans;-A
Q.8 The derivation of child class from base class is indicated by______ symbol.
A} :: B) ;
C) : D) |
Ans:-C
Q.9 In_____ inheritance, the constructor are executed in the order of inheritanc
e.
A) multipath B) multiple
C) multilevel D) hierachical
Ans:-C
YOUR SCORE = 10
Press ENTER->
****************************************************************
**************
Ritik WON
**********************************************************************
*******
Conclusion
We'll discuss the process of using these libraries to make games in the next chapter,
which explores ClanLib and 2D games.
References:
1. https://www.programiz.com/cpp-programming/inheritance
2. https://www.geeksforgeeks.org/c-plus-plus-gq/inheritance-gq/
3. https://www.tutorialspoint.com/cplusplus/cpp_arrays.html