0% found this document useful (0 votes)
29 views22 pages

Ajp Micro Project

Uploaded by

asmainamdar2006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views22 pages

Ajp Micro Project

Uploaded by

asmainamdar2006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 22

A

Micro Project Report


On

__________________SCIENTIFIC CALCULATOR _________________

Submitted by
Asma Inamdar

Under the Guidance of


Mrs.S.V.Kothwal
In the Partial Fulfilment of Fifth Semester of Diploma in
Information Technology

JSPM’s
JAYAWANTRAO SAWANT POLYTECHNIC, Handewadi Road, Hadapsar,
Pune-28
Department of Information Technology
Affiliated to

Maharashtra State
Board of Technical Education

Academic Year 2024-25


Maharashtra State
Board of Technical Education

Certificate

This is to certify that Ms. Asma Inamdar with Roll No- 36 has successfully completed Micro-project in course
AJP(22517) for the academic year 2024-25 as prescribed in the 'Assessment Manual' during his tenure of
completing Fifth Semester of Diploma Programme in Information Technology from institute, Jayawantrao Sawant
Polytechnic with institute code 0711.

Place: Enrollment No: 2207110469

Date: Exam Seat No:

Course Teacher Head of the Department Head of the Institute


Annexure – I

Group Details:

Sr.No Name of Roll No Enrollment Seat No


group
No
members
1 Asma Inamdar 36 2207110469

Name of Guide: Mrs.S.V.Kothwal.


INDEX

SR.N CONTENT PAGE NO.


O.
PROJECT ABSTRACT
1

INTRODUCTION
2

CONCLUSION
3

WEEKLY PROGRESS REPORT


4

5 SOURCES USED
PROJECT ABSTRACT

The Scientific Calculator is an application for assisting a calculation in university. The system
would provide basic set of features to addition, Substruction, Multiplication, Division and
manage check in specifications for the systems based on the client’s statement of need.

Scientific calculators are used widely in situations that require quick access to certain
mathematical functions, especially those that were once looked up in mathematical tables, such
as trigonometric functions or logarithms. They are also used for calculations of very large or very
small numbers, as in some aspects of astronomy, physics, and chemistry. In certain contexts such
as higher education, scientific calculators have been superseded by graphing calculators, which
offer a superset of scientific calculator functionality along with the ability to graph input data and
write and store programs for the device.

There is also some overlap with the financial calculator market. They are very often required for
math classes from the junior high school level through college, and are generally either permitted
or required on many standardized tests covering math and science subjects; as a result, many are
sold into educational markets to cover this demand, and some high-end models include features
making it easier to translate a problem on a textbook page into calculator input, e.g. by providing
a method to enter an entire problem in as it is written on the page using simple formatting tools.

Objectives:-
1.To save time consumption.

2. To reduce manual work.

3. To help staff management system to make tasks easy and efficient.

4. To make easy to calculate any Example.

5. To make it easy to give output of equation.

6. To make calculator efficient.


INTRODUCTION

A scientific calculator is a type of electronic calculator, usually but not always handheld,
designed to calculate problems in science, engineering, and mathematics. They have completely
replaced slide rules in traditional applications, and are widely used in both education and
professional settings.

They are very often required for math classes from the junior high school level through
college, and are generally either permitted or required on many standardized tests covering math
and science subjects; as a result, many are sold into educational markets to cover this demand,
and some high-end models include features making it easier to translate a problem on a textbook
page into calculator input, e.g. by providing a method to enter an entire problem in as it is written
on the page using simple formatting tools.

Scientific calculators are used widely in situations that require quick access to certain
mathematical functions, especially those that were once looked up in mathematical tables, such
as trigonometric functions or logarithms. They are also used for calculations of very large or very
small numbers, as in some aspects of astronomy, physics, and chemistry.

In certain contexts such as higher education, scientific calculators have been superseded by
graphing calculators, which offer a superset of scientific calculator functionality along with the
ability to graph input data and write and store programs for the device. There is also some
overlap with the financial calculator mar.

The Scientific Calculator is an application for assisting a calculation in university. The


system would provide basic set of features to addition, Substruction, Multiplication, Division and
manage check in specifications for the systems based on the client’s statement of need.
CONCEPTS

1.Classes: Class is a group of data members (variables and arrays) and member functions
(methods).

Syntax:

Class class_name

Data members;

Member methods;

2.Objects: Object is an entity having its own properties and behaviour. For example, flower is an
object having properties such as colour, fragrance, etc.

Syntax:

Class_nameobject_name = new Class_name();

3. Packages: Package in java is a mechanism to encapsulate a group of classes, sub packages


and interfaces.

Packages are of two types:

1. Built in packages and

2. User defined packages.

User defined packages are created using ‘package’ keyword.

Syntax:

packagepackage_name;

Syntax to import packages:

importpackage_name;

or
importpackage_name.class_name;

