OOP Lab 10 Assignment
OOP Lab 10 Assignment
Task 1: You are tasked with creating a simple JavaFX application that displays a
personalized greeting message when a user enters their name and clicks a button.
When the user enters their name (e.g., "Alice") in the text field and clicks the "Say Hello"
button, the label updates to display "Hello, Alice!".
Requirements
Requirements
You are tasked with creating a JavaFX application that increments a counter every time a
button is clicked.
Requirements
1. Layout:
Add a Label for the title (e.g., "Temperature Converter").
Add two TextField components for entering the temperature in Celsius and
Fahrenheit.
Include two Buttons labeled "Convert to Fahrenheit" and "Convert to Celsius".
Arrange the components using a VBox.
2. Functionality:
Clicking "Convert to Fahrenheit" should calculate the Fahrenheit equivalent
and display it in the appropriate TextField.
Clicking "Convert to Celsius" should calculate the Celsius equivalent and
display it.
3. Validation:
Display an error message in a Label if the user enters invalid input.
4. Enhancement:
Add tooltips to guide users on how to use the application.
Home Task 2: To-Do List Manager
Build a basic To-Do List application.
Task Description:
1. Layout:
Add a TextField for entering a task.
Include an "Add Task" button to add the task to a list.
Use a ListView to display the tasks.
Add a "Remove Selected Task" button to delete a selected task.
Arrange components using a VBox.
2. Functionality:
Clicking "Add Task" should add the entered task to the ListView.
Clicking "Remove Selected Task" should delete the selected task from the ListView.
3. Enhancement:
Add a confirmation dialog (Alert) before deleting a task.
Home Task 3: Simple Calculator
Scenario: Create a basic calculator application to perform addition, subtraction,
multiplication, and division.
Task Description:
1. Layout:
Add two TextField components for number input.
Include four Buttons for "+", "-", "*", and "/".
Add a Label to display the result.
Use an HBox for the buttons and a VBox for the overall layout.
2. Functionality:
Clicking a button should perform the corresponding operation and display the result
in the Label.
Handle division by zero with an error message in the Label.
3. Validation:
Ensure both inputs are valid numbers before performing any operation.