In order to receive credit for this assignment, it must be submitted, using the handin command, by 9 AM on Wednesday, Sept 11th.
The purpose of this assignment is to provide an opportunity for you to become familiar with the Visual C++ compiler by Microsoft (VC++ 6.0). Virtually all of the computer game companies use DirectX and VC++. I will be using this compiler, together with DirectX, for my lecture notes and demonstrations during the rest of the semester. Thus, for this assignment you must use VC++ 6.0. However, for the remaining projects assigned during the semester, you're free to use whatever language, compiler or system that you prefer. It might be interesting, at the end of the course, to compare alternative approaches. In actual fact, you can write a computer game using JavaScript, Java or even Visual Basic. However, if you choose an alternative language or platform, you will likely need to do more work and be more self actualizing. Thus, I would like you to talk to me if you're choosing an alternative language, compiler or platform.
Your assignment is to write a calculator that uses command-line input and does not crash. You must use the stack-based, precedence-driven approach that I describe in class. Legal input to the calculator is any positive integer, any of the four operators +, -, *, /, and left and right parentheses. I will demonstrate my working solution during lecture and I will make it available, together with several model student solutions, on Thursday, Sept 12th. You will work alone on this first assignment.
Try to use as many C++ language constructs as possible, including the STL stack from the standard C++ library, C++ strings, exceptions to trap user input errors, classes and overloading. This assignment is challenging enough that, upon successful completion, you will be adept with the VC++ system.
Please zip up the relevant directory and use the handin command to submit all of your code, together with a well-written ascii readme. Your readme should explain you, the assignment, the strengths and weaknesses of your solution, and a clear statement of your algorithm. One of the things I would like you to begin thinking about is your writing style and how to make it clearer and more understandable. Like programming skills, writing skills improve with practice.
The handin command works as follows:
handin.481.1 <asgn #> <files> for example: handin.481.1 1 *