Rescued Document Java Report

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Programme Name: Computer Engineering Academic Year: 2024 – 2025

Program Code: CO5I Semester: Fifth


Course Name: Advanced Java Programming Course Code: (22517)

A STUDY ON

Currency converter INR ₹ to USD $

MICRO PROJECT REPORT


Submitted by the group of 4 students,

Group Number: 24

Sr. No Roll No Name Enrollment No Seat No

1 01 Shukla Lakshit Jitendra 2200590075


2 10 Borse Aryan Shailendra 2200590083
3 129 Shelke Nikita Devidas 2200590184
4 135 Mahale Sanskruti Shantaram 23610960313

Under the Guidance of


Ms. C. S. Patil
in
Three Years Diploma Programme in Engineering and Technology of
Maharashtra State Board of Technical Education, Mumbai (Autonomous)
ISO 9001: 2008 (ISO/IEC-27001:2013)
at
Shri Shivaji Vidya Prasarak Sanstha
MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION, MUMBAI

Certificate
This is to certify that,

Sr.
Roll No Name Enrollment No Seat No
No
1 01 Shukla Lakshit Jitendra 2200590075
2 10 Borse Aryan Shailendra 2200590083
3 129 Shelke Nikita Devidas 2200590184
4 135 Mahale Sanskruti Shantaram 23610960313

Students of Fifth Semester Diploma Programme in Computer Engineering at


Shri Shivaji Vidya Prasarak Sanstha’s Bapusaheb Shivajirao Deore
Polytechnic, Dhule (Institute Code: 0059), have completed the Micro Project
satisfactorily in Subject Advanced Java Programming (22517) in the academic year
2024–2025 as prescribed in the MSBTE curriculum of I Scheme.

Place: Dhule Date: / / 2024

Project Guide Head of the Department Principal

/ Seal of
institute
Part A: Micro-Project Proposal
Title: Currency converter INR ₹ to USD $

1.0 Introduction:
This project aims to create a calculator application using Java's Swing framework, providing
a user-friendly interface for performing basic mathematical operations. The application will
feature buttons for numbers and operations making it suitable for a wide range of users.
By developing this calculator, we will enhance our understanding of Java programming and
GUI design, demonstrating key concepts such as event handling and user interaction.
Ultimately, this project serves as a practical tool for learning and applying programming skills
in a real-world application.

2.0 Aim of the Micro-Project:


The aim of this micro-project is to create and understand the usage and functionality of the
Calculator Application developed in Java.

3.0 Intended Course Outcomes:


a. Develop program using GUI framework (Swing)
b. Handle events of Swing Components.
c. Develop programs to handle events in Java Programming.

4.0 Literature Review:

5.0Proposed Methodology:
6.0 Resources Required:

Sr. Name of
Specifications Quantity
No. Resource/Material

Computer system with broad


1. Any operating system 1
specification

Notepad or any text editor,


2. Application, Website
JDK 1

7.0 Action Plan:

Sr. Details of Activity Planned Start Planned Name of Team


no Date Finish Date Member

1. Define problem for 14/10/2024 21/10/2024 Aaryan Shailendra


project Borse, Sanskruti
Shantaram Mahale
2. Searching and gathering 14/10/2024 21/10/2024 Nikita Devidas
Requirements Shelke, Sanskruti
Shantaram Mahale
3. Designing the project 21/10/2024 11/11/2024 Nikita Devidas
Shelke, Aaryan
Shailendra Borse
4. Documentation 21/10/2024 11/11/2024 Nikita Devidas
Shelke, Sanskruti
Shantaram Mahale
5. Demonstration 11/11/2024 18/11/2024 Lakshit Jitendra
Shukla, Aaryan
Shailendra Borse
Part B: Micro-Project Report
Title: Calculator Using Swing Component
1.0 Rationale:
This project is designed to enhance understanding of Java Swing for GUI development and
event-driven programming. Creating a calculator offers practical experience with Java
components like JButton and JTextField, while developing essential skills in handling user
inputs through ActionListeners. It provides a real-world application with a simple, user-
friendly interface, laying the foundation for future desktop application development.
Additionally, it emphasizes problem-solving and logical reasoning in translating everyday
tools into functional software solutions.

2.0 Course Outcomes Addressed:


a. Develop programs using Swing components.
b. Develop programs to handle events in Java programming.

3.0 Literature Review:


Java Swing is a popular toolkit for building platform-independent GUI applications, offering
components like JFrame, JButton, and JTextField, which are ideal for creating a simple calculator.
Swing's flexibility and event-driven model, based on ActionListener, make it suitable for handling
user interactions efficiently. Previous research and tutorials demonstrate how Swing enables the
development of functional calculators by managing button events and real-time display updates.
This project builds on established principles of GUI design and event-driven programming to
create an interactive desktop calculator using Java Swing.
4.0 Actual Methodology Used:
Source Code:

