$15.00 Book info with more than a main
- From Computer-Science: Object-Oriented-Programming
- Closed, but you can still post tutorials
- Due on Oct. 28, 2009
- Asked on Oct 26, 2009 at 6:22:04PM
Q:I have my code and txt filr already but I need to figure out to make more than a main to ensure good Object oriented programing practices.
You have been tasked to develop an application that will read book information from a text file to determine which publishers you use. The application will print a report of all unique publishers used.
The input text file contains records with author first name, author last name, book ISBN-10 number, and publisher in this format:
Johnny Smith 0123456789 HarperCollins
Freddie Jones 0123456777 HarperCollins
Lilly Laine 0122222234 Penguin
Bobby Crosby 0111102345 Atlantic
Troy James 0119233334 AtlanticAuthor first name should be the first field, author last name should be the second field, isbn should be the third field, and a one word publisher name should be the fourth field. White spaces (no commas) should be used as the delimiter between each field and each publisher record should be on a separate line. Your file may be used as input to a future application which is why the format is important.
This file could contain many books published by the same publisher. You need to read all records from the file and store only the publisher name into a data structure without duplicates. The publishers need to be sorted alphabetically.
When your application runs, it should read the input book information file and print to the screen all publisher names in alphabetical order by iterating through the data structure you used. No duplicate publisher names should be printed.
Refer to Collections in the Sun Java API Documentation. Determine which Collection implementation would be the best choice for your application. Your grade will be based on your use of the Collection class selected and your ability to select the most appropriate Collection to use based on the stated requirements.
Write an application that will satisfy the assignment requirements and test that it works.The output to the screen should be in the following format:
Atlantic
Penguin
HarperCollinsEach publisher should be on a separate line and only the publisher name is printed, in alphabetical order, with no duplicates..
Attachments:Publishers.zip (10K)



