Exact Calculation - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Exact Calculation

Description:

Creating Class for the new Dialog. class CEditNumberDialog : public CDialog ... FExact Dialog Based Application. Modify FExact Dialog. Exact Number Manipulation ... – PowerPoint PPT presentation

Number of Views:36
Avg rating:3.0/5.0
Slides: 20
Provided by: bijanvosou
Category:
Tags: azar | calculation | ee | exact

less

Transcript and Presenter's Notes

Title: Exact Calculation


1
Exact Calculation
  • Number Class

2
Basic Templat for Number
  • General Templates
  • Collection Class
  • Number Class
  • FNumber Program

3
Quiz 1
  • Develop Insert program for Collection Class
  • template ltclass T,class Sgt
  • void collectionltT,Sgtinsert(S index, T d, S
    no_items1)

4
Main Dialog
5
Creating Number Variables
  • Adding number.h to Solution
  • Creating number variables
  • At class CFNumberDlg public CDialog
  • number A,B,C,D,npt4
  • At CFNumberDlgCFNumberDlg
  • npt0A npt1B npt2C npt3D

6
Creating Class for the new Dialog
class CEditNumberDialog public
CDialog DECLARE_DYNAMIC(CEditNumberDialog) publ
ic CEditNumberDialog(CWnd pParent NULL,
number m) // standard constructor virtual
CEditNumberDialog() // Dialog Data enum IDD
IDD_DIALOG1 number n protected virtual
void DoDataExchange(CDataExchange pDX)
DECLARE_MESSAGE_MAP()
7
Activating Edit Dialog
8
HW4
  • Using number class develop a calculator program
  • Due Date Sunday Azar 3rd 1387

9
Exact Class
  • Derived from Number Class

10
(No Transcript)
11
FExact Dialog Based Application
12
Modify FExact Dialog
13
Exact Number Manipulation
IDC_EDITA
IDC_EDITB
IDC_EDITC
IDC_EDITD
IDC_EDITE
14
Initiate Exact Numbers
  • Adding Pre-Defined Exact Number to Project
  • Including Exact Numbers in Application
  • Defining A,B,C,D,E in Application
  • Initiating With 0,1,2,3,4
  • Copy the Numbers on associated variables
  • Showing the Contents on Dialog

15
Adding Pre-Defined Exact Number to Project
16
Adding to Solution Explorer
  • Only for Viewing Files
  • Header Files
  • Exact.h
  • Number.h
  • Collect.h
  • Template.h

17
Including Exact Numbers in Application and
initialization
  • At FExactDlg.h
  • include "exact.h
  • At class CFExactDlg public CDialog
  • exactltunsigned intgt A,B,C,D,E
  • exactltunsigned intgt exactpt5
  • At FExactDlg.cpp
  • CFExactDlgCFExactDlg(CWnd pParent /NULL/)
  • CDialog(CFExactDlgIDD, pParent),A(0),B(1),C(2
    ),D(3),E(4)
  • m_hIcon AfxGetApp()-gtLoadIcon(IDR_MAINFRAME)
  • exactpt0A exactpt1B exactpt2C
  • exactpt3D exactpt4E

18
Assigning Variables
19
Copy the Numbers on associated variables and
Display numbers
  • BOOL CFExactDlgOnInitDialog()
  • CDialogOnInitDialog()
  • AStringA.PrintHex()
  • BStringB.PrintHex()
  • CstringC.PrintHex()
  • DStringD.PrintHex()
  • EStringE.PrintHex()
  • UpdateData(FALSE)
Write a Comment
User Comments (0)
About PowerShow.com