import javax.swing.*;

import java.awt. *;

import java.awt.event.*;

public class CurrencyConverter {

public static void converter () {

JFrame frame = new JFrame("Currency Converter");

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

frame.setLayout(new GridBagLayout());

GridBagConstraints gbc = new GridBagConstraints();

// Set background color for the frame

frame.getContentPane().setBackground(new Color(230, 230, 250)); // Lavender color

JLabel labelINR = new JLabel("INR:");

JLabel labelUSD = new JLabel("USD:");

// Set label colors


labelINR.setForeground(new Color (0, 102, 204)); // Dark blue

labelUSD.setForeground(new Color (0, 102, 204)); // Dark blue

JTextField textINR = new JTextField("0", 15); // Increased width

JTextField textUSD = new JTextField("0", 15); // Increased width

// Set text field background and foreground colors

textINR.setBackground(new Color (255, 255, 255)); // White

textUSD.setBackground(new Color (255, 255, 255)); // White

textINR.setForeground(new Color (0, 0, 0)); // Black

textUSD.setForeground(new Color (0, 0, 0)); // Black

// Set a larger font

Font font = new Font ("Arial", Font.PLAIN, 18);

textINR.setFont(font);

textUSD.setFont(font);

JButton btnToUSD = new JButton("Convert to USD");

JButton btnToINR = new JButton("Convert to INR");

JButton btnClose = new JButton("Close");

// Set button colors and sizes

btnToUSD.setBackground(new Color (0, 204, 102)); // Green


btnToUSD.setForeground(Color.WHITE);

btnToUSD.setFont(font);

btnToUSD.setPreferredSize(new Dimension (200, 40)); // Increase button size

btnToINR.setBackground(new Color (0, 204, 102)); // Green

btnToINR.setForeground(Color.WHITE);

btnToINR.setFont(font);

btnToINR.setPreferredSize(new Dimension (200, 40)); // Increase button size

btnClose.setBackground(new Color (204, 0, 0)); // Red

btnClose.setForeground(Color.WHITE);

btnClose.setFont(font);

btnClose.setPreferredSize(new Dimension (200, 40)); // Increase button size

gbc.insets = new Insets(10, 10, 10, 10);

gbc.gridx = 0; gbc.gridy = 0; frame.add(labelINR, gbc);

gbc.gridx = 1; frame.add(textINR, gbc);

gbc.gridx = 0; gbc.gridy = 1; frame.add(labelUSD, gbc);

gbc.gridx = 1; frame.add(textUSD, gbc);

gbc.gridx = 0; gbc.gridy = 2; gbc.gridwidth = 2; frame.add(btnToUSD, gbc);

gbc.gridy = 3; frame.add(btnToINR, gbc);

gbc.gridy = 4; frame.add(btnClose, gbc);


btnToUSD.addActionListener(e -> {

String input = textINR.getText().trim();

if (input.isEmpty() || !input.matches("\\d+(\\.\\d+)?")) {

JOptionPane.showMessageDialog(frame, "Please enter a valid positive number for


INR.");

return;

double amountINR = Double.parseDouble(input);

if (amountINR < 0) {

JOptionPane.showMessageDialog(frame, "Please enter a positive number for


INR.");

return;

double amountUSD = amountINR / 65.25;

textUSD.setText(String.format("%.2f", amountUSD));

});

btnToINR.addActionListener(e -> {

String input = textUSD.getText().trim();

if (input.isEmpty() || !input.matches("\\d+(\\.\\d+)?")) {

JOptionPane.showMessageDialog(frame, "Please enter a valid positive number for


USD.");

return;

double amountUSD = Double.parseDouble(input);


if (amountUSD < 0) {

JOptionPane.showMessageDialog(frame, "Please enter a positive number for


USD.");

return;

double amountINR = amountUSD * 65.25;

textINR.setText(String.format("%.2f", amountINR));

});

btnClose.addActionListener(e -> frame.dispose());

// Set preferred size for the frame

frame.setPreferredSize(new Dimension(700, 400)); // Adjust size as needed

frame.pack();

frame.setVisible(true);

frame.setLocationRelativeTo(null); // Center the frame on the screen

public static void main (String [] args) {

SwingUtilities.invokeLater(CurrencyConverter::converter);

}
5.0 Actual Resources Used:

Sr.
Name of Resource/Material Specifications Quantity Remarks
No.

1. Computer system with broad OS: Windows 11 (64 bit) 1


specification
Processor: Intel i3 11th Gen

RAM: 8 GB

2. Application, Website Wikipedia, Word 1

6.0 Output of Micro-Project:

Fig No:
Fig No 2:

Fig No 3:
7.0 Skill Developed/Learning outcome of this Micro-Project:

• Experienced good team work.


• Implemented the concept of Advance Java such as event handling.

8.0 Application of the Micro-Project:


Evaluation Sheet for the Micro Project

Academic Year: 2024-2025 Name of Faculty: Ms. Chaitali S. Patil

Sem: Fifth Program Name and Code: CO-5I

Course Code: 22517 Course Name: Advanced Java Programming (AJP)

Title of the Project: Currency Calculator INR to USD $

COs addressed by the Micro Project:


a) Develop programs using GUI Framework (AWT and Swing).
b) Handle events of AWT and Swings components.
c) Develop programs to handle events in Java Programming.
Major Learning Outcomes achieved by students by doing the Project:

a. Practical Outcomes
a. Write a java program to demonstrate AWT components.
b. Write a java program to handle KeyEvent.
c. Write a java program to demonstrate ActionEvent.

b. Unit Outcomes (in Cognitive domain)


a. Develop Graphical user interface (GUI) programs using swing components
for the given problem.

c. Outcomes in Affective Domain


a) Practice good housekeeping.
b) Work as a leader/a team member.
Marks:
Name of Student: Lakshit Jitendra Shukla
Roll no: 01
(A) Marks for Group work: (B) Marks for Individual work: (C) Total Marks (A+B) =
Evaluation Sheet for the Micro Project

Academic Year: 2024-2025 Name of Faculty: Ms. Chaitali S. Patil

Sem: Fifth Program Name and Code: CO-5I

Course Code: 22517 Course Name: Advanced Java Programming (AJP)

Title of the Project: Currency Calculator INR to USD $

COs addressed by the Micro Project:


d) Develop programs using GUI Framework (AWT and Swing).
e) Handle events of AWT and Swings components.
f) Develop programs to handle events in Java Programming.
Major Learning Outcomes achieved by students by doing the Project:

a. Practical Outcomes
d. Write a java program to demonstrate AWT components.
e. Write a java program to handle KeyEvent.
f. Write a java program to demonstrate ActionEvent.

b. Unit Outcomes (in Cognitive domain)


a. Develop Graphical user interface (GUI) programs using swing components
for the given problem.

c. Outcomes in Affective Domain


c) Practice good housekeeping.
d) Work as a leader/a team member.
Marks:
Name of Student: Aaryan Shailendra Borse
Roll no: 10
(A) Marks for Group work: (B) Marks for Individual work: (C) Total Marks (A+B) =
Evaluation Sheet for the Micro Project

