Create new JavaFX project called usernamePart3 in NetBeans. For this part, you need to build an app
Question:
- Create new JavaFX project calledusernamePart3in NetBeans.
- For this part, you need to build an app that stores a collection of Sculptures for a small exhibition (see the attached class). Your app will allow the user (exhibition'sstaff) to enter data about a sculpture. When the user is finished, the data will be written to a Sculpture object, and then the Sculpture object will be added to a LinkedList. The user can then enter data for a new sculpture and repeat the process.
Your app will need the following UI controls that will be mapped to instance variables in the Sculpture class provided at the end of this document:
- Text field for the sculpture title
- Text field for the sculpture artist
- Slider for the year created (sculpture creation year, e.g. 2020)
- Radio buttons for the sculpture height (tall (over 5m), medium (shorter than 5m, taller than
- 1m) and short (under 1m))
- A combo box for sculpture'sweight (Very Heavy, Heavy, Medium, Light, Very Light, etc.)
- A list view for the following four countries of origin of sculptures:
oItaly
oFrance
oChina
oUnited Kingdom
CheckBoxes for the material(s) that the sculpture might have (e.g. Stone, Metal, Glass, Pottery, Wood Carving, Other, etc.)
Once a user has entered the data for a sculpture, your app needs to do the following:
- Write the data from the UI to a Sculpture object (use the attached class at the end of this assignment)
- Add the Sculpture object to a LinkedList that will store all sculptures entered by the user
- Reset the UI controls so the user can enter a new sculpture
One way to do it would be to have the following (you do not have to do it this way):
- A "NewSculpture" button that resets the UI controls
- An "AddSculpture" button that creates a new instance of thesculpture, sets the Sculptures
- instance variables (via the mutator methods) using the values from the UI controls and then adds the sculpture to the LinkedList
PLEASE NOTE: CANNOT modify the attachedSculpture class
public class Sculpture { // text field private String title; // text field private String artist; // slider private Integer yearCreated; // radio field private String height; // combo box
private String weight;
// list view
private HashSet countryOfOrigin = new HashSet(); // check boxes
private HashSet material = new HashSet();
public Sculpture() { } public String getTitle() { return title;
}
public void setTitle(String title) { this.title = title;
}
public String getArtist() { return artist;
}
public void setArtist(String artist) { this.artist = artist;
}
public Integer getYearCreated() { return yearCreated;
}
public void setYearCreated(Integer yearCreated) { this.yearCreated = yearCreated;
}
public String getHeight() { return height;
}
public void setHeight(String height) { this.height = height;
}
public String getWeight() { return weight;
}
public void setWeight(String weight) { this.weight = weight;
}
public HashSet getCountryOfOrigin() { return countryOfOrigin;
}
public void setCountryOfOrigin (HashSet countryOfOrigin) { this.countryOfOrigin = countryOfOrigin;
}
public HashSet getMaterial () { return material;
}
public void setMaterial (HashSet material) { this.material = material;
} }
Corporate Finance
ISBN: 978-0077861759
10th edition
Authors: Stephen Ross, Randolph Westerfield, Jeffrey Jaffe