Question
Asked by:
mityguy23
mityguy23
Rating : No Rating
Questions Asked: 42
Tutorials Posted: 0
 

$10.00 java help homework

Q:
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 Atlantic

Author 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
HarperCollins

Each publisher should be on a separate line and only the publisher name is printed, in alphabetical order, with no duplicates..
 


   
   
   
   
 
Available Tutorials to this Question
Posted by:
 

$10.00 Your publisher program...100% correct and perfectly running...!!!

  • This tutorial was purchased 1 time and hasn't been rated yet.
  • Posted on Jul 29, 2009 at 3:41:23PM
A:
Preview: ... r publisher program... ...

The full tutorial is about 12 words long plus attachments.

Attachments:
Publishers.java (1K) (Preview)
booklist.txt (0K) (Preview)
Posted by:
modulo51
modulo51
Rating (110): A-
Questions Asked: 1
Tutorials Posted: 353, earned $2,117.64
 

$15.00 Java: Scanner input, SortedSet<String>, NetBeans folder, StringTokenizer, UseNotes, consoleOutput

  • This tutorial was purchased 4 times and rated A+ by students like you.
  • Posted on Jul 30, 2009 at 01:39:57PM
A:
Preview: ... System.out.println(<br> "\\\\n\\\\tProgram to get unique prublishers name from a data file.\\\\n");<br><br> java.util.SortedSet<String> ss = new java.util.TreeSet<String>();<br><br><br> try {<br> inStream = new Scanner(new File(inFileName));<br> } catch (Exception e) {<br> System ...

The full tutorial is about 439 words long plus attachments.

Attachments:
Publishers.java (1K) (Preview)
conoleOutput.txt (0K) (Preview)
PublishersUseNotes.txt (2K) (Preview)
PublishersZipped.zip (16K)
   
Join Now or Log In
Get Tutoring
Get Paid
Academic Honesty