MITS4002 Activity 09: Java GUI Application for Weight Conversion
VerifiedAdded on 2022/08/24
|9
|1222
|17
Practical Assignment
AI Summary
This assignment solution presents a Java-based application designed to convert pounds to kilograms using a graphical user interface (GUI). The project, developed for the MITS4002 Object-Oriented Software Development course, involves creating a JPanel (Conversion.java) and a testing class (testConversion.java) to build the UI. The program allows users to input a weight in pounds, and upon clicking the "Convert!" button, the equivalent weight in kilograms is displayed in a text area, formatted to three decimal places. The solution utilizes various Java Swing components such as JFrame, JTextArea, JLabel, and JTextField, along with layout management and action listeners to handle user interactions. The code includes the necessary formula for conversion and employs the append() method to retain previous results in the text area. The solution also includes screenshots, testing results, and addresses UI and computation correctness.
1 out of 9










