my sweng311 final implemented in c#