CSC444
– Software Engineering – Assignment 2
Assignment: Write a
program to count the number of lines of C code in a file, excluding blanks and
comments.
Due: October 17, at start
of lab session.
Weight: 5% of final grade.
Requirements:
- The program should receive the
location and name of the file through the command line, such as: your_executable
target_code. If the file is in a different directory, specifying the
correct path on target_code should work just as well.
- If the file cannot be found, a
proper error message should be displayed.
- Count and report all lines of
code in the file. Ignore blank lines (those containing only white space).
Ignore comment lines as well. Remember that comments may start with /* and
end with */ several lines below. Handle these cases as well.
- In your testing phase, include
tests that count the lines of your first and second assignments. Report
your results in a visible position in the test summary.
- You must use the C programming
language to develop this program.
- You are responsible for
resolving any issue not covered by these requirements. Document all your
assumptions and decisions wherever requirements are unclear.
Process:
You should follow the PSP0.1
process as presented in the Discipline for Software Engineering textbook. The
forms needed for the process are pages 5, 6 and 8 of the file: http://www.cs.toronto.edu/~jaranda/csc444/forms.pdf
Deliverables:
Deliver the following documents
and forms, in physical form, in this order:
- PSP0.1 Project Plan Summary
- Time Recording Log
- Defect Recording Log
- Source code printout
- Test summary, indicating how
you ensured that the code is correct. Include test code printouts if you
automated tests (recommended)
- A report, at most one page
long, describing:
- Your impressions on your own
performance and the PSP0.1
- Ideas for improving the PSP
- Any assumptions taken
Marking scheme:
- 60% - adherence to the PSP,
correct and complete use of forms
- 20% - insights and sensible
improvement proposals in report
- 20% - quality of assignment
code, test code (if any) and test summary