Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 32

SCIENTIFIC CALCULATOR

BS IT-2 Submitted To Prof. Asif Submitted By Ammad Farooq (2010-arid-1905) Fahad Islam (2010-arid-1913) Sarmad Zaheer (2010-arid-1927) Barani institute of information technology, University of ARID Agriculture, Rawalpindi

CERTIFICATION

It is stated that I have read the project report submitted by Muhammad Mudassar Yamin and in my judgment that this report is of sufficient standard to warrant its acceptance by Barani Institute of Information Technology. University of Arid Agriculture Rawalpindi, for second semester of BS (IT).

SUPERVISORY COMMITTEE
Supervisor ________________________________________ Mr. Muhammad Asif

Mr.Muhammad Muddasar Yamin (Jnr: S.E)

Barani Institute of Information Technology University of Arid Agriculture, Rawalpindi

Project Brief
Project Title Scientific calculator

Organization Undertaken By

Hacker & Friends Ammad Farooq Fahad Islam Sarmad Zaheer

Supervised By Starting Date Ending Date Software Used System Used

Mr. Muhammad Asif 16 February 2011 14 June 2011 MS office 2003, MS visual studio 2005. Dell xps 2400, Intel Pentium 4 2.80 GHz 512 Mb ram.

Operating System

Windows XP service pack 3

Dedicated To Our parents, brothers and sisters. Who always pray for us in every aspect of our life!

Acknowledgement

First, we thank to almighty Allah, the most merciful and compassionate and most beneficial whose favor made it possible for us to complete that task assigned to us.

Our parents brothers and sisters and all the member of my family pray for us, which is the key of our success. We pay our regards to our supervisor Mr. Muhammad Asif and Mr. Muhammad Mudassar Yamin for there valuable suggestions. Without that it would have been impossible for us to complete that task.

Ammad Farooq, Fahad Islam, Sarmad Zaheer, June 14, 2011

TABLE OF CONTENT
Chapter #01 INTRODUCTION

1.1 1.2

History of calculators.. History of digital calculators..

Chapter #02 ANALYSES


2.1 2.2 Use cases DFD.

Chapter #03 DESIGNS


3.1 Design models

Chapter #04 DETAILED DESIGNS


4.1 4.2 4.3 Level design. Process of prototype development... Prototypes.

Chapter #05 IMPLEMENTATION


5.1 Source code

Chapter #06 Testing


8.1 Testing phases.. 8.2 white box testing... 8.3 Test cases..

SYSTEM SPECIFICATION APPENDIX GLOSSARY

BIBLIOGRAPHY

INTRODUCTION CHAPTER 1

Out line
This chapter is about the history of calculators and computerized digital calculators.

History of calculators
An electronic calculator (usually called simply a calculator) is a small, usually inexpensive electronic device used to perform the basic operations of arithmetic. Modern calculators are more portable than most computers, though most PDAs are comparable in size to handheld calculators. The first electronic calculator was created in the 1960s, building on the history of tools such as the abacus, developed around 2000 BC; and the mechanical calculator, developed in the 17th century. It was developed in parallel with the analog computers of the day. Pocket-sized devices become available in the 1970s, especially after the invention of the microprocessor developed serendipitously by Intel for a Busicom calculator. Modern calculators are electrically powered (usually by battery and/or solar cell) and vary from cheap, give-away, credit-card sized models to sturdy adding machine-like models with built-in printers. They first became popular in the late 1960s as decreasing size and cost of electronics made possible devices for calculations, avoiding the use of scarce and expensive computer resources. By the 1980s, calculator prices had reduced to a point where a basic calculator was affordable to most. By the 1990s they had become common in math classes in schools, with the idea that students could be freed from basic calculations and focus on the concepts. Computer operating systems as far back as early Unix have included interactive calculator programs such as dc and hoc, and

calculator functions are included in almost all PDA-type devices (save a few dedicated address book and dictionary devices). In addition to general purpose calculators, there are those designed for specific markets; for example, there are scientific calculators which focus on operations slightly more complex than those specific to arithmetic for instance, trigonometric and statistical calculations. Some calculators even have the ability to do computer algebra. Graphing calculators can be used to graph functions defined on the real line, or higher dimensional Euclidean space. They often serve other purposes, however.

History of computerized digital calculators

Early years Computers as we know them today first emerged in the 1940s and 1950s. The software that they ran was naturally used to perform calculations, but it was specially designed for a substantial application that was not limited to simple calculations. For example, the LEO computer was designed to run business application software such as payroll. Software specifically to perform calculations as its main purpose was first written in the 1960s, and the first software package for general calculations to obtain widespread use was released in 1978. This was VisiCalc and it was called an interactive visible calculator, but it was actually a spreadsheet, and these are now not normally known simply as calculators. The Unix version released in 1979, V7 Unix, contained a command-line accessible calculator. Simulation of hardware calculators Calculators have been used since ancient times and until the advent of software calculators they were physical, hardware machines. The most recent hardware calculators are electronic hand-held devices with buttons for digits and operations, and a small window for inputs and results. The first software calculators imitated these hardware calculators by implementing the same functionality with mouseoperated, rather than finger-operated, buttons. Such software calculators first emerged in the 1980s as part of the Windows operating system, Windows 1.0.