or

package_name.class_nameobject_name = new package_name.class_name();

4. Jlable: The object of JLabel class is a component for placing text in a container. It is used to
display a single line of read only text.

The text can be changed by an application but a user cannot edit it directly. It inherits
JComponent class

Syntax:

JFrame f= new JFrame("Label Example");

5. Boolean: Boolean function is used to state as true or false for the following operations.

Syntax:

boolean isJavaFun = true;

boolean isFishTasty = false;

System.out.println(isJavaFun);

System.out.println(isFishTasty);

6.JButton: The JButton class is used to create a labelled button that has platform independent
implementation.

The application result in some action when the button is pushed. It inherits Abstract Button class.

Syntax:

JButton b=new JButton("Click Here");

f.add(b);
f.setSize(400,400);

7.JFrame: The javax.swing.JFrame class is a type of container which inherits the


java.awt.Frame class.

JFrame works like the main window where components like labels, buttons, textfields are added
to create a GUI.

Unlike Frame, JFrame has the option to hide or close the window with the help of set Default
Close Operation(int) method.

Syntax:

JFrame f=new JFrame("Button Example");

b.setBounds(50,100,95,30);

f.add(b);

f.setSize(400,400);

8. Dark Theme:

1. It have tabs.

2. It also looks cleaner app for programmers and developers supporting app programming
languages.

3. New fonts & styles


Source Code:
import javax.swing.*;

import java.awt.*;

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

import java.lang.Math;

