Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

JavaFX DataSetBookGUI Can you please help me the JAVA program below? The program

ID: 3794507 • Letter: J

Question

JavaFX DataSetBookGUI

Can you please help me the JAVA program below?

The programs I provide below only have Add Book function. Can you please Add Video function as the requirement.

--------------Book.java----------------

-------------------DataSetBook.java------------------

--------------------Video.java--------------------


public class Video {

   private String director;
   private String title;
   private String actor;
   private String actress;
   private int minutes;

   public Video(String title, String director, String actor, String actress, int min) {
       this.director = director;
       this.title = title;
       this.actor = actor;
       this.actress = actress;
       this.minutes = min;
   }

   public String getDirector() {
       return director;
   }

   public String getTitle() {
       return title;
   }

   public int getMinutes() {
       return minutes;
   }

   public String getActor() {
       return actor;
   }

   public String getActress() {
       return actress;
   }

   @Override
   public String toString() {
       return "Video [director=" + director + ", title=" + title + ", actor=" + actor + ", actress=" + actress
               + ", minutes=" + minutes + "]";
   }

   @Override
   public boolean equals(Object obj) {
       if (this == obj)
           return true;
       if (obj == null)
           return false;
       if (getClass() != obj.getClass())
           return false;
       Video other = (Video) obj;
       if (actor == null) {
           if (other.actor != null)
               return false;
       } else if (!actor.equals(other.actor))
           return false;
       if (actress == null) {
           if (other.actress != null)
               return false;
       } else if (!actress.equals(other.actress))
           return false;
       if (director == null) {
           if (other.director != null)
               return false;
       } else if (!director.equals(other.director))
           return false;
       if (minutes != other.minutes)
           return false;
       if (title == null) {
           if (other.title != null)
               return false;
       } else if (!title.equals(other.title))
           return false;
       return true;
   }

}

---------------DataSetBookGUI.java ( this version hasn't had add video function yet ) --------------

Use JavaFX for this program expands on the DataSetBookGUl.java. We are expanding the items our DataSet can accommodate to include videos as well as books. This program allows the user to enter not only Books, but Videos as well. A Video has a title, director, leading actor, leading actress, and a length in minutes. It also displays the contents of the DataSet Start with your Book class and the Video class. There are several ways that DataSet, Book and Video can be enhanced so that a DataSet can accommodate both Book and Video objects. You may also tweak the toString methods on Book or Video (or your DataSet) as necessary. The DataSet must limit the types of objects it accepts. A DataSet must not accept just anything:; it should not accept String or Integer or Random objects, for example. The program must have two buttons: one to add a Book to the Dataset, the other to add a Video. The event handler to add a Book must be implemented using a lambda expression. The event handler to add a Video must be implemented using an anonymous class. This is the screen after a video (Touch of Evil), a book (A Wrinkle in Time) and another video (The Adventures of Buckaroo Bonzai Across the 8th Dimension) are added to the DataSetLibrary. Author Book Title Pages Make New Book ideo Title Director Minutes Make New Video Actor Actress DataSetLibrary [Video [director-Welles, title=Touch of Evil, actor= Heston, actres Book [author. L'Engle, title=A Wrinkle in Time, pages=256] Video [director=Richter, title=The Adventures of Buckaroo Bonzai Across the 8th C

Explanation / Answer

public class Video {

   private String director;
   private String title;
   private String actor;
   private String actress;
   private int minutes;

   public Video(String title, String director, String actor, String actress, int min) {
       this.director = director;
       this.title = title;
       this.actor = actor;
       this.actress = actress;
       this.minutes = min;
   }

   public String getDirector() {
       return director;
   }

   public String getTitle() {
       return title;
   }

   public int getMinutes() {
       return minutes;
   }

   public String getActor() {
       return actor;
   }

   public String getActress() {
       return actress;
   }

   @Override
   public String toString() {
       return "Video [director=" + director + ", title=" + title + ", actor=" + actor + ", actress=" + actress
               + ", minutes=" + minutes + "]";
   }

   @Override
   public boolean equals(Object obj) {
       if (this == obj)
           return true;
       if (obj == null)
           return false;
       if (getClass() != obj.getClass())
           return false;
       Video other = (Video) obj;
       if (actor == null) {
           if (other.actor != null)
               return false;
       } else if (!actor.equals(other.actor))
           return false;
       if (actress == null) {
           if (other.actress != null)
               return false;
       } else if (!actress.equals(other.actress))
           return false;
       if (director == null) {
           if (other.director != null)
               return false;
       } else if (!director.equals(other.director))
           return false;
       if (minutes != other.minutes)
           return false;
       if (title == null) {
           if (other.title != null)
               return false;
       } else if (!title.equals(other.title))
           return false;
       return true;
   }

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote