0% found this document useful (0 votes)
24 views

Part B JAVA

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Part B JAVA

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Part B

“Develop a Temperature Convertor using Java”

1. Rational: -
The AJP (Applied Java Programming) microproject
provides students with practical experience in Java
programming by applying theoretical knowledge to real-
world scenarios. By developing a Temperature
Converter using Java, students can enhance their
problem-solving abilities, reinforce key programming
concepts, and strengthen their understanding of Java's
core features.

Through the creation of the Temperature Converter,


students gain hands-on experience in building simple
applications, which serves as a foundation for more
advanced projects in software development. In addition,
the microproject fosters collaboration and teamwork as
students work together, sharing insights and problem-
solving strategies. The completion of this project not
only enhances students' technical skills but also boosts
their portfolios, preparing them for future academic
pursuits or careers in software development.

2. Aim Of Microproject: -

Develop a Temperature Convertor using Java


3. Course Outcomes Address: -

4. Literature Review: -

Developing a Temperature Converter using Java


involves applying core programming concepts such as
object-oriented principles, basic arithmetic operations,
and handling user input. The program allows users to
input a temperature value and convert it between Celsius,
Fahrenheit using simple formulas. Java’s built-in classes
like `Scanner` for input and `System.out.println` for
output make the implementation easy and efficient. The
design is modular, making it simple to extend with new
features. This project helps beginners practice key Java
concepts, while building a practical and maintainable
application.

This project is a great way for beginners to practice


essential Java concepts, such as classes, methods,
conditionals, and user interaction, while building a useful
and easy-to-understand application. It serves as a solid
foundation for more complex Java applications, offering
opportunities for further learning and development.
5. Actual Methodology Followed: -

1. Requirement Analysis: Identify and document


system requirements through stakeholder meetings and
interviews.

2. Design Phase: Define system architecture, UI


wireframes, and apply object-oriented design principles.

3. Technology Selection: Choose suitable Java


technologies, frameworks, and databases based on
project requirements.

4. Development: Implement backend functionality and


UI components, integrate layers, and write unit tests.

5. Testing: Conduct comprehensive testing including


unit, integration, and user acceptance testing.

6. Deployment and Maintenance: Deploy system,


provide user training, and establish a maintenance plan
for ongoing support and updates.
6. Actual Resources Used: -

Sr No. Resource Used Quantity


1 Web -
2 Textbook -
3 Notes -

7. Code Of Microproject: -
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class TemperatureConverter {


public static void main(String[] args) {
// Create the frame
JFrame frame = new JFrame("Temperature Converter");
frame.setSize(300, 200);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

// Create input field and labels


JLabel label1 = new JLabel("Enter Temperature:");
JTextField tempInput = new JTextField(10);
JLabel resultLabel = new JLabel("Result: ");

// Create buttons for conversion


JButton toCelsius = new JButton("To Celsius");
JButton toFahrenheit = new JButton("To Fahrenheit");
JButton reset = new JButton("Reset");

// Add ActionListener to buttons


toCelsius.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
double temp = Double.parseDouble(tempInput.getText());
double celsius = (temp - 32) * 5 / 9;
resultLabel.setText("Result: " + celsius + " °C");
}
});

toFahrenheit.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
double temp = Double.parseDouble(tempInput.getText());
double fahrenheit = (temp * 9 / 5) + 32;
resultLabel.setText("Result: " + fahrenheit + " °F");
}
});

reset.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
tempInput.setText("");
resultLabel.setText("Result: ");
}
});

// Layout setup
JPanel panel = new JPanel();
panel.add(label1);
panel.add(tempInput);
panel.add(toCelsius);
panel.add(toFahrenheit);
panel.add(reset);
panel.add(resultLabel);

frame.add(panel);
frame.setVisible(true);
}
}
8. Output of the Microproject: -
9. Skills Developed: -

1. Advance Java Expertise


2. Research and Data Compilation
3. Comparative Analysis
4. Critical Thinking and Problem Solving

10. References: -

1. Advance Java Tutorials and Documentation:


Oracle's Java Tutorials:
https://docs.oracle.com/javase/tutorial/

Java API Documentation:


https://docs.oracle.com/en/java/javase/17/docs/api/index.html

2. Additional Resources:

Stack Overflow: https://stackoverflow.com/


- For troubleshooting and asking specific programming questions.

GitHub: https://github.com/
- Explore open-source inventory management projects for
inspiration.

You might also like