public class ScientificCalculator extends JFrame {

private JTextField display; // Display for the calculator's result/input

private StringBuilder input; // Stores the user's input

private boolean isNewInput; // To check if a new input should be started

public ScientificCalculator() {

// Set the title of the window

setTitle("Scientific Calculator");

setSize(400, 500);

setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

setLayout(new BorderLayout());

// Initialize input and result display

input = new StringBuilder();

isNewInput = true;

// Display for showing expressions and results

display = new JTextField();


display.setFont(new Font("Arial", Font.PLAIN, 24));

display.setEditable(false);

display.setHorizontalAlignment(JTextField.RIGHT);

add(display, BorderLayout.NORTH);

// Panel for the calculator buttons

JPanel buttonPanel = new JPanel();

buttonPanel.setLayout(new GridLayout(6, 5, 10, 10));

// Button labels for the calculator

String[] buttonLabels = {

"7", "8", "9", "/", "sqrt",

"4", "5", "6", "*", "pow",

"1", "2", "3", "-", "log",

"0", ".", "=", "+", "sin",

"cos", "tan", "C", "(", ")"

};

// Create and add the buttons to the panel

for (String label : buttonLabels) {

JButton button = new JButton(label);

button.setFont(new Font("Arial", Font.PLAIN, 18));

button.addActionListener(new ButtonClickListener());

buttonPanel.add(button);

}
// Add the button panel to the main window

add(buttonPanel, BorderLayout.CENTER);

// Handle button click events

private class ButtonClickListener implements ActionListener {

@Override

public void actionPerformed(ActionEvent e) {

String command = e.getActionCommand();

if ("C".equals(command)) {

// Clear the display

input.setLength(0);

display.setText("");

isNewInput = true;

} else if ("=".equals(command)) {

// Evaluate the expression

try {

double result = evaluateExpression(input.toString());

display.setText(String.valueOf(result));

input.setLength(0);

isNewInput = true;

} catch (Exception ex) {

display.setText("Error");

} else if ("sqrt".equals(command)) {
// Square root

try {

double result = Math.sqrt(Double.parseDouble(input.toString()));

display.setText(String.valueOf(result));

input.setLength(0);

isNewInput = true;

} catch (Exception ex) {

display.setText("Error");

} else if ("pow".equals(command)) {

// Exponentiation

try {

double result = Math.pow(Double.parseDouble(input.toString()), 2);

display.setText(String.valueOf(result));

input.setLength(0);

isNewInput = true;

} catch (Exception ex) {

display.setText("Error");

} else if ("log".equals(command)) {

// Logarithm (base 10)

try {

double result = Math.log10(Double.parseDouble(input.toString()));

display.setText(String.valueOf(result));

input.setLength(0);

isNewInput = true;
} catch (Exception ex) {

display.setText("Error");

} else if ("sin".equals(command)) {

// Sine function (in radians)

try {

double result = Math.sin(Math.toRadians(Double.parseDouble(input.toString())));

display.setText(String.valueOf(result));

input.setLength(0);

isNewInput = true;

} catch (Exception ex) {

display.setText("Error");

} else if ("cos".equals(command)) {

// Cosine function (in radians)

try {

double result = Math.cos(Math.toRadians(Double.parseDouble(input.toString())));

display.setText(String.valueOf(result));

input.setLength(0);

isNewInput = true;

} catch (Exception ex) {

display.setText("Error");

} else if ("tan".equals(command)) {

// Tangent function (in radians)

try {
double result = Math.tan(Math.toRadians(Double.parseDouble(input.toString())));

display.setText(String.valueOf(result));

input.setLength(0);

isNewInput = true;

} catch (Exception ex) {

display.setText("Error");

} else {

// For all other buttons (numbers and operators)

if (isNewInput) {

input.setLength(0);

isNewInput = false;

input.append(command);

display.setText(input.toString());

// Evaluate the mathematical expression

private double evaluateExpression(String expr) {

try {

// Replace common mathematical symbols with Java equivalents

expr = expr.replace("sqrt", "Math.sqrt");

expr = expr.replace("pow", "Math.pow");

expr = expr.replace("log", "Math.log10");

expr = expr.replace("sin", "Math.sin");


expr = expr.replace("cos", "Math.cos");

expr = expr.replace("tan", "Math.tan");

// Evaluate the expression using Java's built-in evaluation capabilities

return (double) new


javax.script.ScriptEngineManager().getEngineByName("JavaScript").eval(expr);

} catch (Exception e) {

return Double.NaN;

public static void main(String[] args) {

// Create and show the calculator

SwingUtilities.invokeLater(new Runnable() {

@Override

public void run() {

new ScientificCalculator().setVisible(true);

});

}
Output :

By performing operation:
ADVANTAGE & DISADVANTAGE

⮚ Advantages

● Simple & Easy to Use


● Increased Calculations
● Efficient Cloud Data Management
● Highly Secure, Scalable & Reliable
● Mobile Access
● Dynamic Reports
● Fully Customizable
● Cost-effective

⮚ Disadvantages

● The data stored is prone to cyber hacks.


● Costly and Expensive.
● Complicated to operate.
● Online Systems require high-speed internet connectivity.
● Risk of computer virus
● The automation feature is not available in offline/ open source systems thus, requires
manual action to perform operations.
CONCLUSION

In this work we have developed a calculator for exact real number computation and performed a
theoretical analysis of the algorithms and experimented on their implementation. We began by
defining two representations of reals in the range [-1,1] using streams of digits. These were then
extended to represent real numbers on the whole real line using a (mantissa, exponent) style
representation.

We showed how to convert between these representations, how to convert decimal numbers into
a signed binary representation, and how to convert a finite portion of the signed binary
representation back into decimal. Algorithms for the basic arithmetic operations were
implemented for these representations.

A number of different techniques are used to obtain these algorithms, including exploiting the
relationship between the list operation `cons' and numerical average, using certain identities, and
analyzing of the range of possible values of a stream starting with a given digit or sequence of
digits. We developed an algorithm for the direct multiplication of two streams of signed binary
digit.

This is a more complex operation than the multiplication of dyadic digit streams, but avoids the
problem of dyadic digit swell which can be observed if the dyadic digit multiplication is used to
compute iterations of the logistic map, for example, and which can cripple performance.
WEEKLY PROGRESS REPORT
MICRO PROJECT

SR.NO. WEEK ACTIVITY PERFORMED SIGN OF GUIDE DATE

1 1st Discussion and finalization of


topic

2 2nd Preparation and submission of


Abstract

3 3rd Literature Review

4 4th Collection of Data

5 5th Collection of Data

6 6th Discussion and outline of Content

7 7th Formulation of Content

8 8th Editing and proof Reading of


Content

9 9th Compilation of Report And


Presentation

10 10th Seminar

11 11th Viva voce

12 12th Final submission of Micro Project

Sign of the student Signof the faculty


REFERENCE:
1. IEEE papers on Bank management control system software architecture. General
requirements and functional components.

2. Java Programming – Tech-Neo publications

3. AJP Text Book.

SOURCES USED :

I. Microsoft word
II. Computers with internet connectivity
ANEEXURE II
Evaluation Sheet for the Micro Project

Academic Year: 2024-25 Name of the Faculty: Mrs.S.V.Kothwal


Course: AJP Course code: 22517
Semester: 5
Title of the project: Scientific Calculator

Cos addressed by Micro project:


CO1: Develop a programs using GUI framework (AWT and Swing).
CO2: Handle events of AWT and Swing components.
CO3: Develop programs to handle events in java programming.
CO4: Develop java programs using networking concepts.
CO5: Develop programs using Database.
CO6: Develop programs using Servlets.

Major learning outcomes achieved by students by doing the project :


1. Understanding calculator functions.
2. Mathematical concepts.
3. Critical thinking.

Comments/suggestions about team work /leadership/inter-personal communication (if


any)
…………………………………………………………………………………………………
……………

Marks out of 6 Marks out of


for 4for
Roll No Student Name performance performance in Total out of 10
in group oral/
activity (D5 presentation
Col.8) (D5 Col.9)
36 Asma Inamdar

Mrs.S.V.Kothwal
(Signature of Faculty)

You might also like