Advancejava PDF
Advancejava PDF
CERTIFICATE
Computer Engineering
MSBTE, Mumbai
SUBMITTED BY:
SUBMITTED BY:
Harsha P. Bende(44)
Sruti S.Hend (52)
Sapana G. W.anare(24)
Arti S. Nimk. arde (34)
Guided by:-
2
Research about 02/10/2024 02/10/2024 Harsha P.
the [ 2 hrs ] Bende
resources.
3
Collection of 04/10/2024 03/10/2024 Shruti S.
Resources [ 2 hrs ] Hend
4
Creating logic to 06/10/2024 05/10/2024 All members
make the [ 2 hrs ]
program
5
Writing the program 07/10/2024 07/10/2024 Sapana G.
[ 2 hrs ] Wanare
6
Executed program 09/10/2024 08/10/2024
[ 2 hrs ] Arti
S.Nimkarde
7 Harsha P.
Fixed Bugs and errors 12/10/2024 11/10/2024 Bende
[ 2 hrs ]
8
Wrote the Report Arti S.Nimkarde
15/10/2024 13/10/2024
[ 2 Hr ]
9.
Submitted the 21/10/2024 Harsha P.
Micro project Bende Shruti S.
21/10/2024 Hend Sapana G.
[ 1 Hr] Wanare Arti
S.Nimkarde
ANEXURE-|
MICRO-PROJECT PROPOSAL
TITLE OF MICROPROJECT: -
Secure User Access: The main aim of this project is to create a secure, user-specific scientific
calculator. By incorporating a login authentication feature, it restricts access and allows only authorized
users to use the application.
Comprehensive Calculations: This scientific calculator offers a variety of operations, including basic
arithmetic, trigonometric, logarithmic, and power functions, providing users with a complete set of tools
for complex calculations.
Error Management and User-Friendly Interface: The project ensures that users are provided with real-
time feedback through dialog boxes, with "Login Successful" messages for correct credentials and error
messages for incorrect credentials.
1.0 RATIONALE: -
Java technology is a versatile and widely used programming language, especially for creating web
applications and desktop solutions. Built on object-oriented principles, Java empowers developers to create
robust, maintainable, and powerful applications. This project leverages Java's core concepts and object-
oriented approach to develop a Scientific Calculator with a seamless user interface and robust backend
functionality. Students working on this project will gain practical experience in GUI development (AWT and
Swing), event handling, and database interaction, aligning with industry demands for skilled Java
developers.
Efficient Calculation Operations: The primary aim of the Scientific Calculator is to perform complex
mathematical operations efficiently. By integrating multiple functionalities into a single application, it
eliminates the need for separate tools and simplifies user tasks.
Enhanced User Experience: With a user-friendly interface designed using AWT and Swing, this
calculator ensures a smooth user experience. Its intuitive design makes it accessible for users with
minimal technical knowledge.
Database Interaction for Enhanced Features: The inclusion of a login system, backed by MySQL,
demonstrates database integration. This ensures secure access and lays the foundation for
implementing advanced features like user preferences and activity logging in the future.
• https://www.geeksforgeeks.org/LMS-
• https://www.coursehero.com/file/41666205/Library-Management-SystemPDF
• https://chat.openai.com/ •
Referred Books:
1. Operating system 1
(Window
11)
2. Microsoft office 1
Fig.1
Fig.2
Fig.3
Fig.4
FIG 5
8.0 SKILLS DEVELOPED/LEARNING OUTCOME OF THE MICRO- PROJECT:
➢ Implemented a Java program for the Scientific Calculator with Authentication, reducing
manual calculations and ensuring secure access.
➢ Improved programming skills, particularly in GUI design and database integration.
➢ Enhanced problem-solving techniques through debugging and error handling.
➢ Strengthened leadership qualities by managing project tasks efficiently.
➢ Gained knowledge of new operations and authentication mechanisms.
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
// Database credentials
//private final String DB_URL = "jdbc:mysql://localhost:3306/calculator_db"; // Update with your
DB name
//private final String USER = "root"; // Update with your DB username
// private final String PASS = "sandip123"; // Update with your DB password
// Username label
JLabel userLabel = new JLabel("Username:");
userLabel.setFont(new Font("Arial", Font.BOLD, 16));
userLabel.setForeground(Color.BLUE);
gbc.gridx = 0;
gbc.gridy = 1;
gbc.gridwidth = 1;
gbc.anchor = GridBagConstraints.LINE_END;
panel.add(userLabel, gbc);
// Password field
passwordText = new JPasswordField(15);
passwordText.setFont(new Font("Arial", Font.PLAIN, 16));
gbc.gridx = 1;
gbc.gridy = 2;
gbc.anchor = GridBagConstraints.LINE_START;
panel.add(passwordText, gbc);
showPasswordCheckBox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if (showPasswordCheckBox.isSelected()) {
passwordText.setEchoChar((char) 0); // Show password
} else {
passwordText.setEchoChar('●'); // Hide password
}
}
});
// Login button
loginButton = new JButton("Login");
loginButton.setFont(new Font("Arial", Font.BOLD, 16));
loginButton.setBackground(new Color(41, 128, 185)); // Button background color
loginButton.setForeground(Color.WHITE);
loginButton.addActionListener(this);
gbc.gridx = 0;
gbc.gridy = 4;
gbc.gridwidth = 2;
gbc.anchor = GridBagConstraints.CENTER;
panel.add(loginButton, gbc);
if (resultSet.next()) {
JOptionPane.showMessageDialog(null,"Login SuccessFully");
// Successful login
dispose(); // Close the login window
new ScientificCalculator(); // Open the scientific calculator window
} else {
JOptionPane.showMessageDialog(this, "Invalid username or password!");
}
// Closing resources
resultSet.close();
preparedStatement.close();
connection.close();
} catch (Exception ex) {
ex.printStackTrace();
JOptionPane.showMessageDialog(this, "Database connection error: " + ex.getMessage());
}
*/
JOptionPane.showMessageDialog(null,"Login SuccessFully");
// Successful login
dispose(); // Close the login window
new ScientificCalculator(); // Open the scientific calculator window
} else{
JOptionPane.showMessageDialog(this, "Invalid username or password!");
}
}
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
// Constructor
public ScientificCalculator() {
// Creating a frame
frame = new JFrame("Scientific Calculator - Create By Harshu");
textArea = new JTextArea();
// Creating buttons
JPanel panel = new JPanel();
panel.setLayout(new GridLayout(8, 4, 10, 10)); // Increased rows for additional buttons
addButtons(panel);
// Frame properties
frame.setSize(500, 800); // Increased frame size
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLocationRelativeTo(null); // Center the frame
frame.setVisible(true);
}