nuclear concept in c++

download nuclear concept in c++

of 70

Transcript of nuclear concept in c++

  • 8/8/2019 nuclear concept in c++

    1/70

  • 8/8/2019 nuclear concept in c++

    2/70

    A COMPUTER PROJECT ON

    computer science

  • 8/8/2019 nuclear concept in c++

    3/70

    Compiled by:

    Ayushi Agarwal

    Introduction

    C++is a computer language but with a difference.

    C++ designers have borrowed the best features of many existinglanguages as c, c# etc. and added a few new features to form asimple easy to learn and an object oriented language. C++ addsa concept called operator overloading not seen in the earlierOOP languages and it makes the creation of libraries muchcleaner

    This project is for novice as well as for good

    programmers. As the name suggests, the project is all aboutdata on nuclear physics and related fields. It has been preparedas an example of C++ programming. It presents a contemporaryapproach to the programming of the project with stress onprinciples of good programming such as clarity, legibility, andefficiency in program design. Thus an interactive programminghas emphasized throughout the project.

    The project makes an extensive use of file handling.Basically it consists of only four functions. It provides all requireddata on nuclear physics on just a click of the mouse. It alsoincludes the options for background and font color modifications.Exclusive use of animations is also done to provide a complete

    understanding of the topic. Hope that the project withstands upto users expectations

  • 8/8/2019 nuclear concept in c++

    4/70

    Aim Of TheProject

    The project is basically an encyclopedia on thetopic of NUCLEAR PHYSICS. It aims at providing all requiredinformation about nuclear physics such as its history, presentcondition and its future scope on just a click of the mouse. Theproject is embedded with the different types of radioactive

    decays , nuclear fission, nuclear fusion and their use in theproduction of energy and different hazards related to this. Theproject exclusively mentions the contributions of differentscientists and researchers in the field of nuclear physics.

    Some essential features are

    Detailed information Includes animations Colorful presentation

    Setup change options Easy and convenient to use As fast as possible User friendly Safe for the user

  • 8/8/2019 nuclear concept in c++

    5/70

    Acknowledgement

    It was really a great opportunity forme to make this project work on the respective topic.Iwould like to wholeheartedly thank my respected

    computer teacher MrsKESARWANI MAM for providing

    me such a great opportunity. I am indebted to MAMwho

    took great pains in going through the entire manuscriptand made valuable comments.

    I am thankful to my parents for theirhumble cooperation, constant support andencouragement throughout the work of the project. Iam beholden to my classmates who gave me valuableadvice and were good enough to find time for fruitfuldiscussions.

    Finally, I thank the authorities of ourschool S.P.S.E.C. for providing great educationalopportunities.

  • 8/8/2019 nuclear concept in c++

    6/70

    AYUSHI

    AGARWAL

    ______________

    _______________Teachers signature

    Invigilators signature

    ITS HISTORY:

    C++ was written by Bjarne Stroustrupat Bell Labs during 1983-1985. C++ is an extension of C. Priorto 1983, Bjarne Stroustrup added features to C and formedwhat he called C with classes. He had combined the Simulas

    use of classes and added object oriented features with the powerand efficiency of c. The term C++ was first used in 1983.

    C++ was developed significantly after its first release. Inparticular ARM C++ added exceptions and templates, and ISOC++ added RTTI, name spaces and a standard library.

  • 8/8/2019 nuclear concept in c++

    7/70

    C++ was designed for UNIX operating environment. WithC++ programmers could improve the quality of code theyproduced and reusable code was easier to write.

    Bjarne Stroustrup had studied in the doctoral program atthe Computing Laboratory at Cambridge University prior tojoining Bell labs. Now, Bell labs no longer have that name sincepart of Bell labs became AT&T Labs. The other half becameLucent Bell labs.

    Prior to C++, C was a programming language developed atBell Labs circa 1969-1973. the UNIX operating system was alsobeing developed at Bell Labs at the same time. C was originallydeveloped for and implemented on the UNIX operating system,on a PDP-11 computer by Dennis Ritchie.

    WORDS ABOUT C++:

    C++ is an object oriented programming language createdby Bjarne Stroustrup and released in 1985. It implements data

    abstraction using a concept called classes, along with otherfeatures to allow object oriented programming. Parts of the C++program are easily reusable and extensible; existing code iseasily modifiable without actually having to change the code. C++ adds a concept called operator overloading not seen in theearlier OOP languages and it makes the creation of librariesmuch cleaner.

    C++ maintains aspects of the aspects of the Cprogramming language, yet has features which simplify memory

    management. Additionally some of the features of C++ allowlow-level access to memory but also contain high level features.

    C++ could be considered a superset of C. c programs willrun in C++ compilers. C uses structured programming conceptsand techniques while C++ uses structured object oriented

  • 8/8/2019 nuclear concept in c++

    8/70

    programming and classes which focus on data. Object orientedprogramming (OOP) is programming language model which isorganized around object rather than actions and data rather thanlogic. OOP deals with the overall program organization than thedetails of program operation. It gives more emphasis on data,

    provides extensibility and models of real world problem very well.

    A computer is said to be object oriented if it supports fourspecific properties called abstraction, polymorphism,inheritance, and encapsulation.

    FEATURES OF C++:

    Character sets:-

    Following is the character set of C++:-

    Letters: a-z , A-ZDigits: 0 to 9Special characters: ~!@#$%^&*()_+|

    Tokens

    Smallest unit building block of a program

    Variables

  • 8/8/2019 nuclear concept in c++

    9/70

    A variable is one which hold certain values. It is a sequence ofalphabets and digits but the first alphabet must be an alphabetor an underscore.

    Constant

    A constant is a value which does not change during programexecution.

    They are of four types:1. Integer 2. Character3. Floating 4. String

    Data Types

    1. Simple/fundamental2. Pointers3. Structured/derived4. Void type5. Enumerated

    1. SIMPLE/FUNDAMENTAL DATA TYPES:

    Declarationname

    Type Range Memory sizein bytes

    Integer

    Short int

    Int

    Long int

    Short integer

    Integer

    Long integer

    -32768 to 32767

    -32768 to 32767

    -214783648 to214783648

    2

    2

    4

    Real /floatingpoint

    Float Floating point -3.4E+38 to 4

  • 8/8/2019 nuclear concept in c++

    10/70

    Double

    Long double

    Double floatingpoint

    Long doublefloating point

    3.4E+38

    -1.7E+308 to1.7E+308

    -1.7E+308 to1.7E+308

    8

    10

    Character

    Char

    Signed char

    Unsigned char

    Character

    Signed character

    Unsigned

    character

    -128 to 127

    -128 to 127

    0 to 255

    1

    1

    1

    Boolean

    Bool A Boolean value(true / false)

    11

    2. STRUCTURED/ DERIVED DATA TYPES:

    The data types which are extracted/derived fromfundamental data types are called derived data types. Thesedata types can be derived by using the declaration operators orpunctuators.These are:

    1. array2. function

    3. structure4. class5. pointer

  • 8/8/2019 nuclear concept in c++

    11/70

    3. ENUMERATED DATA TYPES:

    In C++ we can define our own data type and specify what

    values a variable of this type can take. The data type defined thisway is known as enumerated data type. enumerated data typehelps in enhancing the readability of the code.

    4. POINTER DATA TYPES:

    A pointer is a variable which hold the address of anothervariable. It is going to hold a pointer. The pointer variable can be

    declared with the help of a punctuator `*.

    5. THE VOID DATA TYPE:

    The void data type , also known as empty data type, isuseful in many situations. It ia used to specify the return type ofa function that is not supposed to return a value, emptyargument list of a function and to declare generic pointer.

    PREPROCESSOR DIRECTIVES:

    The first line of any program: #includeis a preprocessor directives, i.e. a message to the C++processors. Lines beginning with # are processed by the

    preprocessor before the program is compiled. This specific linetells the preprocessor to include in the program the contents ofthe input/output stream header file iostream.h. This file mustbe included for any program that outputs data to the screeninput data on the screen.

  • 8/8/2019 nuclear concept in c++

    12/70

    COMPILING AND LINKING:

    Before the running of a program, there is a phase totranslate the program into machine language. This is done usingC++ compiler. The C++ compiler processes program units thatcan be a complete program or just a single function. A C++compiler has in-built pre-processor. The pre-processor processesthe source code before it is passed to the compiler forcompilation. Pre-processor commands, known as directive, tellthe pre-processor how to process the source code. Depending onthe pre-processor directives, the pre-processor processes thesource code and produces the expanded version of source code.

    The C++ compiler takes expanded version of the sourcecode as its input and if there are no errors in our source code, itproduces a machine code (object code)version of our program.This process is called as compilation.

    There is one additional step our program must go throughafter and before running. Thus step is called the linking stage.When our program is linked, needed runtime information issupplied to our program. C++ initiates the linking stage

    automatically, so we dont have to worry about the process.Linking combines the object files into a single executableprogram.

    OBJECT ORIENTEDPROGRAMMING

    Object oriented programming (OOP) isprogramming language model which is organized around objectrather than actions and data rather than logic. OOP deals withthe overall program organization than the details of programoperation. It gives more emphasis on data, provides extensibility

  • 8/8/2019 nuclear concept in c++

    13/70

    and models of real world problem very well. A computer is saidto be object oriented if it supports four specific properties calledabstraction, polymorphism, inheritance, and encapsulation.

    DATA ABSTRACTION

    As the word indicates abstraction refers to therepresentation of only the essential features of the real worldobject in the program object. This process does not include thebackground details and explanations. This concept of abstractionis used in classes. A class is thus defined as a list of abstractattributes and functions which operate on these attributes. Thisterm abstract data types (ADT) is used to refer classes due to

    this reason.

    Encapsulation

    In object oriented programming , objects interact witheach other by message. The only thing that an object knowsabout another is the objects interface. Each objects data andlogic is hidden from others object. In other words, the interfaceencapsulates the objects code and data.

    This allows the developer to separate an objects implementationfrom its behaviour. This separation creates a black box affectwhere the user is isolated from implementation changes. As longas interface remains the same, any changes to theimplementation are transparent to the user. For example, if thename message is sent to the student object , it does not matterto the user how the developer implemented the code to handlethis message.

    All the sending objects needs is the correct protocol forinteracting with the student object. The developer can changethe implementation at any time , but the name message wouldstill work because the interfaces the same.

  • 8/8/2019 nuclear concept in c++

    14/70

    POLYMORPHISM

    Another benefit of separating implementation frombehavior is polymorphism. Polymorphism allows two or moreobjects respond to the same message. A method called namecould also be implemented for an object of the class courses.

    Even though the implementation of this name message mayreturn a course number and a course title, its protocol is thesame as the name message to the student object. Polymorphismallows a sending object to communicate with different objects ina consistent manner without worrying about how many different

    implementations of a message.

    An analogy of polymorphism to daily life is how studentsresponse to a school bell. Every student knows the significance ofthe bell (message) rings however; it has its own meanings todifferent students (objects). Some students go home, some golibrary and some go to other classes. Every student responds tothe bell, but how they respond to it might be different.

    Another example of polymorphism is the function of printing.Every printable object must know how to print itself. The

    message is same to all the different objects: print, but the actualimplementation of what they must do to print themselves varies.The sending object does not have to know how the receivingobject implements the message. Only the receiving objectworries about that. Assume that there is a print page method ina document object that has the responsibility of printing a page.To print the page, the print page method sends the printmessage to each object on the page, only that each objectsupports the behavior of printing. New objects can be added tothe page without affecting the print page method. This method

    still sends the print message and the new object provides its ownprint method in response to that message.

    Polymorphism allows the sending object to communicate withreceiving object without having to understand what type of

  • 8/8/2019 nuclear concept in c++

    15/70

    object it is, as long as the receiving object supports themessages.

    INHERITANCE

    Another important concept of object orientedprogramming is inheritance. Inheritance allows a class to havethe same behavior as another class and exert or tailor thatbehavior to provide special action for specific needs.Lets use the following application as an example. Both graduateclass and undergraduate class have similar behavior such asmanaging a name, major, address and a GPA. Rather thanputting this behavior in both of these classes, the behavior isplaced in a new class called student. Both graduate andundergraduate become subclass of the class student and bothinherit the student behavior.

    Classes that inherit from a class are class subclasses. The classesthat inherit from a class are called superclasses. In the examplestudent is a superclass for graduate and undergraduate.Graduate and undergraduate are subclasses of student.

    Subclasses provide specialized behaviors from the basis of thecommon elements provided by the superclass. Programmers canimplement superclasses called abstract classes that define

    common behaviors.

  • 8/8/2019 nuclear concept in c++

    16/70

    OBJECT ORIENTEDPROGRAMMING vs.

    PROCEDURAL PROGRAMMING

    OBJECT ORIENTEDPROGRAMMING

    1. Emphasis on data.

    2. Follows button-upapproach in programdesign.

    3. Data hiding featureprevents accidental changein data.

    4. Features likeencapsulation,polymorphism, and

    inheritance are present.

    OBJECT ORIENTEDPROGRAMMING

    1. Emphasis on doingthings(functions).

    2. Follows top-down approachprogram design.

    3. Presence of global variableincreases chances ofchange data.

    4. Such features are notpresent in thisprogramming.

    Thus overall object oriented programming (OOP) leadsprocedural programming in many aspects and is better of thetwo.

  • 8/8/2019 nuclear concept in c++

    17/70

    LAYOUT.CPP

    #include#include#include#include#include#include#include#include#includeint button,m,n;int x3[10], y3[10], rad[10], col[10],x1[10],y1[10],

    x2[10], y2[10];class LAYOUT{MPOINT mptr;public:LAYOUT(){int gd=DETECT,gm;initgraph(&gd,&gm,"");counter=1;

    int x,y;x=getmaxx();y=getmaxy();mptr.restrictmouseptr(1,1,x-1,y-1);mptr.showmouseptr();

  • 8/8/2019 nuclear concept in c++

    18/70

    }int counter;void start_it();void end_it();public:

    void showButtons(){button_3d(15,425,65,450,0,"MORE",1);button_3d(222,456,385,475,0,"MAIN MENU",1);button_3d(530,425,580,450,0,"EXIT",1);}void button_3d(int x1,int y1,int x2,int y2,int check,char* text,intcolor){int up,low;setfillstyle(1,7);bar(x1,y1,x2,y2);if(check==0)up=15,low=8;elseup=8,low=15;setcolor(low);line(x2,y1,x2,y2);line(x2-1,y1,x2-1,y2);line(x1,y2,x2,y2);line(x1+1,y2-1,x2,y2-1);

    setcolor(up);line(x1,y1,x2,y1);line(x1+1,y1+1,x2-1,y1+1);line(x1,y1,x1,y2);line(x1+1,y1+1,x1+1,y2-1);setcolor(color);

    settextjustify(CENTER_TEXT,CENTER_TEXT);outtextxy(x1+(x2 - x1)/2,(y1+(y2 - y1)/2)-2, text);}

    };void LAYOUT::end_it(){settextstyle(7,0,3);if((button&1) && (n>=530 && n=425 &&m

  • 8/8/2019 nuclear concept in c++

    19/70

    setbkcolor(RED); cleardevice();while(!kbhit()){

    for(int r=0;r

  • 8/8/2019 nuclear concept in c++

    20/70

    setcolor(2);settextstyle(1,0,4);setusercharsize(x,6,x,3);setcolor(14);moveto(300,100);

    outtext("__");setcolor(6);moveto(300,100);outtext("< >");

    if(x

  • 8/8/2019 nuclear concept in c++

    21/70

    if(x20){settextstyle(7,0,1);setusercharsize(y-20,45,y-20,40);setcolor(10);outtext("NUCLEAR PHYSICS");setcolor(2);

    outtext("___________");delay(10);if(y

  • 8/8/2019 nuclear concept in c++

    22/70

    //x=10,y=10;setcolor(WHITE);settextstyle(1,0,4);outtextxy(335,375,"PRANJAL AND OAJASAVEE");

    for (int stangle=0;!kbhit();stangle++){

    setcolor(7);ellipse(320,320,stangle,stangle+20,300,130);ellipse(320,320,stangle+180,stangle+200,300,130);delay(9);setcolor(RED);ellipse(320,320,stangle-1,stangle+19,300,130);ellipse(320,320,stangle-

    1+180,stangle+199,300,130);setcolor(7);ellipse(320,320,stangle,stangle+20,302,132);ellipse(320,320,stangle+180,stangle+200,302,132);delay(9);setcolor(8);ellipse(320,320,stangle-1,stangle+19,302,132);ellipse(320,320,stangle-

    1+180,stangle+199,302,132);}

    getch();//closegraph();

    }

    MPOINT.CPP

    #include#include#include#include

  • 8/8/2019 nuclear concept in c++

    23/70

    #include#include#include#includeclass MPOINT

    {public:int button,m,n;union REGS i,o,a,b;int intmouse(){

    i.x.ax=0;int86(0x33,&i,&o);return(o.x.ax);

    }void showmouseptr(){

    i.x.ax=1;int86(0x33,&i,&o);

    }void restrictmouseptr(int x,int y,int x1,int y1){

    i.x.ax=7;i.x.cx=x;i.x.dx=x1;int86(0x33,&i,&o);

    i.x.ax=8;i.x.cx=y;i.x.dx=y1;int86(0x33,&i,&o);

    }void getmousepos(int *p,int *x,int *y){

    i.x.ax=3;

    int86(0x33,&i,&o);

    *p=o.x.bx;*x=o.x.cx;*y=o.x.dx;

    }

  • 8/8/2019 nuclear concept in c++

    24/70

    };/*void main(){int button,m,n;

    MPONIT x;int gd=DETECT,gm;

    initgraph(&gd,&gm,"\\tc\\bgi");x.getmousepos(&button,&m,&n);x.showmouseptr();

    cout

  • 8/8/2019 nuclear concept in c++

    25/70

    ctmbgcolor =clr;}int getBGColor(){return ctmbgcolor;}

    int getFontcolor(){return ctmfntcolor;}void setFontcolor(int clr){ctmfntcolor=clr;}void setDefaultFontClr(){ctmfntcolor=15;}

    int button_s,m_s,n_s;union REGS i,o,a,b;int intmouse(){

    i.x.ax=0;int86(0x33,&i,&o);return(o.x.ax);

    }void showmouseptr(){

    i.x.ax=1;

    int86(0x33,&i,&o);}void restrictmouseptr(int x,int y,int x1,int y1){

    i.x.ax=7;i.x.cx=x;i.x.dx=x1;int86(0x33,&i,&o);i.x.ax=8;i.x.cx=y;

    i.x.dx=y1;int86(0x33,&i,&o);}void getmousepos(int *p,int *x,int *y){

    i.x.ax=3;

  • 8/8/2019 nuclear concept in c++

    26/70

    int86(0x33,&i,&o);*p=o.x.bx;*x=o.x.cx;*y=o.x.dx;

    }

    void button_3d(int x1,int y1,int x2,int y2,int check,char* text,intcolor,int fill){int up,low;if(fill==1){setfillstyle(1,color);}else{setfillstyle(1,7);}bar(x1,y1,x2,y2);if(check==0)up=15,low=8;elseup=8,low=15;setcolor(low);line(x2,y1,x2,y2);

    line(x2-1,y1,x2-1,y2);line(x1,y2,x2,y2);line(x1+1,y2-1,x2,y2-1);

    setcolor(up);line(x1,y1,x2,y1);line(x1+1,y1+1,x2-1,y1+1);line(x1,y1,x1,y2);line(x1+1,y1+1,x1+1,y2-1);setcolor(color);

    settextjustify(CENTER_TEXT,CENTER_TEXT);outtextxy(x1+(x2 - x1)/2,(y1+(y2 - y1)/2)-2, text);}void repaintButton(int i);void paintButtons(int chkNum){

  • 8/8/2019 nuclear concept in c++

    27/70

    int x1,y1,x2,y2,chk;chk=0;for (int i=1;i

  • 8/8/2019 nuclear concept in c++

    28/70

    }

    void pickColor(){//setDefaultBG();

    //setDefaultFontClr();int gd=DETECT,gm;initgraph(&gd,&gm,"");

    clrType=3;int button,m,n,num_button;settextstyle(7,0,3);button_3d(40,86,581,110,0, " Change Background Color ",1,0)

    ;button_3d(40,124,581,148,0," Change Font Color ",1,0) ;button_3d(40,162,581,186,0," Back ",1,0) ;

    getmousepos(&button,&n,&m);gotoxy(1,1);

    int z,zz;z=1;zz=1;int x,y;x=getmaxx();y=getmaxy();

    restrictmouseptr(1,1,x-1,y-1);showmouseptr();setbkcolor(0);settextstyle(15,0,1);outtextxy(20,30,"Select BG");int d;while(z){//cleardevice();getmousepos(&button,&n,&m);if((button&1) && (n>=40 && n=86 &&

    m

  • 8/8/2019 nuclear concept in c++

    29/70

    if((button&1) && (n>=40 && n=124 &&m=40 && n=162 &&m

  • 8/8/2019 nuclear concept in c++

    30/70

    num_button=d;}//cout

  • 8/8/2019 nuclear concept in c++

    31/70

    #include#include#include#include#include

    #includeint z;int bgclr;int fntclr;class MAIN:LAYOUT{MPOINT mptr;public:int showText(char * file,char *header,int type);public:void showMenu();public:void strucAni();void fusionAni();void fusionEq();void fissionAni();void decay();public:void init(){bgclr=6;fntclr=15;start_it();

    showMenu();}};int MAIN::showText(char *file,char *header,int type){{char ch[100];ifstream jk;int button,m,n;cleardevice();setcolor(14);

    settextstyle(5,0,3);outtextxy(320,5,header);jk.open(file,ios::in);settextstyle(6,0,1);counter=1;next:

  • 8/8/2019 nuclear concept in c++

    32/70

  • 8/8/2019 nuclear concept in c++

    33/70

    if(type==4){if(counter==2){fissionAni();}

    if(counter==3){showMenu();}

    }

    setcolor(15);z=1;while(z){mptr.getmousepos(&button,&n,&m);gotoxy(1,1);cout

  • 8/8/2019 nuclear concept in c++

    34/70

    MPOINT mptr;int clicks;cleardevice();setbkcolor(bgclr);setcolor(5);

    button_3d(28,70,600,410,0,"",1);// setlinestyle(1,1,1);settextstyle(3,0,5);for(int werx=1;werx

  • 8/8/2019 nuclear concept in c++

    35/70

    button_3d(530,425,580,450,0,"EXIT",1);button_3d(20,425,90,450,0,"SETUP",1);settextstyle(7,0,3);z=1;//setcolor(fntclr);

    while(z){mptr.getmousepos(&button,&n,&m);gotoxy(1,1);

    if((button&1) && (n>=40 && n=86 &&m=40 && n=124 &&m=40 && n=162 &&

    m

  • 8/8/2019 nuclear concept in c++

    36/70

    if((button&1) && (n>=222 && n=456 &&m=113 && n=53 &&m=344 && n=111 &&m=77 && n=362 &&m=346 && n=362 &&m=530 && n=425 &&m

  • 8/8/2019 nuclear concept in c++

    37/70

    }}

    //showText("","",3);

    }

    if((button&1) && (n>=40 && n=200 &&m=40 && n=238 &&

    m=40 && n=314 &&

    m=40 && n=276 &&

    m=40 && n=352 &&m

  • 8/8/2019 nuclear concept in c++

    38/70

    delay(25); button_3d(40,124,581,148,0,"SECTION 8B:NUCLEAR ENERGY ",1) ;delay(25); button_3d(40,162,581,186,0,"SECTION 8C:NUCLEAR FUEL CYCLE ",2) ;delay(25); button_3d(40,200,581,224,0,"SECTION 8D:

    NUCLEAR RESEARCH ",3) ;delay(25); button_3d(40,238,581,262,0,"SECTION 8E:QUANTUM ATOM ",4) ;delay(25); button_3d(40,276,581,300,0,"SECTION 8F: DUALNATURE ",5) ;delay(25); button_3d(40,314,581,338,0,"SECTION 8G:ELEMENTRY PARTICLES ",6) ;

    settextstyle(3,0,3);button_3d(530,425,580,450,0,"EXIT",1);button_3d(222,456,385,475,0,"MAIN MENU",1);int fw=1;while(fw){mptr.getmousepos(&button,&n,&m);gotoxy(1,1);//cout

  • 8/8/2019 nuclear concept in c++

    39/70

    //button_3d(40,276,581,300,0,"SECTION 8F: DUAL NATURE",

    if((button&1) && (n>=40 && n=276 &&m=40 && n=200 &&

    m=40 && n=124 &&

    m=40 && n=162 &&m=40 && n=238 &&m

  • 8/8/2019 nuclear concept in c++

    40/70

    if((button&1) && (n>=40 && n=314 &&m=530 && n=425 &&m=20 && n=425 &&

    m

  • 8/8/2019 nuclear concept in c++

    41/70

    settextstyle(5,0,3);//outtextxy(6,434,"structure of an atom");

    settextstyle(15,0,1);delay(500);circle(318,239,50);delay(500);outtextxy(320,215,"NUCLEUS");

    delay(500);outtextxy(315,241,"protons");delay(500);outtextxy(315,260,"neutrons");delay(1000);circle(318,239,120);delay(500);circle(318,239,150);delay(500);circle(318,239,180);delay(500);circle(318,239,210);delay(200);outtextxy(443,235,"K");delay(200);outtextxy(473,235,"L");delay(200);outtextxy(503,235,"M");delay(200);outtextxy(533,235,"N");delay(1000);circle(318,119,5);delay(100);circle(318,89,5);delay(100);circle(318,59,5);delay(100);circle(318,29,5);delay(100);circle(318,358,5);delay(100);circle(318,388,5);delay(100);circle(318,418,5);delay(100);circle(318,448,5);

    delay(100);circle(168,235,5);

    delay(100);circle(138,235,5);delay(100);circle(108,235,5);delay(100);circle(214,133,5);delay(100);circle(191,111,5);delay(100);circle(174,87,5);delay(100);circle(208,338,5);delay(100);circle(189,363,5);

    delay(100);circle(168,384,5);delay(100);circle(425,133,5);

    delay(100);circle(449,113,5);delay(100); circle(470,95,5);delay(100); circle(428,342,5);delay(100); circle(446,365,5);delay(100); circle(466,389,5);delay(1000);line(169,86,15,88);

  • 8/8/2019 nuclear concept in c++

    42/70

    delay(200);line(105,231,15,88);delay(200);outtextxy(50,76,"electrons");delay(1000);line(483,166,557,76);delay(200);line(439,151,557,76);delay(200);outtextxy(558,62,"orbits");

    }

    void MAIN::decay(){ cleardevice();

    circle(290,235,10);circle(290,255,10);circle(290,215,10);circle(290,275,10);circle(310,215,10);circle(310,235,10);circle(310,255,10);circle(310,275,10);circle(270,215,10);circle(270,235,10);circle(270,255,10);circle(270,275,10);circle(330,215,10);circle(330,235,10);circle(330,255,10);

    circle(330,275,10);circle(299,244,53);

    line(337,208,423,132);line(261,207,171,127) ;line(263,283,165,362) ;line(337,282,432,359) ;

    settextstyle(5,0,3);setcolor(7);outtextxy(423,115,"alpha emission");

    outtextxy(176,98,"beta emission");outtextxy(165,362,"positron emission");outtextxy(432,359,"gamma emission");setcolor(5);settextstyle(8,0,2);outtextxy(300,29,"TYPES OF EMISSIONS");

  • 8/8/2019 nuclear concept in c++

    43/70

    setcolor(15);

    settextstyle(6,0,1);button_3d(15,425,65,450,0,"MORE",1);

    button_3d(530,425,580,450,0,"EXIT",1);

    button_3d(222,456,385,470,0,"MAIN MENU",1);

    }void MAIN::fusionAni(){cleardevice();

    settextstyle(1,0,1) ;int j=467;

    for(int i=123;i

  • 8/8/2019 nuclear concept in c++

    44/70

    }

    void MAIN::fusionEq(){settextstyle(3,0,2);settextjustify(0,0);

    outtextxy(100,130," 1H1 + 1H1 --> 2H1 + e+ + v +0.42MeV");outtextxy(100,150," 2H1 + 2H1 --> 3He2 + n + 3.27MeV");outtextxy(100,170," 2H1 + 2H1 --> 3H1 + 1H1 + 4.03MeV");getch();}void MAIN::fissionAni(){cleardevice();

    int t=108, u=1;circle(300,195,60);for(; u

  • 8/8/2019 nuclear concept in c++

    45/70

    j--;delay(10);}

    settextstyle(5,0,3);outtextxy(306,247,"NUCLEAR FISSION");outtextxy(306,320,"A neutron strickes an uranium nucleus and

    fission takes place");outtextxy(306,345,"Then uranium nucleus converts into Xenon

    and Strontium");outtextxy(306,370,"Here also huge amount of energy is

    produced");settextstyle(6,0,1);button_3d(15,425,65,450,0,"MORE",1);

    button_3d(530,425,580,450,0,"EXIT",1);button_3d(222,456,385,470,0,"MAIN MENU",1);}void main(){MAIN m;m.init();}

  • 8/8/2019 nuclear concept in c++

    46/70

    $ WELCOME ANIMATIONS $

  • 8/8/2019 nuclear concept in c++

    47/70

    $ WELCOME SCREEN $

  • 8/8/2019 nuclear concept in c++

    48/70

    $ MAIN MENU $

  • 8/8/2019 nuclear concept in c++

    49/70

    $ DATA ON STRUTURE OF ATOM $

  • 8/8/2019 nuclear concept in c++

    50/70

    $ SCHEMATIC DIAGRAM SHOWING $STRUCTURE OF DIAGRAM

  • 8/8/2019 nuclear concept in c++

    51/70

  • 8/8/2019 nuclear concept in c++

    52/70

    $ DATA ON THE NUCLEUS $

  • 8/8/2019 nuclear concept in c++

    53/70

    $ ANIMATION SHOWING NUCLEAR FISSION $

  • 8/8/2019 nuclear concept in c++

    54/70

    $ DATA AND ANIMATION ON NUCLEAR FUSION $

    $ DATA ON CONTRIBUTIONS MADE BY SCIENTISTS IN THE$ FIELD OF NUCLEAR PHYSICS

  • 8/8/2019 nuclear concept in c++

    55/70

  • 8/8/2019 nuclear concept in c++

    56/70

    $ DATA ON NUCLEAR PLANTS AND THEIR DEVELOPMENT$

    $ OUTPUT SCREEN DEPECTING DATA ON $RADIOACTIVITY

  • 8/8/2019 nuclear concept in c++

    57/70

  • 8/8/2019 nuclear concept in c++

    58/70

  • 8/8/2019 nuclear concept in c++

    59/70

    $ MORE DATA ON NUCLEAR ENERGY AND FORCES $

  • 8/8/2019 nuclear concept in c++

    60/70

    $ OUTPUT SCREEN DISPLAYING DATA ON $NUCLEAR FUEL CYCLE

    ANDRADIOACTIVE HAZARDS

  • 8/8/2019 nuclear concept in c++

    61/70

    OUTPUT SCREEN DISPLAYING DATA ONNUCLEAR RESEARCH

    NOTE:- The user could approach more info on nuclear research

    by clicking on the more tab on the left-bottom of the screen.

  • 8/8/2019 nuclear concept in c++

    62/70

    OUTPUT SCREEN DISPLAYING DATA ONQUANTUM ATOM

    NOTE:- The user could approach more info on QUANTUM ATOMby clicking on the more tab on the left-bottom of the screen.

  • 8/8/2019 nuclear concept in c++

    63/70

    $ DISPLAY OF INTRODUCTION TO ELEMENTARYPARTICLES $ AND CONSTIUENTS OF UNIVERSE

  • 8/8/2019 nuclear concept in c++

    64/70

    CONINUED.

  • 8/8/2019 nuclear concept in c++

    65/70

    $ THIS OUTPUT SCREEN SHOWS OPTIONS FOR CHANGING$ BACKGROUND AND FONT COLOR

    NOTE:- The user could access these options buy just clicking onthe respective tab. Different color tabs are displayed on thescreen (showed on the next page). After alterations are made,click on the

  • 8/8/2019 nuclear concept in c++

    66/70

    BACK tab to return to the main menu.

    $ COLOR TABS $

    NOTE:- Choose the required background or font color by clickingon the color tab and click on the DONE TAB.

  • 8/8/2019 nuclear concept in c++

    67/70

    $ ANIMATED EXIT SCREEN $

  • 8/8/2019 nuclear concept in c++

    68/70

    I. ACKNOWLEDGEMENT

    II. INTRODUCTION

    III. AIM OF THE PROJECT

    IV. ABOUT C++

    ITS HISTORY

    WORDS ABOUT C++

    FEATURES OF C++

    PREPROCESSOR DIRECTIVES

    COMPILING AND LINKING

    V. OBJECT ORIENTED PROGRAMMING

    DATA ABSTRACTION

    ENCAPSULATION

    POLYMORPHISM

    INHERITANCE

    VI. OOP VERSUS PROCEDURALPROGRAMMING

  • 8/8/2019 nuclear concept in c++

    69/70

    VII. SOURCE CODE

    VIII. OUTPUT SCREENS

    IX. BIBLIOGRAPHY

    BIBLIOGRAPHY

    NO PROJECT CAN BE MADE HIGHLY SUCCESSFUL BY ONLY ONEPERSONS THOUGHTS. SUCCESS OF A PROJECT CAN BEACHIEVED BY COLLECTING INFORMATION FROM VARIOUSSOURCES. THE SOURCES CAN BE NUMEROUS LIKE FRIENDS,COURSE BOOKS, MAGAZINES, AND UNFORGETTABLE VASTINTERNET. THIS PROJECT ALSO FALLS IN THAT CATEGORY.

    SOURCES USED FOR THIS PROJECT ARE:

    GOOGLE SEARCH

    YAHOO SEARCH ETC

  • 8/8/2019 nuclear concept in c++

    70/70