This is my Class 12 Computer Science Project. This Code has been preparedon Turbo C++ . It uses Graphics.h for the Graphical User Interface.
The files in the repository are :
This is File that contains the Source Code for the Project.
The Description file containing details about the repository. The file that you looking at right now.
The Project Report. Contains the Same Data as this README.
This folder contains the Output images for the README.
This Folder contains the Backup/Test Files that were usedin the preparation of the Project.
HEADER FILE | FUNCTIONS USEd |
---|---|
Fstream.h | Cout , Cin , Open ( ) , Close ( ) , Read( ) , Write ( ) , Seekg ( ) |
Conio.h | Kbhit ( ) , Getch ( ) , Clrscr ( ) |
String.h | Strcpy ( ) , Strcmpi ( ) , Strlen ( ) , Strcat ( ) |
Stdlib.h | Ltoa ( ) , Itoa ( ) , Exit ( ) , Randomize ( ) , Random ( ) |
Stdio.h | Remove ( ) , Rename ( ) |
Dos.h | Delay ( ) , Sleep ( ) |
Math.h | Sqrt ( ) |
Ctype.h | Isalpha ( ) , Isspace ( ) , Isdigit ( ) , Ispunct ( ) |
Iomanip.h | Setw ( ) |
Graphics.h | Initgraph ( ) , Cleardevice ( ) , Gettextsettings ( ) , Settextstyle ( ) , Outtextxy ( ) , Textwidth ( ) , Textheight ( ) , Setcolor ( ) , Setfillstyle ( ) , Getbkcolor ( ) , Line ( ) , Fillpoly ( ) , Drawpoly ( ) , Rectangle ( ) , Bar ( ) , Circle ( ) , Ellipse ( ) , Fillellipse ( ) , Getpixel ( ) , Putpixel ( ) , Closegraph ( ) |
- Questions for the Element.
- Options as an array of 4 Options for each of the Questions.
- Answers for each of the Questions.
- X - Coordinate.
- Y - Coordinate.
- Color of the Element.
- Name.
- Symbol.
- Group.
- Period.
- Atomic Mass.
- Atomic Number.
- Electronic Configuration.
- Block.
- Element Type.
- Data
- Coord
- Array of Quest
FUNCTION NAME | FUNCTIONALITY |
---|---|
voidputblktypepd( ) ; | Usedto Calculate the Block , periodandType of Element Depending Upon its Position in the Periodic Table. |
voidputd( data ) ; | Usedto put Structure Data details in an Object of Class Element. |
voidputcoord( coord) ; | Usedto put Structure Coorddetails in an Object of Class Element. |
voidputq ( quest [ ] ) ; | Usedto put Structure Question details in an Object of Class Element. |
voidgetdata ( data& , quest [ ] , coord& ) ; | Usedto Get the details of an Element in the form of Data , Questions andCoordinates. |
int matchxy ( float , float ) ; | Usedto match the ( x , y ) Coordinates of an Element in the Periodic Table. |
element ( ) ; | Constructor to Initialize all data Members with NULL Values. |
- Name
- Password
- Access Type
- Highest Score
- Latest/Current Score
- Total Points
FUNCTION NAME | FUNCTIONALITY |
---|---|
voidaccept ( char [ ] , char [ ] ) ; | Accept Login IdDetails. |
voidgetinfo ( char [ ] , char [ ] , long [ ] ) ; | Usedto Return the Login Id Details of a User. |
voids_upd( long ) ; | Usedto Update the Score of a User. |
voidmadmin ( ) ; | Usedto Give a User Administrative Access. |
int mname ( char [ ] ) ; | Usedto Match a Name with that of the User. |
int mpass ( char [ ] ) ; | Usedto Match a Passwordwith that of the User. |
int mac ( ) ; | Checks whether a user has Administrative Rights |
login ( ) ; | Constructor to Initialize all data Members with NULL Values. |
FUNCTION NAME | FUNCTIONALITY |
---|---|
voidsup ( float x , float y , char str [ ] ) ; | Displays a String as a Superscript at ( x , y ) . |
voidconfig ( float x , float y , char str [ ] ) ; | Displays the Configuration of an Element. |
voidginput ( float x , float y , char str [ ] , char type ) ; | Usedto Take the User Input in Graphics Mode Depending Upon the Call as Passwordor Regular Text. |
voidplaym ( ) ; | Creates the Menu for Play Option. |
voidchangepass ( ) ; | Creates the Menu for changing the User Password. |
voidstatpage ( ) ; | Displays the User Statistics. |
voidclrstats ( ) ; | Clears the User Statistics. |
voiddelcu ( ) ; | Deletes the Current User Account. |
voidsetpage ( ) ; | Creates the Menu for the User Settings Page. |
voidmpage ( ) ; | Creates the Main Game Menu. |
voidviewelement ( ) ; | Displays the Details of an Element. |
voidgdspage ( ) ; | Creates the Menu for Game Data Settings. |
voidlou ( ) ; | Displays the List of User Accounts. |
voidmod( ) ; | Usedto give Administrative Rights to a Non – Admin. |
voiddeluser ( ) ; | Usedto Delete a User from the list-of-users. |
voidudspage ( ) ; | Creates the Menu for User Data Settings. |
voidapage ( ) ; | Creates a Menu for an Administrator to Change the Game Settings. |
voidlpage ( ) ; | Creates the Login Page. |
voidspage ( ) ; | Creates the Sign Up Page. |
voidwpage ( ) ; | Creates the Welcome Page. |
voide_screenf ( float x , float y ) ; | Displays the Information about an element at the location ( x , y ) in the Periodic Table. |
voidcoordwrite ( float x , float y , int col ) | Usedto Write the Coordinates of an Element into the File. |
voidscreen ( int para ) ; | Usedto Display the Periodic Table. |
voidcnt ( float x , float y ) ; | Usedto Display the Controls for the Periodic Table. |
voidnav ( float &x , float &y , int &col , int para ) ; | Usedto Navigate through the Periodic Table. |
voidrect ( int x1 , int y1 , int x2 , int y2 , int x3 , int y3 , int x4 , int y4 ) ; | Usedto make a Quadrilateral. |
voidmainf ( int para ) ; | Usedfor the Periodic table Option in the Main Menu. |
voiddisplay ( element e ) ; | Usedto Display the Element During the Game. |
voidrandomarr ( int rec [ ] , int n ) ; | Usedto Give Random values to an Array starting from Zero. |
voidblk ( char temp [ ] [30] ) ; | Usedto Generate random Blocks as Options for the Questions. |
voiddefwrite ( ) ; | Usedto Set Default values to The Element Data in case of any Errors. |
voidquestrandom ( quest qq[5] ) ; | Randomizes Question andOptions Order Every time the Game is Played. |
voidscorepage ( int score[5] , int lvl ) ; | Displays the Score andthe Result of a Level. |
voiduserupdate ( long ) ; | Updates the Score of the Player after every Level. |
int epage ( ) ; | Exit Page. |
int play ( int ur , int lvl ) ; | Usedto Play the Game. |
int toggle ( char head[ ] , char menu [ ] [50] , int r ) ; | Usedto Create Menu ( s ) AndSelect the Options. |
char* opttoogle ( quest qq [ ] , int i ) ; | Toggle through the Question Options. |
voidslantellipse ( float m , int s1 , int s2 ) ; | Usedto make SlantedEllipse. |
- http://www.science.co.il/elements/.
- [Grapher Software] ( https://www.desmos.com/calculator ) .
- Class 11 NCERT Chemistry.