Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

COP-3337 Programming II Programming Assignment 5 FIU Knight Foundation School of Computing & Info. Sciences In this assignment, you are asked to complete a Java program that converts a file format to...

1 answer below »

COP-3337 Programming II
Programming Assignment 5
FIU Knight Foundation School of Computing & Info. Sciences
In this assignment, you are asked to complete a Java program that converts a file format
to another. It should support the following formats:
ˆ .csv (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”).
ˆ .txt (tab separated values) file: stores tabular data in plain text. Each line of the file
epresents 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 use
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 xxx 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 cu
ent content of the cell:
– if cell is empty: writes N/A 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 characte
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 . . . )
1
– otherwise, normalization causes no change.
ˆ (5 points) quit: ends the program.
2 Submissions
You need to submit a .zip file compressing the following folders:
ˆ the packages containing all the java source files related to the assignment (.java files).
ˆ A readme file clearly explaining what parts have/haven’t been implemented.
2
Answered 1 days After Apr 04, 2022

Solution

Roshan answered on Apr 06 2022
115 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here