RoadTripCostEstimator

BACK

Cost Estimator Program

Project Objectives:

Project
- distanceTitles: String[]           
- gasolineCostTitles: String[]       
- gasMileageTitles: String[]         
- cboD: ComboBox<String>             
- cboC: ComboBox<String>             
- cboM: ComboBox<String>             
- distanceField: TextField           
- gasCostField: TextField            
- gasMileageField: TextField         
- hotelCostField: TextField          
- foodCostField: TextField           
- daysField: TextField               
- attractionsField: TextField        
- totalCostField: TextField   

javafx.scene.layout.GridPane
-alignment: ObjectProperty
-gridLinesVisible: BooleanProperty
-hgap: DoubleProperty
-vgap: DoubleProperty
+GridPane()
+add(child: Node, columnIndex: int, rowIndex: int): void
+addColumn(columnIndex: int, children: Node...): void
+addRow(rowIndex: int, children: Node...): void
+getColumnIndex(child: Node): int
+setColumnIndex(child: Node, columnIndex: int): void
+getRowIndex(child: Node): int
+setRowIndex(child: Node, rowIndex: int): void
+setHalighnment(child: Node, value: HPos): void
+setValighnment(child: Node, value: VPos): void

Steps taken:

  1. Created a grid pane and set its properties
  2. Set alignment of nods within pane
  3. Set Horizontal & vertical gaps between nodes
  4. Place nodes in the pane
  5. Create scene and place it in the stage ( Title: Trip Cost Estimator)
  6. Method calculateTotalCost()
  7. Include mesument conversions for :
  8. Add calculations to get total trip cost