Assignment #7

Multiple Function File Streams

Due: 11/26/03 at 1:00 pm

Write a C# console application that reads data from user supplied files and provides the following capabilities:
 

  1. Calculates the arithmetic mean and standard deviation user input numbers (max 100).
  2. Calculates the number of vowels contained in user entered alphanumeric characters (max 100).
  3. Sorts  (forward & reverse) user supplied alphanumeric characters (max 100).  

General Program requirements:
  1. Prompts user for each input file.
  2. C# source for each processing function is stored in a separate file.
  3. Upon function completion users are prompted to repeat process or exit.
  4. Errant input should be enunciated using exceptions.
  5. C# source has prolog and is well commented.
  6. All C# source code are stored in a single zip file for submission.
The program source should be in a file named "Lastname"7.zip. (i.e. Peter7.zip)

The completed assignment should be sent to [email protected] 


Example Execution:

Please enter file name containing data for arithmetic mean and standard deviation:> mean.txt
Please enter file name containing data for vowel identification:> vowels.txt
Please enter file name containing data for character sorting :> sorting.txt





Arithmetic Mean and Standard Deviation 

 

Data file structure:   1 integer per line.

Example Execution

Filename: mean.txt

mean.txt contents:

20
23
25
26

Program results:


The arithmetic mean is: 23.5

The standard deviation is: 2.6457513


 

Number of Vowels

 

Data file structure:   1 character string (max 100)  per line.

Example Execution

Filename: vowels.txt

vowels.txt content:

The 4 brown foxes jumped over the 2 lazy dogs.


Program results:

 
 The number of vowels in string =  11


  

Sorting

 

Data file structure:   1 alpha numeric string (max 100)  per line.

Example Execution

Filename: sorting.txt

sorting.txt content:

43qaswfeAfWyms3p


Program results:

 
Forward:  334AWaeffmpqsswy

Reverse:   ywssqpmffeaWA433