Using NetBeans Java Class Library not Java Application creat
Using NetBeans Java Class Library (not Java Application), create a Book class for the Library application project which has only an author and isbn. In addition to properties of author and isbn, with setters/getters, the Book should override Object’s base method “boolean equals(Object)” and have a “boolean validate()” method.
Solution
Creating and Editing Java Source Code
Now you need to create a Java package and add the method that you will use to construct the acrostic. After that you need to implement the acrostic method in the Mainclass.
Creating a Java Package and Class File
Editing a Java File
Now you will add some code to Main.java. In doing so, you will see the Source Editor\'s code completion and code template (abbreviation) features.
Leave the cursor immediately after Li. In the next step you will use code completion to turn Li into LibClass.
A short list of possible ways to complete the word appears. However, the class that you want, LibClass might not be there.
LibClass should be in this list.
Note: The IDE also opens a box above the code completion box that displays Javadoc information for the selected class or package. Since there is no Javadoc information for this package, the box displays a \"Cannot find Javadoc\" message.
The final line should look like the following line.
The final line should look like the following line.
Note: sout is one of many code templates that are available in the Source Editor. To find and edit the list of code templates, choose Tools > Options > Editor > Code Template.
Compiling and Running the Application
Now you need to set the main class and execution arguments so that you can run the project.
Note: By default, the projects have been created with the Compile on Save feature enabled, so you do not need to compile your code first in order to run the application in the IDE. For more information, see Compiling a Single Java File in Developing Applications with NetBeans IDE.
Setting the Main Class and Execution Arguments
The output of this program is based on arguments that you provide when you run the program. As arguments, you will provide five words, from which the acrostic \"Hello\" will be generated. The acrostic is assembled from the first letter of the first word, the second letter of the second word, the third letter of the third word, and so on.
To add the arguments for the IDE to use when running the application:
The main class should already be set to acrostic.Main.
Running the Application
Now that you have created the application and provided runtime arguments for the application, you can test run the application in the IDE.
To run the application in the IDE:
In the Output window, you should see the output from the program, Result = Hello (the acrostic of the phrase that was passed to the program as an argument).
Testing and Debugging the Application
Now you will create and run a test for the project using JUnit and then run the application in the IDE\'s debugger to check for errors. In the JUnit test, you will test the LibClass by passing a phrase to the acrostic method and using an assertion to indicate what you think the result should be.
Creating JUnit Tests
Note: If this is the first time you have created JUnit tests in the IDE, you will be prompted with the Select JUnit Version dialog box. Press Enter to select JUnit 4.x and continue to the Create Tests dialog box.
Running JUnit Tests
The JUnit API documentation is available from the IDE. Choose Help > Javadoc References > JUnit API.
Note: If this is the first time you access Javadoc in the IDE, you need to first choose Help > Javadoc References > More Javadoc. Click Cancel in the Javadoc References dialog box. Then choose Help > Javadoc References > JUnit API.
You can learn more about JUnit by visiting http://www.junit.org
Debugging the Application
In this section, you will use the debugger to step through the application and watch the values of variables change as the acrostic is assembled.
To run the application in the debugger:
When the program reaches the end, the debugger windows close.
For more information, see Writing JUnit Tests in NetBeans IDE.
Building, Running, and Distributing the Application
Once you are satisfied that your application works properly, you can prepare the application for deployment outside of the IDE. In this section you will build the application\'s JAR file and then run the JAR file from the command line.
Building the Application
The main build command in the IDE is the Clean and Build command. The Clean and Build command deletes previously compiled classes and other build artifacts and then rebuilds the entire project from scratch.
Notes: There is also a Build command, which does not delete old build artifacts, but this command is disabled by default. See About Building Java Projects in Developing Applications with NetBeans IDE for more information.
To build the application:
Output from the Ant build script appears in the Output window. If the Output window does not appear, you can open it manually by choosing Window > Output > Output.
When you clean and build your project, the following things occur:

