A
Mini Project Report
On
Calculator
By
Ranu Bhati
A/C NO:
21019
Under Guidence of
Prof. Anil Lata
Submitted to the Department of Computer Applications,
B.J.S RAMPURIA JAIN COLLEGE,BIKANER
In partial fulfillment of the Requirements
For the award of the degree
Bachelor of Computer Application
2021-2022
MAHARAJA GANGA SINGH UNIVERSITY
Jaisalmer Road,Bikaner,Rajastan 334001
This page is left intentionally.
Acknowledgement
I would like to express my special thanks of gratitude my special thanks of
gratitude my teachers, friends and my family members for their able guidance
and support in completing my project.
I would also like to extend my gratitude to the ‘Anil lata sir’ for providing me
with all the facility that was requride.
CERTIFICATE
This is to certify that the project work whith Title Calculator is bonafide work
of Mr/Ms. Ranu Bhati account number 21019 carried out in practicalfulfillment
for the award of degree of BCA of B.J.SRampuriajain college, daujiroad,
Bikaner affiliate ofM.G.SUniversity,Bikaner under my guidance this project
work is original and never submitted earlier for the award of any
degree/diploma or associate of any other university/institute.
Signature of guide
Student’s Declaration
I,Mr/Ms Ranu bhati heredy declare that the project work title “Calculator” is
the original work done by me and submitted to the M.G.S University in partial
fulfillment of requirement for the award of B.C.A Istv Year is a reward of
original work done by me under the supervision of Mr Anil Lata of
B.J.S.Rampuriya jain college, Bikaner.
A/C No. 21019 Signaturec of Student
Date
CONTANTS
1. Acknowledgement
2. Certificate
3. Student Declaration
4. Contant
5. A brief overview of project
6. Profit of problem assigned
7. System Reguirement
8. Project plan
8.1 Term structure
8.2 Development
8.3 Programming language and development tools
9. Design
9.1 Detailed DFD’s
10. Project Legacy
10.1 Current Status of project
10.2 Remainig Areas of concem
10.3 Technical and Managerial Lessons Leamt
10.4 Future Recommendations
11. Nomenclature and Abreviations
12. Bibliography
13.Source Code
Overview of Project
Templates are a feature of the C++ programming language that allows
functions and classes to operate with generic type. This allows a function or
class to work on many different data type without being rewritten for each
one.
The C++ standard library provides many useful functions within a framework of
connected templets.
There are three kinds of tamplets:
1. Function templets
2. Class templates and
3. Since C++14, Variable templets.
Science C++11,templates may be either variadic or non-variadic; in earlier
versions of C++ they are always non-variadic.
Specialization
When a function or class is instsntiated froam a template,a specialization
Of that template is created by the compiler for the set of arguments used, and
the specialization is referred to as being a generated specialization.
Benefits/Advantage:
Templates and type-safe.
They are generally considered as an improvement over macro for the
purposes.
Templates avoid some common errors that make heavy use of function-
like macros.
Disadvantage:
Many compilers do not support nesting of templates.
When templates are used,all codes exposed.
Some compilers have poor support of templares.
Code quality and sustainability.
Profile of Problem Assigned
There are certain problems assigned.
Uniformity:
Usually, a finished template is so cheap because it is supposed to sell
hundreds of times. Template designers also make sure to get as clode to
the taste of the masses as possible. That’s why templates test to be very
conformable.
Restricted adaptability:
On top of that, every template has its limits when it comes to adjustability
and expandability. In any case, you have to try to make your needs clear
in advance; this is best done in the from of a chec-klist. With this
checklist, you can go out in your search for a new template.
Brand compatibility:
if a finished template doesn’t fully support your brand, the only possible
result is a compromise. However, You shouldn’t make compromises
when it comes to your web presence. After all , internet visitors only
knows you from website.
You could be a midsize entrepreneur with 400 workers and a fantastic
reord. Thus; finished templates can only be an option for a brand is veryc
exceptional case.
System Requirements
There are two types of system Requirements:
1. Hardware Requirement
2. Software Requirement
1.Hardware Requirement: The hardware requirements are the
requirements of a hardware device. Most hardware only has operating
system requirement or compatibility.
2.Software Requirement: The software requirements are description of
features and functionalities of the target system. Requirements convey the
expectations of users from the software product.
Hardware Requirement
Minimum requirement
1. Processor->At least a 4 core.
2. Ram->2.00 GB.
3. System Type->32-bit Operating system.
Software Requirement
1. Ms Word
2. Ms Excle
3. Turboo C++
Project Plan
1.1 Team Structure
Only 1 student are allowed
1.2 Devlopment Schedule
Date-17,21-01-2022
Time-8:00-9:00
1.3 Programming Language Used
Turbo C++ for Window 7.
Design
Without class
Function
Using Without
Template Class function
Project Legacy
1.1 Current Status of project
Project completed.
1.2 Remaining Areas of concern
No remaining areas of concern.
1.3 Technical and Managerisl Lessons Learnt
No Technical lessons learnt.
Without using template.
1.4 Future Recommendations
No Future Recommendations.
Nomenclature and Abbreviations
Ram->Random access Memory
Ms-Word-> Microsoft Office Word
Ms-Excle-> Microsoft office Excel
Sub->Subtract
Multi->Multiply
Bibliography
Internet
www.wikipedia.com
www.cprogramming.com
www.worldofittach.com
www.geeksforgeeks.com
www.codeproject.com
Books
Programming in C++(3RD edition).
Source Code
CALCULATOR
#include<iostream.h>
#include<conio.h>
class calculator
private:
int a,b,c,d,e,f,g,h;
public:
int sum(int a, int b)
int c;
c=a+b;
return c;
};
float sum(float a, float b)
float c;
c=a+b;
return c;
char sum(char a, char b)
char c;
c=a+b;
return c;
//--------------------------------------------------------------------
int sub(int c, int d)
int e;
e=c-d;
return e;
float sub(float c, float d)
float e;
e=c-d;
return e;
char sub(char c, char d)
{
char e;
e=c-d;
return e;
//------------------------------------------------------
int mul(int e, int f)
int g;
g=e*f;
return g;
float mul(float e,float c)
float g;
g=e*f;
return g;
char mul(char e, char c)
char g;
g=e*f;
return g;
//-------------------------------------------------------------
int dev(int g, int h)
int i;
i=g/h;
return i;
float dev(float g, float h)
float i;
i=g/h;
return i;
char dev(char g, char h)
char i;
i=g/h;
return i;
//--------------------------------------------------
With Using Template:
#include<iostream.h>
#include<conio.h>
template<class T>
class calculator
private:
public:
T sum(T a,T b)
T c;
c=a+b;
return c;
T subtract(T a,T b)
T d;
d=a-b;
return d;
}
T multiply(T a,T b)
T e;
e=a*b;
return e;
T divide(T a,T b)
T f;
f=a/b;
return f;
};
void main()
clrscr();
calculator<int>o1;
int i,s;
char a5;
for(;;)
cout<<"1.continue"<<endl;
cout<<"2.exit"<<endl;
cin>>s;
if(s==2)
break;
else
cout<<"Addition +"<<endl;
cout<<"Subtract -"<<endl;
cout<<"Multiply *"<<endl;
cout<<"divide /"<<endl;
cin>>a4;
switch(a4)
case '+':
cout<<"Sum:"<<o1.sum(10,20)<<endl;
break;
case '-':
cout<<"Subtract:"<<o1.subtract(40,50)<<endl;
break;
case '*':
cout<<"Multiply:"<<o1.multiply(60,70)<<endl;
break;
case '/':
cout<<"Divide:"<<o1.divide(80,5)<<endl;
break;
cout<<"Choose one option"<<endl;
break;
getch();