0% found this document useful (0 votes)
14 views5 pages

My Ajpmicro

The microproject focuses on developing a user-friendly Simple Calculator Application in Java that performs basic arithmetic operations while enhancing understanding of Java programming fundamentals. The project involves several phases including topic finalization, requirement gathering, coding, integration, testing, and documentation, with a clear action plan and timeline. Key outcomes include improved skills in Java concepts and practical application of AWT components.

Uploaded by

suhaskadam0011
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)
14 views5 pages

My Ajpmicro

The microproject focuses on developing a user-friendly Simple Calculator Application in Java that performs basic arithmetic operations while enhancing understanding of Java programming fundamentals. The project involves several phases including topic finalization, requirement gathering, coding, integration, testing, and documentation, with a clear action plan and timeline. Key outcomes include improved skills in Java concepts and practical application of AWT components.

Uploaded by

suhaskadam0011
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/ 5

PART A-PLAN

1.0 INTRODUCTION

This microproject serves as an excellent opportunity to apply core Java concepts while developing a
practical application that performs basic arithmetic operations. The project focuses on providing a
userfriendly interface for input and output, supporting fundamental mathematical calculations, and
implementing error handling.

2.0 AIM OF THE DIFFERENT FEATURES OF OPERATING SYSTEM


The aim of the "Simple Calculator Application in Java" microproject is to develop a functional and
user-friendly calculator program that allows users to perform basic arithmetic operations. This
microproject serves as a practical exercise to enhance your understanding of Java programming
fundamentals, input handling, and mathematical operations, ultimately empowering you to create a
useful tool for performing calculations.

3.0 ACTION PLAN

Sr. Details of Activity Planned Planned Name of


Start Date Finish Date Responsible
No. Team
Member

1 Finalization of topic 1-10-2024 2-10-2024 All Team


Members

2 Project definition and 2-10-2024 4-10-2024 Suhas Kadam &


planning Prem Dhage

3 Requirement Gathering 5-10-2024 10-10-2024 All Team


Members

4 Implementation of code 12-10-2024 13-10-2024 All Team


Members

5 Integration and testing 12-10-2024 13-10-2023 All Team


Members

6 Documentation 12-10-2024 13-10-2024 All Team


Members
PART B
(OUTCOMES AFTER
EXECUTION)

1.0 DESCRIPTION

The "Simple Calculator Application in Java" microproject entails the creation of a straightforward yet
functional calculator program using the Java programming language. This microproject serves as an
excellent opportunity to apply core Java concepts while developing a practical application that performs
basic arithmetic operations. The project focuses on providing a user-friendly interface for input and output,
supporting fundamental mathematical calculations, and implementing error handling.

2.0 COURSE OUTCOMES INTEGRATED


❖ Understand the various basic concepts of Java programming ❖ Understand the
concept of awt components .
❖ Understand the concept of mathematical operations.

3.0 A] ACTUAL PROCEDURE FOLLOWED


• In the first step all the team members finalized the topic

• In the next step, Suhas & Prem defined the scope of project and planed it.

• In the next step, all the team members did gathering of requirement.

• After that all the implementation of the code was done by suhas kadam.

• In the next step, The code integration and testing was done by all the team members.

• The project was terminated and the documentation section was done by all the team members we finally
ended with completing the micro-project,

3.0 B] SOURCE CODE


import javax.swing.*; import
java.awt.*; import
java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class AdvancedCalculator


{ public static void main(String[] args)
{
SwingUtilities.invokeLater(() -> {
CalculatorFrame frame = new CalculatorFrame();
frame.setTitle("Advanced Calculator");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(300, 400); frame.setVisible(true);
});}}
class CalculatorFrame extends JFrame {
private JTextField display; private
double result = 0; private String
operator = "";
private boolean startNewInput = true;

public CalculatorFrame()
{ display = new JTextField(10);
display.setEditable(false);
display.setFont(new Font("Arial", Font.PLAIN, 24));

JPanel buttonPanel = new JPanel(new GridLayout(4, 4));

String[] buttonLabels = {
"7", "8", "9", "/",
"4", "5", "6", "*",
"1", "2", "3", "-",
"0", ".", "=", "+"
};

for (String label : buttonLabels) { JButton button


= new JButton(label); button.setFont(new
Font("Arial", Font.PLAIN, 18));
button.addActionListener(new ButtonClickListener());
buttonPanel.add(button);
}
setLayout(new BorderLayout());
add(display, BorderLayout.NORTH);
add(buttonPanel, BorderLayout.CENTER);
}
private class ButtonClickListener implements ActionListener {
public void actionPerformed(ActionEvent e) { String
command = e.getActionCommand();
if (startNewInput)
{ display.setText(""); startNewInput
= false; } if (command.matches("[0-9.]")) {
display.setText(display.getText() + command);
} else if (command.equals("="))
{ calculate();
startNewInput = true;
}

else {
if (!operator.isEmpty()) {
calculate();
}
operator = command;
result = Double.parseDouble(display.getText());
startNewInput = true;
}
}
}
private void calculate() {
double input = Double.parseDouble(display.getText());
switch (operator) { case "+": result +=
input;
break;
case "-": result
-= input;
break; case "*":
result *= input;
break;
case "/": if (input
!= 0)
{ result /=
input;
} else {
display.setText("Error");
startNewInput = true;
return;
} break;
}

display.setText(String.valueOf(result)); }}
3.0 C] OUTPUT

4.0 Actual Resource Used

Sr. Name of Specification Quantity Remark


No Resource/Material

1 Computer system Any computer system 1


with basic
configuration

2 Visual Studio code 1

5.0 SKILL DEVELOPED / LEARNING OUT OF THIS MICRO- PROJECT


After completion of the micro project, our concepts of Java such as awt components like buttons
, textfield , etc, we became able to implement our logic. It also helped to increase our logical
thinking.

6.0 REFERENCE USED


We used Java programming to implement the code, we have also taken the reference of
various websites for implementing the logic needed to develop this game.

You might also like