Question: * WITH COMMENTS PLEASE! * In this assignment, you are asked to complete a Java program that converts a file format to another. It should

* WITH COMMENTS PLEASE!*
In this assignment, you are asked to complete a Java program that converts a file format
to another. It should support the following formats:
. ssv (comma separated values) file: stores tabular data in plain text. Each line of the
file represents a table row containing one or more cells separated by commas. If a
content of a cell has one or more commas (e.g.12,345), then that cell's content needs
to be enclosed in double-quotations (e.g."12,345").
trt (tab separated values) file: stores tabular data in plain text. Each line of the file
represents a table row containing one or more cells separated by tab characters (??t).
The content of each cell does not have any tab character.
1 Program Commands
(35 points) convert
source.xxx destination.yyy: this command converts
source.xxx
to destination.yyy where
source.xxx is the name and extension of the file that user
wants to convert and destination.yyy is the name and extension of the file in which
the user wants to store the result of format conversion. Please note that x and yyy
can either be csv or txt. Also, the file names may or may not include the path to the
file in the file system.
(60 points) normalize
source.xxx: this command reads the content of
source.xxx,
normalizes the content of each cell, and writes the normalized content back to the same
file. Normalizing a cell is an operation that depends on the current content of the cell:
if cell is empty: writes NA instead
if cell contains an integer: normalization explicitly shows the sign (+ for pos-
itive and - for negative). Also, if the integer representation is shorter than 10
characters, it adds some leading zeros to make the representation 10 character
long.
if cell contains a float/double: normalization shows two digit after decimal point.
Also, it uses scientific notation if the number is greater than 100 or less than 0.01.
if cell contains a string longer than 13 characters, normalization shows the first
10 characters of the string followed by an ellipsis (three dots like this ...)
otherwise, normalization causes no change.
(5 points) quit: ends the program.
 * WITH COMMENTS PLEASE!* In this assignment, you are asked to

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!