Question: plz, help me with my code I have no idea what is wrong with it. I have 3 different classes in my project, but one
plz, help me with my code I have no idea what is wrong with it.
I have 3 different classes in my project, but one of them not working. I need u to rewrite the book class and book test class so it can work. (the first and second pic explains what should the classes look like) but the rest pictures are my code witch I need ur help with it.


------------------------------------------------------------------------------------------------------------------------ THIS IS MY PERSON CLASS Followed by ( the two classes which I need ur help with ) Book Class and BookTesst class.



The Person Class: Create a class Person: Two private String instance data filed named fName and IName. The Person class must have a constructor that initializes the instance variables. Provide a set and a get method for each data fields. Create a method named toString0 that returns a string description for the Person object. . The Book Class: . . Design a class named Book to represent the book information. The class contains: One private String instance data filed named title, One private Person instance data filed named author (aggregation). One private int instance data filed named publish Year. One private static int data filed named count initialize with zero-to store the total number of Book objects created. two constructor : A constructor with full arguments (title, fName, IName, publish Year) - using this to reference the hidden data filed. A constructor with full arguments (title, Person object, publishYear)- using this to reference the hidden data filed. o In both constructors, you should increase count data field by 1. Provide a set and a get method for first three data fields. Create a method named toString that returns a string description for the book object. Create a static method named getCount() to return total number of Book instances. O O . O The Application Class: . O Write a test program named Book Test At the beginning of code print total number of books ( should print zero) by call static method getCount) Creates 3 Book objects using both constructors: For the first object, use the first constructor to initialize the data fields ("java", "Ali", "Ahmed", 2008). For the second object, read the information from user then use the first constructor to initialize the data fields (). For the third object, use the second constructor to initialize the data fields ("java2", Person ("Mohammed","Ali"), 2018). O 0 . Display the all books information by invoking their toString( method as shown in the Print again total number of books ( should print 3) . Sample Output: run: the total number of books: 0 ########## Enter book title: C++ Enter first and last name of author: Hussam Saeed Enter year: 2010 ##########books information##### java, Ali Ahmed, 2008 C++, Hussam Saeed, 2010 java2, Mohammed Ali, 2018 #################### ### the total number of books: 3 Source History 1A x 2 * To change this license header, choose License Headers in Project Properties. 3 To Change this terrplate file, choose Tools Terrplates 4 * and open the template in the editor. 5 - F 7 A @author reenan sabir Assignments-2006683 FileExample Java 1 Java 2 LAB_2 LAB 4 Lab-5 a source Packages
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