Academic Year: 2024-2025 Name of Faculty: Ms. Chaitali S. Patil

Sem: Fifth Program Name and Code: CO-5I

Course Code: 22517 Course Name: Advanced Java Programming (AJP)

Title of the Project: Currency Calculator INR to USD $

COs addressed by the Micro Project:


g) Develop programs using GUI Framework (AWT and Swing).
h) Handle events of AWT and Swings components.
i) Develop programs to handle events in Java Programming.
Major Learning Outcomes achieved by students by doing the Project:

a. Practical Outcomes
g. Write a java program to demonstrate AWT components.
h. Write a java program to handle KeyEvent.
i. Write a java program to demonstrate ActionEvent.

b. Unit Outcomes (in Cognitive domain)


a. Develop Graphical user interface (GUI) programs using swing components
for the given problem.

c. Outcomes in Affective Domain


e) Practice good housekeeping.
f) Work as a leader/a team member.
Marks:
Name of Student: Nikita Devidas Shelke
Roll no: 129
(A) Marks for Group work: (B) Marks for Individual work: (C) Total Marks (A+B) =
Evaluation Sheet for the Micro Project

Academic Year: 2024-2025 Name of Faculty: Ms. Chaitali S. Patil

Sem: Fifth Program Name and Code: CO-5I

Course Code: 22517 Course Name: Advanced Java Programming (AJP)

Title of the Project: Currency Calculator INR to USD $

COs addressed by the Micro Project:


j) Develop programs using GUI Framework (AWT and Swing).
k) Handle events of AWT and Swings components.
l) Develop programs to handle events in Java Programming.
Major Learning Outcomes achieved by students by doing the Project:

a. Practical Outcomes
j. Write a java program to demonstrate AWT components.
k. Write a java program to handle KeyEvent.
l. Write a java program to demonstrate ActionEvent.

b. Unit Outcomes (in Cognitive domain)


a. Develop Graphical user interface (GUI) programs using swing components
for the given problem.

c. Outcomes in Affective Domain


g) Practice good housekeeping.
h) Work as a leader/a team member.
Marks:
Name of Student: Sanskruti Shantram Mahale
Roll no: 135
(A) Marks for Group work: (B) Marks for Individual work: (C) Total Marks (A+B) =

You might also like