CS253

CS253: Software Development with C++                

Spring 2017                

HW 2                

CS253 HW2: Reading multiple files                

Description                

Write a C++ program called mf.cc (for multi-file) that behaves as stats.cc from HW1, except that it reads from several files given as arguments, not from standard input.                 

Sample Runs                

Here are several sample runs. “%” is my prompt:                 

    % g++ -Wall mf.cc 
    % cat a
    This is "test data" for HW2.
    Don't <ignore> it!
    % cat b
    Wed Jan  4 14:53:50 MST 2017
    % ./a.out a
    Control: 2
    Letter: 31
    Number: 1
    Punctuation: 5
    Symbol: 2
    Space: 7
    % ./a.out b
    Control: 1
    Letter: 9
    Number: 11
    Punctuation: 2
    Symbol: 0
    Space: 6
    % ./a.out a b
    Control: 3
    Letter: 40
    Number: 12
    Punctuation: 7
    Symbol: 2
    Space: 13

Requirements                

The requirements are the same as those for HW1, plus:                 

Ask                

If you have any questions about the requirements, ask. In the real world, your programming tasks will almost always be vague and incompletely specified. Same here.                 

How to submit your homework:                

Use web checkin, or Linux checkin:                 

    ~cs253/bin/checkin HW2 mf.cc

How to receive negative points:                

Turn in someone else’s work.                 

Modified: 2017-01-30T19:30                 

User: Guest                 

Check: HTML CSS
Edit History Source
Apply to CSU | Contact CSU | Disclaimer | Equal Opportunity
Colorado State University, Fort Collins, CO 80523 USA
© 2015 Colorado State University
CS Building