Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package sample;
- import javafx.beans.property.SimpleIntegerProperty;
- import javafx.beans.property.SimpleStringProperty;
- import java.util.*;
- public class Book{
- //initializing parameters
- private SimpleStringProperty title, authorFirstName, authorLastName;
- private SimpleIntegerProperty numberOfPages, isbn;
- // Constructor for Book Object
- public Book(String title, String authorFirstName, String authorLastName, int isbn, int numberOfPages){
- this.title = new SimpleStringProperty(title);
- this.authorFirstName =new SimpleStringProperty(authorFirstName);
- this.authorLastName = new SimpleStringProperty(authorLastName);
- this.isbn = new SimpleIntegerProperty(isbn);
- this.numberOfPages = new SimpleIntegerProperty(numberOfPages);
- }
- public static void main(String[] args) {
- }
- public String getTitle() {
- return title.get();
- }
- public SimpleStringProperty titleProperty() {
- return title;
- }
- public void setTitle(String title) {
- this.title.set(title);
- }
- public String getAuthorFirstName() {
- return authorFirstName.get();
- }
- public SimpleStringProperty authorFirstNameProperty() {
- return authorFirstName;
- }
- public void setAuthorFirstName(String authorFirstName) {
- this.authorFirstName.set(authorFirstName);
- }
- public String getAuthorLastName() {
- return authorLastName.get();
- }
- public SimpleStringProperty authorLastNameProperty() {
- return authorLastName;
- }
- public void setAuthorLastName(String authorLastName) {
- this.authorLastName.set(authorLastName);
- }
- public int getNumberOfPages() {
- return numberOfPages.get();
- }
- public SimpleIntegerProperty numberOfPagesProperty() {
- return numberOfPages;
- }
- public void setNumberOfPages(int numberOfPages) {
- this.numberOfPages.set(numberOfPages);
- }
- public int getIsbn() {
- return isbn.get();
- }
- public SimpleIntegerProperty isbnProperty() {
- return isbn;
- }
- public void setIsbn(int isbn) {
- this.isbn.set(isbn);
- }
- public Book(){
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement