Numeral_Conversion program

Here is the program I just finished: Numeral_Conversion. For best results, please unzip the inner folder and read the READ_ME file. If you are more interested in what this arbitrary program is and why I wrote it, read on.

A little over a month ago I decided I wanted to brush up on my programming skills. While I had to create programs to do numerical estimates for my math classes all of last year, it was more about the approximation techniques and less about the programming practice. And it was all in MatLab. So I wanted to make some sort of console application in the only other programming language I know, c++.

I still needed a problem to address with my program though; it needed a purpose. One day at work I was cashing a whole bunch of checks (financial aid had come in for the local students). As I was looking at these checks in their differing amounts, I realized that the written amount of the check could not possibly have been typed in by someone. The amount is all figured out electronically and the written amount is similarly computed. As I thought more about that, I realized the process of converting an integer numeral to a written number is not perfectly straight-forward. Aha! I had my project.

Thus this program quite simply takes an integer numeral from the user and converts it to the equivalent English number. At present it will convert numbers up to 126 characters. I figured that was arbitrarily large. Numbers of that size take a paragraph to write out.

So that was the purpose of the application, but my goals for the program were a little greater. I wanted to refresh everything I learned in the core CST courses I took at OIT and see if I could learn something more as well.

In pursuing this education-oriented goal, I was able to solidify the lessons I learned at OIT from file I/O up to and including object-oriented programming basics. Furthermore, I learned how to create and implement my own static library–well, I kind of learned this. I also learned that system commands are actually bad programming practice. No one had ever told me that. So I learned how to implement my own console clear and pause functions through my custom library. Trying to learn as much as possible as I went also meant I was frequently sidetracked as a new idea occurred to me and I researched it.

In this measure, I was successful and justified in spending over a month on what some may consider a trivial program. It is very simple, I admit, but I wanted to do it right. That meant designing each piece before I implemented it and maintaining good documentation and a clear programming style.

So, this is the outcome of that endeavor, what I am unofficially calling this program Numeral_Conversion version 1.2. I am thinking about adding features and making the whole application even more robust. The additional features I am considering include:

– Making the program recursive so that it has no limit to the size of the input integer, it would just start over at the largest named magnitude (i.e. one million billion).

– Allowing the user to specify the directory and name of the file log and also choose whether or not to save.

– Add a GUI (I have never done this, so I think I would utilize this program to practice)

I am quite happy with the outcome of this little project. As you use this, keep in mind that I am an amateur and this application was more about learning than outputting a greatly useful program. With that in mind, constructive criticism is always appreciated.

From here, other than the upgrades, I am looking forward to a couple of new projects. I am learning the new F# language and I am going to begin a simple physics engine with that. At the same time, I am going to begin designing a multiplayer Sabacc game. I may use c++ and implement the online multiplayer with RakNet. But I think I want to learn c# and use XNA to implement the multiplayer (then it can be played over Xbox Live!).

So, this is it. Thanks for reading. Remember to unzip the inner folder to someplace so the program can run properly. Read the short READ_ME file for instructions and clarifications. If you are so inclined, peruse the source code and let me know what you think.

Advertisements

What's your opinion?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s