Please use java. Can you also explain how to save it, so I can run it. Should I
ID: 3908865 • Letter: P
Question
Please use java. Can you also explain how to save it, so I can run it. Should I save it in one folder with the particular name?
Here is a question:
A Book has such properties as title, author, and numberOfPages. A Volume will have properties such as volumeName, numberOfBooks, and an array of book objects (Book [ ]). You are required to develop the Book and Volume classes, then write an application (DemoVolume) to test your classes.
The directions below will give assistance.
Create a class called Book with the following properties using appropriate data types:
Title, Author, numberOfPages,
Create a second class called Volume with the following properties using appropriate data types:
volumeName, numberOfBooks and Book [ ].
The Book [ ] contains an array of book objects.
Directions
• Create a class called Book with the following properties using appropriate data types: Title, Author, numberOfPages, o The only methods necessary in the Book class, for this exercise, are the constructor and a toString().
• Create a second class called Volume with the following properties using appropriate data types: volumeName, numberOfBooks and Book [ ]. Book [ ] will contain an array of book objects. o The only methods necessary in the Volume class, for this exercise, are the constructor, toString() and getBookArray(). The getBookArray returns a string of book properties for each book. • Create an application called DemoVolume. o In the main method,
? Create an array of book objects to be added to the volume.
? Create a volume object called volume1.
? Display the properties of volume1.
Explanation / Answer
// Book.java
// Volume.java
// DemoVolume.java