Vous êtes sur la page 1sur 17

Certificate

This is to certify that NIRMIT ARORA of CLASS XII A has done this project on

FUN WITH ALPHABETS


under my supervision and to my complete satisfaction.

Date:

MS. NITI ARORA (PGT Computer Science)

Acknowledgement
It is my solemn duty to place on record my sincere gratitude thanks to and my deep sense of

respected

teacher,

Ms.Niti Arora, for her invaluable guidance, keen interest and constant encouragement for fulfillment of this project.

Certificate Acknowledgement Overview of C++ Requirements Header Files Source Code Compilation Report Output Shortcomings

Overview of C++
C++ is an "object oriented" programming language created by Bjarne Stroustrup and released in 1985. It implements "data abstraction" using a concept called "classes", along with other features to allow object-oriented programming. Parts of the C++ program are easily reusable and

extensible; existing code is easily modifiable without actually having to change the code. C++ adds a concept called "operator overloading" not seen in the earlier OOP languages and it makes the creation of libraries much cleaner. C++ maintains aspects of the C programming language, yet has features which simplify memory management. Additionally, some of the features of C++ allow low-level access to memory but also contain high level features. C++ could be considered a superset of C. C programs will run in C++ compilers. C uses structured programming concepts and techniques while C++ uses object oriented programming and classes which focus on data. C++ is a general purpose programming language with a bias towards systems programming that

is a better C supports object-oriented programming

Some of the important object oriented features are namely: Objects: Object is the basic unit of object-oriented programming. Objects are identified by its unique name. An object represents a particular instance of a class. There can be more than one instance of an object. Each instance of an object can hold its own relevant data. Classes: Classes are data types based on which objects are created. Objects with similar properties and methods are grouped together to form a Class. Thus a Class represents a set of individual objects. Characteristics of an object are represented in a class as Properties. The actions that can be performed by objects become functions of the class and are referred to as Methods. Inheritance:

Inheritance is the process of forming a new class from an existing class or base class. The base class is also known as parent class or super class, the new class that is formed is called derived class. Derived class is also known as a child class or sub class. Inheritance helps in reducing the overall code size of the program, which is an important concept in object-oriented programming. Data Abstraction: Data Abstraction increases the power of programming language by creating user defined data types. Data Abstraction also represents the needed information in the program without presenting the details. Data Encapsulation: Data Encapsulation combines data and functions into a single unit called class. When using Data Encapsulation, data is not accessed directly; it is only accessible through the functions present inside the class. Data Encapsulation enables the important concept of data hiding possible. Polymorphism: Polymorphism allows routines to use variables of different types at different times. An operator or function can be given different meanings or functions. Polymorphism refers to a single function or multi-functioning operator performing in different ways.

Overloading: Overloading is one type of Polymorphism. It allows an object to have different meanings, depending on its context. When an exiting operator or function begins to operate on new data type, or class, it is understood to be overloaded.

Reusability: This term refers to the ability for multiple programmers to use the same written and debugged existing class of data. This is a time saving device and adds code efficiency to the language. Additionally, the programmer can incorporate new features to the existing class, further developing the application and allowing users to achieve increased performance. This time saving feature optimizes code, helps in gaining secured applications and facilitates easier maintenance on the application.

SYNOPSYS Project Category: Educational Word Game


Target Group : Project Members : Can be Used with all age groups by creating different dictionary files Nirmit Arora Pooja Kalra DESCRIPTION : 1. The main function allows for selection from a. ADMIN MODE (Call admin_menu() which is defined in admin.cpp) Admin mode is PASSWORD Protected b. GAME MODE It allows for playing of two games i). WORD WRAP Game ii). JUMBLE WORD GAME 2. The project uses Dictionary (TEXT Files) for Words required in the game. 3. The TOP 5 scores are maintained with the help of BINARY FILES

Requirement
The Project requires the following: Hardware o Computer System (P-II or above with standard configuration) o Keyboard o Mouse Software o DOS 6.22 /Windows OS (any version) o Turbo C++

