Presentation is loading. Please wait.

Presentation is loading. Please wait.

Graphical Tree-Based Scientific Calculator: CalcuWiz Will Ryan Christian Braunlich.

Similar presentations


Presentation on theme: "Graphical Tree-Based Scientific Calculator: CalcuWiz Will Ryan Christian Braunlich."— Presentation transcript:

1 Graphical Tree-Based Scientific Calculator: CalcuWiz Will Ryan Christian Braunlich

2 Project Description Our Project is to create a model scientific (similar to what is found on a TI calculator without the graphing feature.) calculator. We used Direct X (Specifically Direct Draw and Direct Input) and Microsoft Visual C++.NET to create the program. The GUI was implemented by printing pixel by pixel the value to be displayed on the screen. The actual functionality of the calculator was implemented using an expressions compiler. It converts the entered expression into postfix then puts it into a tree which can easily be calculated for a result.

3 Description of Problems We needed to be able to read in an expression and convert it into a way in which we could solve it. We needed a way to store variables into different characters. We needed to build an interface between our GUI and the calculator part We needed to make it so that we can display the characters to the screen.

4 Description of Solutions We needed to be able to read in an expression and convert it into a way in which we could solve it. –We had a basic expression compiler which converted from a basic expression to Assembly Language. We took the tree structure that was computed from it and just figured out what the value was instead. To handle complex expressions (ie with sin, etc.), we modified the generation of the tree structure and used unused characters to indicate when they were called. We needed a way to store variables into different characters. –We created a class with 52 variables that is able to get and store the variables inputed by the user. The variables are then used in expressions. This is also how we get around numbers greater than one character by storing into one of these. We needed to build an interface between our GUI and the calculator part –We let the GUI handle all the problems with taking in user input and printing to the screen and let the calculator part worry about all the calculations. The only real interfacing between the two was when the GUI sent information to the calculator part and when the return is hit to send the result to the screen. We needed to make it so that we can display the characters to the screen. –This was done using the Blt() Function in Direct X for each pixel. A switch statement was used to check against the character to be displayed next.

5 Discussion of Results The calculator is capable of performing calculations of various degrees of complexity and involving up to 25 characters. There are a number of different operations that can be performed by the calculator. The input and the result is displayed on the screen to the left of the buttons. This screen can be cleared to start fresh. The mouse is used to create the input. Mouse clicks place whatever button was pressed into memory and also indicate to the screen that the appropriate signal should be displayed.

6 Future Work Seeing as how this is modeled off of a TI calculator the next logical step would be to extend this calculator to allow graphing and root-solving. More user input could be allowed, including letting the user move a cursor in all four directions to edit their commands, rather than forcing them to start over Error checking could be implemented to create within the screen a syntax error so that if the syntax is incorrect, the compile code of the calculator won’t be called and in turn throw an exception.

7 Work Credit Christian Braunlich did the work with the expressions. This included taking a string, moving it from in-fix to post-fix and into the tree, where it was evaluated. This also included evaluating the expression. He also did work to create variables that could be stored. William Ryan created the GUI. This involved creating all the buttons and the display, making it possible for the mouse to work, and linking the mouse and the buttons. He also designed the functionality of the screen. Both people worked to link the buttons with the display and to link the buttons so as to allow the expression to be stored properly.

8 Credits Much of the idea for compiling the expressions came from a compiler homework assignment in Professor Richard Murphy’s CSE 321: Computer Architecture class The CSE 331 project Sir-Graph-A-Lot from 2001 was used as a reference. The DirectX sample library was consulted frequently for help with the GUI. The layout for the calculator was taken from a Texas Instruments Ti-85.


Download ppt "Graphical Tree-Based Scientific Calculator: CalcuWiz Will Ryan Christian Braunlich."

Similar presentations


Ads by Google