MP 8

calQlator


The Assignment

In this assignment you will create an integer calculator that will allow the user to integer perform arithmetic on either decimal or octal integers.

Use the the MFC AppWizard and create a dialog based application. You must create dialog box items using the Create method approach (ie, no dragging and dropping). You will add a number of components as described below

Components You Will Need

  1. Three text boxes to display the operands and results of the arithmetic.
  2. Ten command buttons under each operand text box (20 in total) to add digits to the text boxes.
  3. Four command buttons with the arithmetic operators on them. When any of these buttons are clicked, the result is calculated and displayed in the result box.
  4. Two check boxes to indicate whether we are using decimal or octal arithmetic. Obviously you can't enter an 8 or 9 if you're using octal arithmetic.

Hints and Questions

Maximum allowable arithmetic values should be in conformance with a long integer.

Decimal arithmetic is the default when the application starts.

What happens to the values displayed in the text boxes when the user switches from decimal to octal or visa-versa?

Extra Credit

  1. Add a button that allows the user to change the sign of an opperand.
  2. Allow the user to add and modify values in the operand boxes using the keyboard.

What to turn in

Zip up all of the project files and the code and put it onto a diskette. If you have trouble fitting all of the files in a file compatable with a diskette, try deleting the files in the debug directory directory.

A 3.5" diskette labeled with your name, course # and containing the file mp08.zip.