Header File Required


In computer programming, particularly in the C and C++ programming languages, a header file or include file is a file, usually in the form of source code that is automatically included in another source file by the compiler. Typically, header files are included via compiler directives at the beginning (or head) of the other source file. A header file commonly contains forward declarations of subroutines, variables, and other identifiers. Identifiers that need to be declared in more than one source file can be placed in one header file, which is then included whenever its contents are required. In the C and C++ programming languages, standard library functions are traditionally declared in header files #include <graphics.h> : initgraph(), cleardevice(); setbkcolor (); setcolor(); settextstyle(); Outtextxy() circle() Closegraph() read(), write(), open(), close(), seekg(), seekp() strcpy(), strlen(), strcmp() rand(), itoa() printf() getch(), clrscr() delay() exit() toupper()

#include <fstream.h> #include <string.h> #include <stdlib.h> #include <stdio.h> #include <conio.h> #include <dos.h> #include <process.h> #include <ctype.h>

: : : : : : : :

Files Required/ Created


PROGRAM FILES 1. project.cpp 2. Admin.cpp 3. Fileini.cpp DATA FILES 1. qdict.txt : Text file with words stored in it. (Long word file ) 2. dict.txt : File with 3 letter words (required in word wrap game) 3. score.dat : binary file for storing top highest scores (Word wrap game) 4. score1.dat : binary file for storing top highest scores (Jumble word game) : The main program which is to be executed for playing the games. : The program with function definitios for ADMIN MODE : The program for Score file initialization

GLOBAL CLASSES, FUNCTIONS and OBJECTS (PROJECT.CPP)


void wordwrap(); void jumble(); int sort(); int sort1(); void dispmenu() void screen1() void screen2() void wrong() void congrats() class hscorew { public: int h[5]; }ss; class hscorej { public: int h[5]; }rr; class num { public: char ch[10]; char chh[4]; void num1(); }s; int iff=0; char wstr[50][50]; int score=0; // array of strings to store words //Function to play word wrap game // Function to play Jumble word game // function to sort scores of jumble word game // function to sort scores of word wrap game //Displaying The Menu Page //first welcome screen //second welcome screen //to display the failure of the user //to display the success of the user // Class used for storing top high scores // of Word wrap game

// Class used for storing top high scores // of Jumble Word Game

// function reads dictionary file into array of strings

************************************************************************* PROJECT TITLE : "FUN WITH ALPHABETS" ** PROGRAM NAME : ADMIN.CPP ** MADE BY : NIRMIT ARORA ** CLASS : XII A ** ROLL No. : 24 ** BOARD ROLL No. : ** YEAR : 2007-08 ** ************************************************************************** GLOBAL FUNCTION PROTOTYPES (7 Functions) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ int password(); function for taking password and checking char * select_dic(); Function for selecting the dictionary void add_word(); Function for adding a word in dictionary void del_word(); Function for deleting a word from dictionary void show_dic(); Function for showing the words of a f dictionary file void create_new_dic(); Function for creating new dictionary file void admin_menu(); Function for calling all Admin functions *************************************************************************

************************************************************************** PROJECT TITLE : "FUN WITH ALPHABETS" PROGRAM NAME : FILEINI.CPP( Program For score file initialization) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ DESCRIPTION : 1. The fProgram is included in PROJECT .CPP 2. This program includes class scor 3. This program includes function score_initialize() a.Function checks for score.dat and score1.dat . b. if files do not exist both the files are created with default score set 20 4. The function is called from function main()

Mind Map of the Project

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

BIBLIOGRAPHY
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ 1. C++ by Robert Lafore 2. Computer Science by Sumita Arora 3. Internet 4. Oxford Dictionary

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Shortcomings
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ 1. The Project deals with two modes a. Admin Mode b. Gaming Mode The Admin Mode is Password protected and default password is password. There is no provision for changing the password. This shortcoming can be over come by introducing file for storing password along with function for changing it. The reason for not including this module is the time constraint. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Compilation Report

Vous aimerez peut-être aussi