Sanjivani K. B. P. Polytechnic: Under The Guidance of
Sanjivani K. B. P. Polytechnic: Under The Guidance of
POLYTECHNIC
KOPERGAON – 423603, DIST: AHMEDNAGAR
2023-2024
A
PROJECT REPORT
ON
“SCIENTIFIC CALCULATOR”
SUBMITTED BY
Prof. Y.K.DHOTRE
SANJIVANI K. B. P. POLYTECHNIC
KOPERGAON, AHMEDNAGAR-423603
2023-2024
1
Sanjivani Rural Education Society’s
SANJIVANI K. B. P. POLYTECHNIC
DEPARTMENT OF COMPUTER TECHNOLOGY
2023-2024
CERTIFICATE
This is to certify that the Project report entitled
“SCIENTIFIC CALCULATOR”
Submitted By
Under our supervision and guidance for partial fulfillment of the requirement for Diploma in Computer
Technology affiliated to Maharashtra State Board of Technical Education, Mumbai For academic year
2023- 2024
Prof.Y.K.DHOTRE
(Project guide) Prof. G.N.Jorvekar
(HOD)
2
ACKNOWLEDGEMENT
First and the foremost we, express my deep sense of gratitude, sincere and deep
sense of appreciation to project Guide Prof.Y.K.DHOTRE, Department of Computer
Technology, Sanjivani K.B.P. Polytechnic Kopargaon. Your availability at any time throughout
the year, valuable guidance, option, view, comments, critics, encouragement, and support
tremendously boosted this project work.
Lots of thanks to Prof. G.N. Jorvekar, head of Department Computer Technology
Department, for providing us the best support we ever had. We like to express my sincere
gratitude to Prof.A.R. Mirikar, principal Sanjivani K.B.P. Polytechnic, Kopargaon for
providing a great platform to complete the project within the schedule time.
We are also thankful to all the faculty members, computer Technology Department,
Sanjivani K.B.P. polytechnic, Kopargaon for giving comments for Improvement of work,
encouragement and help during completion of the project.
Last but not the least, we should say thanks from our bottom of heart to my Family
and Friends for their never ending love, help, and support in so many ways through all this
time.
Thank you so much.
3
INDEX
NO.
INTRODUCTION
1. 7
PROGRAM
3. 9
OUTPUT
4. 13
CONCLUSION
5. 18
REFERENCE
6. 18
4
Micro-Project Proposal
Title: SCIENTIFIC CALCULATOR
• Discussion about the topic guide and among the group members.
• Literature survey.
• Submission of project proposal.
• Information collection.
• Analysis of data.
• Compilation of content.
• Representation.
• Editing and revising the content.
• Report preparation
4.0. Rationale
Android application development is one of the rising and growing trend in the industry of mobile.
This course examines the principles of mobile application design and covers the necessary concepts
which are required to understand mobile based applications and develop. Android based
Applications in particular. After completing this course students will design and build a variety of
real-time Apps using Android.
5
SR. DETAIL OF PLANNED PLANED NAME OF
NO ACITIVITY
STARTDATE FINISH TEAM
DATE MEMBER
6
1. INTRODUCTION
The Simple Calculator application developed in Android Studio provides basic arithmetic
functionality for users on their mobile devices. This application is designed to offer a user-friendly
interface with essential mathematical operations such as addition, subtraction, multiplication, and
division. The goal is to provide a straightforward and efficient tool for users to perform quick
calculations on the go.
Features:
User-Friendly Interface: The calculator boasts a clean and intuitive interface, making it
accessible to users of all skill levels.
History Tracking: Users can view their recent calculations, facilitating a quick review of
past entries.
Responsive Design: The calculator is designed to adapt to various screen sizes, ensuring a
consistent and smooth user experience across different Android devices.
Instant Calculation: The application provides real-time calculation as users input numbers
and operators, displaying results instantly.
Development Process:
Requirement Analysis: The initial phase involved gathering requirements and defining the
scope of the application, including its features and user interface design.
Design: The application's user interface was designed using Android Studio's layout editor,
focusing on simplicity and usability.
Testing: Rigorous testing was conducted to ensure the application performs accurately under
various scenarios, including edge cases and invalid inputs.
Functionality:
The Simple Calculator allows users to input numerical values and perform calculations by tapping
the corresponding operation buttons. The application employs a simple logic flow to execute
operations and display results accurately.
7
2. TECHNOLOGIES & TOOLS
Software Used:
i. Android Studio
ii. Languages Used: Java
iii. Execution on:-Emulator
Hardware Used:
-CPU configuration
-Intel
-RAM 8 GB DDR2
Operating System:
-Windows 10
Future Scope:
c. Customization Options: Implementing user preferences for themes, layouts, and button
configurations allows personalization, catering to a diverse user base.
d. Cloud Integration: Saving and syncing calculation history or custom functions across
devices through cloud services like Google Drive or Dropbox enhances user
convenience.
a. Efficient Calculation Engine: The underlying calculation engine will be optimized for
speed and accuracy, ensuring reliable results even for complex mathematical operations.
c. Localization: Support for multiple languages will make the calculator accessible to a
global audience, enhancing its usability and inclusivity
8
3. PROGRAM
xml code:-
<TextView
android:id="@+id/T1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Scientific Claculator"
android:layout_marginTop="20dp"
android:textSize="30dp"
android:textStyle="bold"
android:layout_marginLeft="80dp"
android:background="@android:color/background_light"
/>
<EditText
android:id="@+id/E1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter 1st Number"
android:inputType="number"
android:layout_marginTop="110dp"
android:textSize="25dp"
android:background="@android:color/background_light"
/>
<EditText
android:id="@+id/E2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter 2nd Number"
android:inputType="number"
android:layout_marginTop="170dp"
android:background="@android:color/background_light"
android:textSize="25dp"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="240dp"
android:text="Add"
9
android:onClick="Submit"
android:id="@+id/B"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="300dp"
android:text="Sub"
android:onClick="Submit1"
android:id="@+id/B1"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="240dp"
android:text="Mul"
android:layout_marginLeft="290dp"
android:onClick="Submit2"
android:id="@+id/B2"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="300dp"
android:text="Div"
android:layout_marginLeft="290dp"
android:onClick="Submit3"
android:id="@+id/B3"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="240dp"
android:layout_marginLeft="145dp"
android:text="Mod"
android:onClick="Submit4"
android:id="@+id/B4"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="480dp"
android:layout_marginLeft="145dp"
android:text="Clear"
android:onClick="Submit5"
android:id="@+id/B5"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
10
android:layout_marginTop="300dp"
android:layout_marginLeft="145dp"
android:text="Exp"
android:onClick="Submit6"
android:id="@+id/B6"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="360dp"
android:text="Sin"
android:onClick="Sin"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="360dp"
android:layout_marginLeft="145dp"
android:text="Cos"
android:onClick="Cos"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="360dp"
android:layout_marginLeft="290dp"
android:text="Tan"
android:onClick="Tan"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="420dp"
android:text="Log"
android:onClick="Log"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="420dp"
android:layout_marginLeft="290dp"
android:text="sqrt"
android:onClick="sqrt"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="420dp"
android:layout_marginLeft="145dp"
android:text="00"
11
android:onClick="zero"
/>
<TextView
android:id="@+id/T2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="160dp"
android:layout_marginTop="600dp"
android:background="@android:color/background_light"
android:text="Result"
android:textStyle="bold"
android:textSize="25dp" />
</RelativeLayout>
Java code:-
package com.example.myapplication;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;
import android.widget.EditText;
import android.widget.Button;
import android.view.View;
public class MainActivity extends AppCompatActivity {
TextView T1,T2;
EditText E1,E2;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
T1=findViewById(R.id.T1);
T2=findViewById(R.id.T2);
E1=findViewById(R.id.E1);
E2=findViewById(R.id.E2);
}
public void Submit(View v) {
String v1=E1.getText().toString();
String v2=E2.getText().toString();
int a=Integer.parseInt(v1);
int b=Integer.parseInt(v2);
int sum=a+b;
T2.setText("Addition is:"+sum);
}
public void Submit1(View v) {
String v1=E1.getText().toString();
String v2=E2.getText().toString();
int a=Integer.parseInt(v1);
int b=Integer.parseInt(v2);
int sum=a-b;
12
T2.setText("Subtraction is:"+sum);
}
public void Submit2(View v) {
String v1=E1.getText().toString();
String v2=E2.getText().toString();
int a=Integer.parseInt(v1);
int b=Integer.parseInt(v2);
int sum=a*b;
T2.setText("Multiplaction is:"+sum);
}
public void Submit3(View v) {
String v1=E1.getText().toString();
String v2=E2.getText().toString();
float a=Integer.parseInt(v1);
float b=Integer.parseInt(v2);
float sum=a/b;
T2.setText("Division is:"+sum);
}
public void Submit4(View v) {
String v1=E1.getText().toString();
String v2=E2.getText().toString();
float a=Integer.parseInt(v1);
float b=Integer.parseInt(v2);
float sum=a%b;
T2.setText("Remainder is:"+sum);
}
public void Submit5(View v) {
E1.setText("");
E2.setText("");
T2.setText("Result");
}
public void Submit6(View v) {
String v1=E1.getText().toString();
String v2=E2.getText().toString();
double a=Integer.parseInt(v1);
double b=Integer.parseInt(v2);
double sum=Math.pow(a,b);
T2.setText("Exponent is:"+sum);
}
public void Sin(View v) {
String v1=E1.getText().toString();
double a=Integer.parseInt(v1);
double sum=Math.sin(a);
T2.setText("Sin is:"+sum);
}
public void Cos(View v) {
String v1=E1.getText().toString();
double a=Integer.parseInt(v1);
double sum=Math.cos(a);
T2.setText("Cos is:"+sum);
13
}
public void Tan(View v) {
String v1=E1.getText().toString();
double a=Integer.parseInt(v1);
double sum=Math.tan(a);
T2.setText("Tan is:"+sum);
}
public void Log(View v) {
String v1=E1.getText().toString();
double a=Integer.parseInt(v1);
double sum=Math.log10(a);
T2.setText("Log is:"+sum);
}
public void sqrt(View v) {
String v1=E1.getText().toString();
double a=Integer.parseInt(v1);
double sum=Math.sqrt(a);
T2.setText("Log is:"+sum);
}
public void zero(View v) {
if(E1.isClickable()) {
String v1 = E1.getText().toString();
E1.setText(v1 +"00");
}
else if(!E1.isClickable()){
String v2 = E2.getText().toString();
E2.setText(v2 +"00");
}
}
}
14
4. OUTPUT
15
16
17
18
19
5. CONCLUSION
In conclusion, the simple calculator developed in Android Studio provides a user-friendly and
efficient solution for basic mathematical computations. Its straightforward design and essential
features make it a valuable tool for users seeking a hassle-free calculator application. As technology
continues to advance, this application serves as a testament to the seamless integration of practical
functionality with an intuitive user interface.
6. REFERENCE
20