Some software calculators directly simulate one of the hardware calculators, by presenting an image that looks like the calculator, and by providing the same functionality. Software calculators on the internet There is now a very wide range of software calculators, and searching the internet produces very large numbers of programs that are called calculators. The results include numerical calculators that apply arithmetic operations or mathematical functions to numbers, and that produce numerical results or graphs of numerical functions, plus some non-numerical tools and games that are also called calculators. Many of the results are calculators that dont imitate or simulate hardware calculators, but that take advantage of the greater power of computer software to implement alternative types of calculator.

Chapter 02 ANALYSIS

Out line

This chapter includes the analysis of Scientific calculator

Use cases
Use cases are the interaction of the user with the computer with the entities present in the system. The menu use case of Army Burn Hall Registration system is given below

Enter operand 1 Enter operand 2

Operator
USER

Now if the user have no account the following entities appear

+ % * -

USER

If the user selects the home the following case will appear

/ Sin Cos
Tan

User Exist

DFD

Chapter 05 DESIGN

Out line
This chapter is about the basic design of Scientific calculator and how it works conceptually.

Design model
Rapid application development model is used in the project as the time is limited or project is big.

Business modeling

Data modeling

Process modeling

Application generation

Testing turnover

Chapter 06 DETAILED DESIGN

Out line
This chapter is about the detail design of Scientific calculator and how different component are connected in the system.

Process of prototype development

Establish prototype objective

Define prototype functionality

Develop prototype

Evaluate prototype

Prototyping plan

Outline definition

Execute prototype

Evaluation report

Reusable component composition


Reuse able software component Component composition framework Executable prototype

Control and integration code

Prototypes

Chapter 07 IMPLEMENTATION

Source code
#include <iostream>

#include <string> #include <cmath> //Shortcuts to avoid having to type std::cout/cin/endl everytime using using using using std::endl; std::cout; std::cin; namespace std;

//Beginning of actual calculator int main() { int Done = 5; int Subtraction = 4; int Addition = 3; int Multiplication = 2; int Division = 1; int answer = 5; cout << "What basic mathematical operator shall I perform ?" << endl; cout << "Please answer with: Division(1), Multiplication(2), Addition(3), Subtraction(4) or Done(5)." << endl; cin >> answer; // Program will go through a linear path regardless of user input at the beginning. if (answer == 1) //Division section of the calculator { //Declaring the variables for use in the division function //They can be used again(in a different sub function) // because they are declared in a sub function long double value1; long double value2; //asking for and storing the values to be divided cout << "Input value to be divided: " << endl; cin >> value1; cout << "Input the dividend: " << endl; cin >> value2; //dividing the values and outputting the answer value1 /= value2; cout << value1 << endl; cout << "Please input the next operation number you would like to preform." << endl; cin >> answer; } if (answer == 2) //Multiplication section of the calculator { //Declaring the variables for use in the multiplication function //They can be used again(in a different sub function)

// because they are declared in a sub function long double value1; long double value2; //asking for and storing the values to be multiplied cout << "Input value to be first number: " << endl; cin >> value1; cout << "Input the second number: " << endl; cin >> value2; //multiplying the values and outputting the answer value1 *= value2; cout << value1 << endl; cout << "Please input the next operation number you would like to preform." << endl; cin >> answer; } if (answer == 3) //Addition section of the calculator { //Declaring the variables for use in the addition function //They can be used again(in a different sub function) // because they are declared in a sub function long double value1; long double value2; //asking for and storing the values to be added cout << "Input the first value : " << endl; cin >> value1; cout << "Input the second value: " << endl; cin >> value2; //adding the values and outputting the answer value1 += value2; cout << value1 << endl; cout << "Please input the next operation number you would like to preform." << endl; cin >> answer; } if (answer == 4) //Subtraction section of the calculator { //Declaring the variables for use in the subtraction function //They can be used again(in a different sub function) // because they are declared in a sub function long double value1; long double value2; //asking for and storing the values to be subtracted cout << "Input value to be subtracted from: " << endl; cin >> value1;

<< endl;

cout << "Input the number to subtract from the first: " cin >> value2; //subtracting the values and outputting the answer

value1 -= value2; cout << value1 << endl; cout << "Please input the next operation number you would like to preform." << endl; cin >> answer; } if (answer = 5) cout << "Good bye"; return 0; }

Chapter 08 Testing

Out line
This chapter deals with the testing phases of scientific calculator.

Testing phases
Component testing Integration testing

White box testing


It is an approach towards software testing where test are derived from knowledge of software structure and implementation.

Test data

Test out put Component code

Test cases Button configuration Right

Coding Line alignment Text Accuracy Objects Speed Design

Right Right Right Right Right Right Right

SYSTEM SPECIFICATION
Compatible with every kind of computer system.

APPENDIX
ERD: Entity relationship diagram STD: State transition diagram DFD: Data flow diagram Cases: Scenerios

BIBLIOGRAPHY
www.google.com www.wikkipedia.com www.ehow.com www.brothersoft.com

Contact
MNOUMANSAQLAIN@ROCKETMAIL.COM YASIR_043@YAHOO.COM AHMADSHOAIB_787@YAHOO.COM

You might also like