I realize this question is a bit large and general but I hope to get some ideas to put me on the right track rather than having a full solution. Useful links to articles on the subject of collection classes are also useful. Google on the subject just gives too many generic results.
In the past I have mainly been doing database design and related work. It's time to move on so I recently started to learn C# and found an interesting project that I'm partly using as a learning exercise. It's about analyzing results from surveys in order to identify and price-tag bad management which I think is deserving. ;-) The methodology works well but I realized that all analysis was done manually. I figured that an application could be built to save lots of time and ease the process + add some new features that would be too time consuming to be done manually. We will look into the data-entry and database design later on but right now I get the data from an html formatted Excel sheet.
The data are in columns and the most important ones are:
Assessed, Assessor, Assessor_Role, Variable1, Variable2...
* Assessed = The person who was assesed.
* Assessor = The person who did the assessment. ("Anonymized" but have additional data like age, sex, salary etc.)
* Assessor_Role = The relation to the assessed person. Currently we have only three fixed roles: Boss, Co-worker, myself.
* VariableX = can be some 200 columns with response values. Values are always integers between 1 and 6.
I can read the data in, I can do the analysis, graphing etc but I have not yet figured out a good way to keep the data internally to the program and this is where I need some help. I suppose I need to create some collection classes that can hold the data for me and make it easy to access. I have hardly used collections so far so this subject is quite new to me.
What is the best approach? HashTable, List, what else?
I have pasted a code snippet that shows some ideas on how I want to set/get the information and to use it for graphing and further calculations. This could be entirely wrong but is what I have come up with so far.
// Need to be able to add values...
if (!assessedPerson["John Doe"].Exist)
assessedPerson["John Doe"].addValue("BOSS", "VAR_1234", 3);
// Need to read the grand totals for each variable...
double totalMean = assessedPerson["John Doe"].variable["VAR_1234"].Mean;
double totalStDev = assessedPerson["John Doe"].variable["VAR_1234"].StDev;
double totalCount = assessedPerson["John Doe"].variable["VAR_1234"].Count;
// Need to read "subtotals" for each variable based on the assessor...
double bossMean = assessedPerson["John Doe"].assessor["BOSS"].variable["VAR_1234"].Mean;
double bossStDev = assessedPerson["John Doe"].assessor["BOSS"].variable["VAR_1234"].StDev;
double bossCount = assessedPerson["John Doe"].assessor["BOSS"].variable["VAR_1234"].Count;