To continue my adventures in self-study and learning object-oriented programming (with C#), I’ve started a new project with Deborah: a simple calculator! I imagine anyone interested in second-grade mathematics will be giddy with anticipation!
As always, I plan to commit my project to GitHub and make it public for all to see. By doing this, I hope to encourage new friends to participate and provide comments, advice, and ideas. I’ll further reiterate that I am a novice, therefore exposing my code intentionally makes me vulnerable to ridicule and places me out of my comfort zone.
Seems like a good segue into linking to GitHub, so here you go: project number two for all to see! Tread lightly and be gentle!
My first project, a console tic-tac-toe game, was contained in a single main class. This time, the objective is to write the calculator program with an additional class (or classes) beyond a single main class. Perhaps not the most exciting opportunity for object-oriented programming, but it feels like a good way test the water. I also plan to write the program as a console application, again. I’m not yet comfortable with event-driven programming… maybe next project?
In proposing this project, Deborah outlined the objectives for my learning:
- The program uses a “Calculator” class.
- The class includes methods for addition, subtraction, multiplication, and division.
- Methods are tested in a separate unit test.
Not only am I taking a stab at writing a program with multiple classes, but I’m going to write my first unit test(s)!
To reduce complexity and learn from the code, I’ve broken down tasks into chunks of working calculator goodness. I really don’t know what a good design would look like yet, nor do I have any idea how to use a test framework for C# in Visual Studio. No need to worry about that yet, however… I just need to get something working. My current task breakdown starts with creating a simple class and addition method that sums two numbers.
As with last project, I plan to write about my experiences with self-study and discovery of principles that cross over to coaching and/or teamwork. I also encourage you to provide comments and feedback on my code. I enjoyed the prior experience and found it helpful in getting over the sense of intimidation that programming holds over me.