0

Hi everyone,

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

Problem:
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

2
Contributors
1
Reply
9
Views
3 Years
Discussion Span
Last Post by Ketsuekiame
0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.