1 / 38

Multi-function Scientific Calculator

Multi-function Scientific Calculator. An Introduction to Graphical User Interfaces (GUI). Group Members. Jaemar Miller (Foundation) Kristie Powell (GUI) Michael Adderley (Link to GUI). Objective. To grasps the concepts of Graphical User Interfaces (GUI)

yoshino-gen
Download Presentation

Multi-function Scientific Calculator

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Multi-function Scientific Calculator An Introduction to Graphical User Interfaces (GUI)

  2. Group Members • Jaemar Miller (Foundation) • Kristie Powell (GUI) • Michael Adderley (Link to GUI)

  3. Objective To grasps the concepts of Graphical User Interfaces (GUI) To present those concepts so this presentation can be used in future Software Hardware Integration classes.

  4. Characteristics • Pointers • Classes • Strings • Inheritance

  5. Hierarchy Chart

  6. Foundation Calculator.h has the prototype of the functions needed. Such as the add, subtract, multiply, divide and square functions.

  7. Foundation Calculator.cpp has the definitions of the functions of the scientific calculator. The functions are also constant as they do not change the values sent to them but return a calculated value.

  8. Foundation The Driver.cpp file was not needed for the GUI, but was designed to show an example of a simple calculator if we did not create a GUI for the project. The program uses function to do the arithmetic calculations.

  9. Foundation The function calc here is check the choice of the user, whether to add, subtract, multiply and divide .

  10. Foundation The main function of the driver was query the user of whether, they want to add, subtract, multiply or divide

  11. Foundation In a test we subtracted 3 from 5 and displayed the answer which was 2

  12. GUI

  13. GUIcalc.h • This is the main header file for the application. It includes other project specific headers (including Resource.h) and declares the CCalcApp application class.

  14. GUIcalc.cpp • This is the main application source file that contains the application class CCalcApp.

  15. GUI Stdafx.cpp, Stdafx.h • These files are used to build a precompiled header (PCH) file named Calc.pch and a precompiled types file named StdAfx.obj.

  16. GUI Resource.h • This is the standard header file, which defines new resource IDs. Microsoft Visual C++ reads and updates this file.

  17. GUI Resource Files • Calc.ico • This is an icon file, which is used as the application's icon. This icon is included by the main resource file Calc.rc.

  18. GUI Resource Files • Calc.rc • This is a listing of all of the Microsoft Windows resources that the program uses. It includes the icons, bitmaps, and cursors that are stored in the RES subdirectory. This file can be directly edited in Microsoft Visual C++. Your project resources are in 1033.

  19. GUIResource Files • Calc.rc2 • This file contains resources that are not edited by Microsoft Visual C++. You should place all resources not editable by the resource editor in this file.

  20. GUIResource Files • Calc.manifest • Application manifest files are used by Windows XP to describe an applications dependency on specific versions of Side-by-Side assemblies. The loader uses this information to load the appropriate assembly from the assembly cache or private from the application. The Application manifest maybe included for redistribution as an external .manifest file that is installed in the same folder as the application executable or it may be included in the executable in the form of a resource.

  21. Link to GUI In order to change driver.cpp to a GUI calculator there must be a link.

  22. Link to GUIObjectives • To create implementation files (CalcDlg.cpp and CalcClg.h) that contain the functions and definitions for each button on the calculator.

  23. Link to GUI • This is the header file for calcdlg.h. This header file defines the class CCaldilg

  24. Link to GUICalcdlg.h (cont)

  25. Link to GUI • CalcDlg.cpp is the key code. It contains all of the definitions for the functions mentioned in the header file.

  26. Link to GUIcalcdlg.cpp (cont)

  27. Link to GUIcalcdlg.cpp (cont)

  28. Link to GUIcalcdlg.cpp (cont)

  29. Link to GUIcalcdlg.cpp (cont)

  30. Link to GUIcalcdlg.cpp (cont)

  31. Link to GUIcalcdlg.cpp (cont)

  32. Link to GUIcalcdlg.cpp (cont)

  33. Link to GUIcalcdlg.cpp (cont)

  34. Link to GUIcalcdlg.cpp (cont)

  35. Link to GUIcalcdlg.cpp (cont)

  36. Link to GUIcalcdlg.cpp (cont)

  37. Improvements • Add more functions such as square root etc. • Utilize the math library and add sine and cosine buttons.

  38. References • C++ Program Design 2nd Edition, James P. Cohoon/ Jack Davidson • http://www.cplusplus.com

More Related