Create JAVAFX with all these requirements: Create a GUI (using JavaFX ) for a Building Manager application. Points are calculated
Question:
Create JAVAFX with all these requirements: Create a GUI (using JavaFX) for a "Building Manager" application. Points are calculated as follows:
Present a GUI List of Buildings from the Array in #2
Add Building / Delete Building buttons or menu items. You should have text fields to enter information for a new building. You should update your Array from #2 as you add and delete items.
Update a "pane" or "canvas" with a drawing of that building (it doesn't have to be "beautiful" since we aren't an Art class) using shapes (reference how your drew the "Car" from one of your Extra Credit Labs) (hint: make a few different draw methods - drawBuilding1(), drawBuilding2(),... and call the appropriate one as they select it from the list as the current one)
Have a "SEARCH" feature for your Building Manager which will show the characteristics of the building if it is found. You can make this a button or a menu item. You must use the RECURSIVE binary search algorithm from chapter 15 which takes a sorted list of ints and look for a number in that list (hint: put the building ids into a sorted list and then use that to search for a building id. If the building id is found, show the characteristics of the building (use a label or text field) and if the building id is not found, use the label to indicate that it wasn't found).
Implement a "SAVE" feature. Create a database table called Buildings & save your building information to it after user clicks on a "Save" button or a save menu item. The search button if the user type the IDs it'll show the building characteri/ save button insert and create the database ( all of them using the ArrayList i send and the building2 class) : public class Building2 {
private String name;
private String address;
private int numFloors;
private int buildingID;
//Default constructor
public Building2(){
name = "Default Building";
address = "Default Address";
numFloors = 0;
buildingID = 0;
}
// Constructor with argument
public Building2(String name, String address , int numFloors, int buildingID) {
this.name = name;
this.address = address;
this.numFloors = numFloors;
this.buildingID = buildingID;
}
// Setter and getter methods
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setAddress(String address) {
this.address = address;
}
public String getAddress() {
return address;
}
public void setNumFloors(int floors) {
this.numFloors = floors;
}
public int getNumFloors() {
return numFloors;
}
public int getBuildingID() {
return buildingID;
}
public void setBuildingID(int buildingID) {
this.buildingID = buildingID;
}
@Override
public String toString() {
return "Name: " + name +
"Address: " + address +
"Floors: " + numFloors +
"Building ID: " + buildingID;
}
}/ import java.util.ArrayList;
public class Array {
public static void main(String[] args) {
ArrayList
Building1.add(new Building2("Building A", "123 Main Street", 5, 1));
ArrayList
Building2.add(new Building2("Building B", "456 Elm Street", 10, 2));
ArrayList
Building3.add(new Building2("Building C", "789 Oak Street", 7, 3));
@SuppressWarnings("unchecked")
ArrayList
BuildingsArray[0] = Building1;
BuildingsArray[1] = Building2;
BuildingsArray[2] = Building3;
for (ArrayList
for (Building2 building1 : buildings) {
System.out.println("Building Name: " + building1.getName());
System.out.println("Address: " + building1.getAddress() );
System.out.println("Number of Floors: " + building1.getNumFloors());
System.out.println("Building ID: " + building1.getBuildingID());
System.out.println();
}/ all these features in the BuildingManagerGUI don't make lots of classes just ONE CLASS