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 eg then that cell's content needs
to be enclosed in doublequotations eg
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
The content of each cell does not have any tab character.
Program Commands
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 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.
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 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
characters, it adds some leading zeros to make the representation character
long.
if cell contains a floatdouble: normalization shows two digit after decimal point.
Also, it uses scientific notation if the number is greater than or less than
if cell contains a string longer than characters, normalization shows the first
characters of the string followed by an ellipsis three dots like this
otherwise, normalization causes no change.
points quit: ends the program.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
