If this for an homework, I would say to think about it and figure it out yourself.
If it's not for an homework, I would say not to reinvent the wheel. Look for free code programmed by others. You'll save time and it's likely that this other person put much more time and effort than you would have put into it yourself.
My favorite place to look for such code is
The Code Project - Free Source Code and Tutorials. I suggest to do a search on some keywords like "business days". Sometimes, you'll find libraries that can be compiled and used as a dll in your code and other times you'll find classes that can be included and used in your code and other times only some test code. The code won't necessary be in the language you want. It can be C++, C# and it can use .NET or not. You will alsmost always find something that could help you. Respect the copyrights of the code you use. Here's a quote from the website about it :
Quote:
|
Originally Posted by www.codeproject.com/info/faq.asp
- Can I use code snippets and programs in my own work? You can use code snippets and source code downloads in your applications as long as
- You keep all copyright notices in the code intact.
- You do not sell or republish the code or it's associated article without the author's written agreement
- You agree the code is provided as-is without any implied or express warranty.
Some authors may also have specific restrictions on using code in commercial apps such as providing credit in documentation or sending them an email first.
|