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

Slides:



Advertisements
Similar presentations
Chapter 8 Improving the User Interface
Advertisements

VARIABLES AND DEBUGGING Beginning Programming. Assignment Statements  Used to hold values in a variable  Calculates a result and stores it in a variable.
Programming In C++ Spring Semester 2013 Lecture 8 Programming In C++, Lecture 8 By Umer Rana.
Stacks - 3 Nour El-Kadri CSI Evaluating arithmetic expressions Stack-based algorithms are used for syntactical analysis (parsing). For example.
Chapter 8 and 9 Review: Logical Functions and Control Structures Introduction to MATLAB 7 Engineering 161.
Chapter 9 Calculator. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. 9-2 Chapter Objectives Provide a case study example from problem statement.
Chapter 2: Input, Processing, and Output
8 November Forms and JavaScript. Types of Inputs Radio Buttons (select one of a list) Checkbox (select as many as wanted) Text inputs (user types text)
University of Southern California Enterprise Wide Information Systems Getting Started in R/3 Instructor: Richard W. Vawter.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Programming Logic and Design, Introductory, Fourth Edition1 Understanding Computer Components and Operations (continued) A program must be free of syntax.
Chapter 7 Improving the User Interface
Testing a program Remove syntax and link errors: Look at compiler comments where errors occurred and check program around these lines Run time errors:
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
From C++ to C#. Web programming The course is on web programming using ASP.Net and C# The course is on web programming using ASP.Net and C# ASP.Net is.
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
1 ENG236: ENG236: C++ Programming Environment (2) Rocky K. C. Chang THE HONG KONG POLYTECHNIC UNIVERSITY.
Chapter Seven Advanced Shell Programming. 2 Lesson A Developing a Fully Featured Program.
Introduction 01_intro.ppt
Java Programming, 2E Introductory Concepts and Techniques Chapter 2 Creating a Java Application and Applet.
Week 4-5 Java Programming. Loops What is a loop? Loop is code that repeats itself a certain number of times There are two types of loops: For loop Used.
A First Program Using C#
Visual Basic Chapter 1 Mr. Wangler.
Introduction to Programming Lecture Number:. What is Programming Programming is to instruct the computer on what it has to do in a language that the computer.
Calculator Challenge By: Chris Brown Under the direction of Professor Susan Rodger Duke University, January 2013.
Microsoft Visual Basic 2008: Reloaded Fourth Edition
Tutorial 11 Using and Writing Visual Basic for Applications Code
Programming.
Chapter 1 P. 1 Writing Windows applications with Visual Basic Figure 1.1 The first program works as follows: (These operations can be performed in any.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
Introduction to Visual Basic. Quick Links Windows Application Programming Event-Driven Application Becoming familiar with VB Control Objects Saving and.
Chapter 1: A First Program Using C#. Programming Computer program – A set of instructions that tells a computer what to do – Also called software Software.
XP 1 Microsoft Word 2002 Tutorial 1 – Creating a Document.
Input, Output, and Processing
In the next step you will enter some data records into the table. This can be done easily using the ‘Data Browser’. The data browser can be accessed via.
© 2001 Business & Information Systems 2/e1 Chapter 8 Personal Productivity and Problem Solving.
Visual C++ Programming: Concepts and Projects
Term 2, 2011 Week 1. CONTENTS Problem-solving methodology Programming and scripting languages – Programming languages Programming languages – Scripting.
Chapter 5: More on the Selection Structure Programming with Microsoft Visual Basic 2005, Third Edition.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
1 Creating Windows GUIs with Visual Studio. 2 Creating the Project New Project Visual C++ Projects Windows Forms Application Give the Project a Name and.
Graphical User Interface You will be used to using programs that have a graphical user interface (GUI). So far you have been writing programs that have.
SIMULINK-Tutorial 1 Class ECES-304 Presented by : Shubham Bhat.
Java Programming: From Problem Analysis to Program Design, Second Edition1 Lecture 5 Objectives  Learn about basic GUI components.  Explore how the GUI.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Intermediate 2 Computing Unit 2 - Software Development.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 4: Events Programming with Alice and Java First Edition by John Lewis.
Programming with Microsoft Visual Basic th Edition
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
Creating a Java Application and Applet
 Software Development Life Cycle  Software Development Tools  High Level Programming:  Structures  Algorithms  Iteration  Pseudocode  Order of.
Chapter Topics 2.1 Designing a Program 2.2 Output, Input, and Variables 2.3 Variable Assignment and Calculations 2.4 Variable Declarations and Data Types.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 14 Event-Driven Programming with Graphical User Interfaces.
Brief Version of Starting Out with C++ Chapter 1 Introduction to Computers and Programming.
Stacks A stack is a linear data structure that can be accessed only at one of its ends for storing and retrieving data LIFO (Last In First Out) structure.
Copyright © 2014, 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Eighth Edition by Tony Gaddis,
Microsoft Visual C# 2010 Fourth Edition Chapter 3 Using GUI Objects and the Visual Studio IDE.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
1 Introduction to the Excel ‘IF’ Function. 2 What is the ‘IF’ Function? The calculation is based on a condition that is either TRUE or FALSE. An Excel.
Introduction to Programming and Visual Basic
Chapter 2: Input, Processing, and Output
Programming Fundamental
Testing and Debugging.
Chapter 2 Assignment and Interactive Input
The Selection Structure
Chapter Topics 2.1 Designing a Program 2.2 Output, Input, and Variables 2.3 Variable Assignment and Calculations 2.4 Variable Declarations and Data Types.
Chapter 2: Input, Processing, and Output
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

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

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.

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.

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.

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.

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.

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.

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.