DAT/210 Week 3 Java LAB 4.17: Data File

Availability: In stock

Regular Price: $7.00

Special Price: $5.00

OR

DAT/210 Week 3 Java LAB 4.17: Data File

Double click on above image to view full picture

Zoom Out
Zoom In

More Views

Quick Overview

DAT/210 Week 3 Java LAB 4.17: Data File


A comma separated value (.csv) file has been included to be used for this program. Each line contains two values, a name and a number separated by a comma (except the first line, which contains the titles for the value types). The name is that of a writer and the number refers to the number of works the writer has written. Ex. Jane Austen,6. Each line is an entry and each entry number can be updated by identifying the associated name.


Once complete, the following program opens data file allWorks.csv and asks if the user wants to update entries or add new entries. All entries are stored in an array while being read in and updated. The program then writes the array to the file, overwriting the original contents. The following TODO sections must be completed.
• Open allWorks.csv for reading/input.
• Locate an entry to be updated by name (use the Java String index0f() method)
• Add a new entry if the name isn't found in the file (give the entry a new number)
• Open file allWorks.csv for output
• Write contents of the array to allWorks.csv (original file is overwritten)


Ex If the input is:
y
J.K. Rowling
30
y
Elton John
y
62
n
and allWorks.csv originally contains:
Name,Number of Novels
Jane Austen,6
Charles Dickens,20
Ernest Hemingway,9
Jack Kerouac,22
F. Scott Fitzgerald,8
Mary Shelley,7
Charlotte Bronte,5
Mark Twain,11
Agatha Christie,73
Ian Flemming,14
J.K. Rowling,14
Stephen King,54
Oscar Wilde,l


the output in all Works.csv is:
Name,Number of Novels
Jane Austen,6
Charles Dickens,20
Ernest Hemingway, 9
Jack Kerouac,22
F. Scott Fitzgerald,8
Mary Shelley,7
Charlotte Bronte,5
Mark Twain,11
Agatha Christie,73
Ian Flemming,14
J.K. Rowling,30
Stephen King,54
Oscar Wilde,l
Elton John,62

Regular Price: $7.00

Special Price: $5.00

Details

DAT/210 Week 3 Java LAB 4.17: Data File

A comma separated value (.csv) file has been included to be used for this program. Each line contains two values, a name and a number separated by a comma (except the first line, which contains the titles for the value types). The name is that of a writer and the number refers to the number of works the writer has written. Ex. Jane Austen,6. Each line is an entry and each entry number can be updated by identifying the associated name.

Once complete, the following program opens data file allWorks.csv and asks if the user wants to update entries or add new entries. All entries are stored in an array while being read in and updated. The program then writes the array to the file, overwriting the original contents. The following TODO sections must be completed.
• Open allWorks.csv for reading/input.
• Locate an entry to be updated by name (use the Java String index0f() method)
• Add a new entry if the name isn't found in the file (give the entry a new number)
• Open file allWorks.csv for output
• Write contents of the array to allWorks.csv (original file is overwritten)

Ex If the input is:
y
J.K. Rowling
30
y
Elton John
y
62
n
and allWorks.csv originally contains:
Name,Number of Novels
Jane Austen,6
Charles Dickens,20
Ernest Hemingway,9
Jack Kerouac,22
F. Scott Fitzgerald,8
Mary Shelley,7
Charlotte Bronte,5
Mark Twain,11
Agatha Christie,73
Ian Flemming,14
J.K. Rowling,14
Stephen King,54
Oscar Wilde,l

the output in all Works.csv is:
Name,Number of Novels
Jane Austen,6
Charles Dickens,20
Ernest Hemingway, 9
Jack Kerouac,22
F. Scott Fitzgerald,8
Mary Shelley,7
Charlotte Bronte,5
Mark Twain,11
Agatha Christie,73
Ian Flemming,14
J.K. Rowling,30
Stephen King,54
Oscar Wilde,l
Elton John,62

Product Tags

Use spaces to separate tags. Use single quotes (') for phrases.