Hi everyone,

I need some help, I don't know where and how to begin and I'm seeking for some advice.

I need to design a custom C# library to better manage a client list for internal projects. The library must be capable of importing data in a textfile(clients.txt) into Person objects. Each Person object has to be stored in a binary search tree and needs to be sortable on 2 different algorithms: for example, by surname, name and age or say by surname and name. When a duplicate key is detected, with either algorithm, an exception must be thrown on insert.

What must be delivered is the following components:

-A file import class for clients.txt that can handle changes to the file layout without re-coding the import class.
-A binary search tree capable of sorting on the two algorithms.
-A solution containing a class library.

I'm not looking for an exact solution but I would appreciate some guidance, advice and tips.

Thank you

To create a class library, you just need to create a project of that type in Visual Studio.

A binary search tree is just a fancy name. Essentially it means; look at the value in the middle, is your value higher or lower. If higher, discard everything before now, otherwise, discard everything after now. (I also do first/last checks first)

You can use the streamreader class to read the file in from text. How that works is up to you based on the format of the file.