COMP2243 - Programming and Problem Solving

Syllabus Software Installation Assignments Tests
Lectures and Labs
**Back to Full Menu**

Graphical User Interface Mile Per Gallon More Programs Road Sign Quiz



Miles Per Gallon JavaFX Program


Description

This program is GUI program developed with JavaFX technology.

The program inputs the vehicle information, miles driven, and gallons of gas consumed. It then calculates the miles per gallon.

Associated Concepts:

GUI Programming with JavaFX

SceneBuilder

Algorithm:

Calculate button event:

Retrieve data from the text field controls

Calculate the miles per gallon

Output the result in the text area control

Reset button event:

Clear the text fields and text area


Partially Completed Java Program: MPG.java