Question
Asked by:
$12.00 java help
- From Computer-Science: Object-Oriented-Programming , Computer-Science: Programming-Methods
- Closed, but you can still post tutorials
- Due on Aug. 07, 2009
- Asked on Aug 04, 2009 at 2:02:52PM
Q:Create a Book class that stores book information. Your book class will store book title, authors first name, authors last name, book ISBN-10 number, and publisher, and price. Ensure you have created appropriate constructor(s) that will allow your test application to construct objects of type Book.
You can decide how to obtain the information used for each Book object you create. Each books information can be entered through the keyboard, read in from a file, or constructed by using hard coded values in your test application.
Create a test application that creates several objects of type Book class and adds each Book object to an ArrayList. Do not store your book information as a String and add this String into your ArrayList. You should store Book objects that encapsulate your book information and store these in your ArrayList:
//Creates arrayList to store book objects
ArrayList<Book> bookList = new ArrayList<Book>();
Your test application should then do the following:
Iterate through all Books in the ArrayList and print the information out in readable form.
Print the total number of books stored.
Prompt you for an index and print the book information stored in the index.
Hint: You may want to look into overriding toString() method to provide a readable string representation of Book object.
please wwrite this code in oop format, so a main class and a test class
thanks



