Exercise 1: Counting A! (30%)




Document: Software Engineering 1: Lab Exercises

next Exercise 2: More Counting... (30%)
up Session 10: Week 20/21: Letter Frequencies
gif Session 10: Week 20/21: Letter Frequencies

Exercise 1: Counting A! (30%)

Your first task in this session is to write a program which will read a file, and count how many times the character A (or a) occurs. The program should ignore the distinction between upper and lower case, and should ignore all characters other than A (and a). When the file has been completely read, the program should output the total number of A characters found.

Redirection should be used to cause the program to read the appropriate file via stdin.

As usual, you should test your program carefully, and document any problems etc. in your report.




Document: Software Engineering 1: Lab Exercises

next Exercise 2: More Counting... (30%)
up Session 10: Week 20/21: Letter Frequencies
gif Session 10: Week 20/21: Letter Frequencies



McMullin@eeng.dcu.ie
Tue Apr 30 14:15:37 GMT 1996