Академический Документы
Профессиональный Документы
Культура Документы
(PGT-COMPUTER
SCIENCE)
ACKNOWLEDGEMENT
In the accomplishment of this project successfully, many
people have best owned upon me their blessings and the
heart pledged support, this time I am utilizing to thank
all the people who have been concerned with project.
Primarily I would thank god for being able to complete
this project with success. Then I would like to thank my
computer science teacher MRS.LOVELY SINGH, whose
valuable guidance has been the ones that helped me
patch this project and make it full proof success his
suggestions and his instructions has served as the major
contributor towards the completion of the project.
Then I would like to thank my parents and friends who
have helped me with their valuable suggestions and
guidance has been helpful in various phases of the
completion of the project.
Last but not the least I would like to thank my
classmates who have helped me a lot.
- HIMANSHU
SIGNATURE:-
INTRODUCTION
Accordingly, this project aims to develop source code in the form of a
computer program i.e. c++ that a scientific calculator could use to compute
functions such as square root, the exponential, and sine functions and etc.
The idea of this project that
1. Since all the mathematical function such as sin function, cos function,
logarithm function are define in the library function of <math.h>, thus
we have return the value of the function to call function.
2. For menu driven program, here we have to use switch-case statement.
3. In this program ,there are two type of calculator,
A). Standard calculator.
B). Scientific calculator.
4. The standard calculator contain simple function such as addition,
subtraction etc. whereas the scientific calculator contain function sine,
cosine, tangent, exponential function etc.
The code of the calculator application mainly comprise of two classes
standard calculator and scientific calculator. The standard calculator class
helps to perform standard calculation. The scientific calculator class in the
other hand, helps to perform scientific calculations. Both classes contain
static function so as to ensure that these function can be called in the main
function through class name.
LOGIC OF THE PROJECT
CREATING THE STANDARD CALCULATOR:-
The standard class aims at performing specific task related to standard calculation.
These task are:-
1. Adding two number
2. Subtracting the second number from the first number.
3. Multiplying two number
4. Dividing first number from second.
5. Modulus of first number by second number.
To perform the above mentioned task, the standard calculator class implements the
following member function.
FUNCTION DESCRIPTION
Addition Returns the addition of two
input number
Subtraction Returns the subtraction of two
number.
Multiplication Returns the multiplication of
two number.
Division Returns the output obtained
after performing
Operation on the input number
CREATING SCIENTIFIC CALCULATOR:-
You have to need to create scientific calculator class to perform task related to
scientific calculations. Which include finding square or cube etc.
The scientific calculator perform following task:-
1. Determine the square of the number.
2. Determine the square root of the number
3. Determine the first number power of the second number
4. Determine the factorial of a number
5. Determine the sin, cos and tan value of the number.
6. Determine the logarithm, natural logarithm and exponential of the number.
FUNCTION DESCRIPTION
Square Accept a number and returns the square of the
number
Squae root Accept a number and returns the square root of
number
Cube Accept two number and returns the first power to
2nd num.
Fact Returns a factorial of an input number.
Sin_fun Returns the sin value of an input number.
Cos_fun Return the cos value of an input number.
Tan_fun Return the tan value of an input number
Log_fun Return the log value of an input number
Log10_fun Return the log10 value of an input number.
Exp_fun Return the exp value of an input number.
CONTROL DIAGRAM
This diagram tells the interconnection between various menus and
sub-menus.
Standard calculator
Scientific calculator
Result screen:-
Find your answer
BIBLOGRAPHY
1 http://www.google.com/
2 http://en.wikipedia.org
3 Computer Science with C++ by Sumita
Arora
4 Object Oriented Programming by
Robert Lafore
5 Computer Science with C++ by Preeti
Arora and Pinky Gupta
6 www.bOtskOOL.com