Advertisement
thatcrackertho

Book.java

Apr 20th, 2019
397
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.25 KB | None | 0 0
  1. package sample;
  2. import javafx.beans.property.SimpleIntegerProperty;
  3. import javafx.beans.property.SimpleStringProperty;
  4.  
  5. import java.util.*;
  6.  
  7.  
  8. public class Book{
  9.     //initializing parameters
  10.     private SimpleStringProperty title, authorFirstName, authorLastName;
  11.     private SimpleIntegerProperty numberOfPages, isbn;
  12.  
  13.     //  Constructor for Book Object
  14.     public Book(String title, String authorFirstName, String authorLastName, int isbn, int numberOfPages){
  15.         this.title = new SimpleStringProperty(title);
  16.         this.authorFirstName =new SimpleStringProperty(authorFirstName);
  17.         this.authorLastName = new SimpleStringProperty(authorLastName);
  18.         this.isbn = new SimpleIntegerProperty(isbn);
  19.         this.numberOfPages = new SimpleIntegerProperty(numberOfPages);
  20.  
  21.  
  22.  
  23.     }
  24.  
  25.     public static void main(String[] args) {
  26.  
  27.     }
  28.  
  29.  
  30.     public String getTitle() {
  31.         return title.get();
  32.     }
  33.  
  34.     public SimpleStringProperty titleProperty() {
  35.         return title;
  36.     }
  37.  
  38.     public void setTitle(String title) {
  39.         this.title.set(title);
  40.     }
  41.  
  42.     public String getAuthorFirstName() {
  43.         return authorFirstName.get();
  44.     }
  45.  
  46.     public SimpleStringProperty authorFirstNameProperty() {
  47.         return authorFirstName;
  48.     }
  49.  
  50.     public void setAuthorFirstName(String authorFirstName) {
  51.         this.authorFirstName.set(authorFirstName);
  52.     }
  53.  
  54.     public String getAuthorLastName() {
  55.         return authorLastName.get();
  56.     }
  57.  
  58.     public SimpleStringProperty authorLastNameProperty() {
  59.         return authorLastName;
  60.     }
  61.  
  62.     public void setAuthorLastName(String authorLastName) {
  63.         this.authorLastName.set(authorLastName);
  64.     }
  65.  
  66.     public int getNumberOfPages() {
  67.         return numberOfPages.get();
  68.     }
  69.  
  70.     public SimpleIntegerProperty numberOfPagesProperty() {
  71.         return numberOfPages;
  72.     }
  73.  
  74.     public void setNumberOfPages(int numberOfPages) {
  75.         this.numberOfPages.set(numberOfPages);
  76.     }
  77.  
  78.     public int getIsbn() {
  79.         return isbn.get();
  80.     }
  81.  
  82.     public SimpleIntegerProperty isbnProperty() {
  83.         return isbn;
  84.     }
  85.  
  86.     public void setIsbn(int isbn) {
  87.         this.isbn.set(isbn);
  88.     }
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.     public Book(){
  97.  
  98.     }
  99.  
  100. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement