Computer Science Notes

Notes From CS Undergrad Courses FSU

This project is maintained by awa03

We could have all these services inherit (is a) from online service, but what if we have 20 different services? Are we going to have a class for each permutation, no we must use a good design pattern: builder design pattern for example.

Builder Design Pattern

Loose Coupling

Type Generalization

List<string> list;
HashSet<int> HashSet;
Stack<float> stack;

// these are all able to be passed into due to type generalization
internal static void PrintAll<T>(IEnumerable<T> input){
	foreach(T element in input)
	{
		Console.WriteLine(element?.ToString());
	}
}