Part B JAVA
Part B 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.
2. Aim Of Microproject: -
4. Literature Review: -
7. Code Of Microproject: -
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
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: -
10. References: -
2. Additional Resources:
GitHub: https://github.com/
- Explore open-source inventory management projects for
inspiration.