Starting from:
$35

$29

Computer Science I Solution

General Description:  for this project, you will read data from a file, process it according to the specifications below, and store your results in another file.

Details:
    1. The input file is called proj1data.txt, and is in the folder S:\mackay\CS121
    2. Your output file will be called “Last_First_proj1results.txt”, where Last and First are YOUR last name and first name
    3. There are only 3 lines of data in the input file
    4. Each line of input contains the following information, separated by spaces:
        a. a positive integer, possibly with some extra characters.
        b. another positive integer, possibly with some extra characters.
        c. a single character, either ‘l’, ‘L’, ‘R’ or ‘r’
        d. a character string.
For Example:
    42.2  12k  r  C++ is fun
    5. a. The integer part of the first piece of data is the ASCII value of the fill character you      will use in your output
b. The integer part of the 2nd piece of data is the field width you will use in part of your     output
c. The next character tells you the justification of part of your output
d. The string at the end will be printed using the field width, justification, and fill     character from above.

    6. Your output will look like the following (using the example data from above), for each line of input:

    With a fill character of: *,
        a field width of: 12,
        a justification of: right,
        and the string: C++ is fun
    
        the output is: **C++ is fun

    7. You must have internal documentation:
See the handout on Documentation Standards

    8. You will e-mail me your code and your output file.

More products