【正文】
答辯情況4020在規(guī)定時間內(nèi)能就所設計的內(nèi)容進行闡述,言簡意明,重點突出,論點正確,條理清晰。10按設計任務書的要求完成了全部任務,能完整演示其設計內(nèi)容,符合要求。 //設置背景顏色 pDCSetTextColor(RGB(0,0,0))。 m_Flag=1。 UpdateData(false)。 while ((1)==0) { string1=(()1)。 m=matof(m_Show)。 m_Flag=1。 UpdateData(false)。 while ((1)==0) { string1=(()1)。 m_Count+=1。 } else { Operation()。 m_Flag = 1。 m_Flag=1。 } (%f,res)。} else if (()!=1) {MessageBox(n必須為正整數(shù)!, 科學計算器(徐金富))。 }}void CJSQDlg::OnKe4Button() { float res=1。 } if ((1)==.) { string1=(()1)。i++) { res=res*i。} else if (atof(m_Show)30) {MessageBox(超出計算范圍,要求的階層數(shù)過大無法表示,科學計算器(徐金富))。 if ((.)!=1amp。 m_Flag=1。} else { (%f,log10(atof(m_Show)))。 }}void CJSQDlg::OnLogButton() { // TODO: Add your control notification handler code here if(m_Show==39。 } if ((1)==.) { string1=(()1)。||()==0) { MessageBox(輸入的數(shù)據(jù)錯誤,請重新輸入!, 科學計算器(徐金富))。 m_Flag=1。 }}void CJSQDlg::OnKe2Button() { // TODO: Add your control notification handler code here (%f,atof(m_Show)*atof(m_Show))。 } if ((1)==.) { string1=(()1)。 UpdateData(false)。 while ((1)==0) { string1=(()1)。 } m_Show=string1。 } UpdateData(false)。 while ((1)==0) { string1=(()1)。 f1=atof(string1)。}void CJSQDlg::OnEqualButton() //等號,運算結果{ // TODO: Add your control notification handler code here Operation()。 choose=4。 m_Point=0。}void CJSQDlg::OnFu4Button() //除法運算{ // TODO: Add your control notification handler code here UpdateData()。 choose=3。 m_Point=0。}void CJSQDlg::OnFu3Button() //乘法運算{ // TODO: Add your control notification handler code here UpdateData()。 choose=2。 m_Point=0。}void CJSQDlg::OnFu2Button() //減法運算{ // TODO: Add your control notification handler code here UpdateData()。 m_Flag = 1。 m_Point=0。 m_Count+=1。 if (m_Count==0) { string1=m_Show。 m_Count=0。+m_Show。39。 m_Show=(()1)。.39。 } else { if(m_Show==0) { m_Show+=.。 m_Show+=39。 }void CJSQDlg::OnFu7Button() { // TODO: Add your control notification handler code here UpdateData()。 } else { if(m_Show==0) { m_Show=。 if(m_Flag==1) { m_Flag = 0。 } m_Show+=39。 m_Show=。739。 m_Show+=39。 } UpdateData(false)。639。 }void CJSQDlg::OnNum6Button() { // TODO: Add your control notification handler code here UpdateData()。 } else { if(m_Show==0) { m_Show=。 if(m_Flag==1) { m_Flag = 0。 } m_Show+=39。 m_Show=。339。 m_Show+=39。 } UpdateData(false)。239。 }void CJSQDlg::OnNum2Button() { // TODO: Add your control notification handler code here UpdateData()。 } else { if(m_Show==0) { m_Show=。 if(m_Flag==1) { m_Flag = 0。 } m_Show+=39。 m_Show=。 } m_Count=0。 } if ((1)==.) { string1=(()1)。 ff2=atoi(string2)。 case 5: UpdateData()。 } if ((1)==.) { string1=(()1)。 if(f2==0) MessageBox(被除數(shù)不能為零!)。 case 4: UpdateData()。 } if ((1)==.) { string1=(()1)。 f2=atof(string2)。 break。 while ((1)==0) { string1=(()1)。 f1=atof(string1)。 UpdateData(false)。 (%f,f3)。) { string1=(()1)。39。}void CJSQDlg::Operation(){ double f1,f2,f3。 int y = (() cyIcon + 1) / 2。 CRect rect。 if (IsIconic()) { CPaintDC dc(this)。 0xFFF0) == IDM_ABOUTBOX) { CAboutDlg dlgAbout。s main window is not a dialog SetIcon(m_hIcon, TRUE)。 (IDS_ABOUTBOX)。 0xFFF0) == IDM_ABOUTBOX)。 //{{AFX_DATA_MAP(CJSQDlg) DDX_Text(pDX, IDC_M_EDIT, m_M)。 //{{AFX_DATA_MAP(CAboutDlg) //}}AFX_DATA_MAP}BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) //{{AFX_MSG_MAP(CAboutDlg) // No message handlers //}}AFX_MSG_MAPEND_MESSAGE_MAP()/////////////////////////////////////////////////////////////////////////////// CJSQDlg dialogCJSQDlg::CJSQDlg(CWnd* pParent /*=NULL*/) : CDialog(CJSQDlg::IDD, pParent){ //{{AFX_DATA_INIT(CJSQDlg) m_M = _T()。// Dialog Data //{{AFX_DATA(CAboutDlg) enum { IDD = IDD_ABOUTBOX }。通過本次的課程設計讓我學到了并收獲了很多,不僅僅鞏固了先前學的MFC程序設計知識,讓我認識到了自己很多的不足,而且此次課程設計還培養(yǎng)了我的動手實踐能力,讓我的創(chuàng)造性思維得到拓展。當我們有了明確的目的,就可以發(fā)揮自己的頭腦來完成實現(xiàn)它了。同時在實踐過程中提高自己找錯糾錯能力,通常錯誤就那幾種,多練習就熟練了。正所謂“紙上談兵終覺淺,覺知此事要躬行。(3) 使用MFC開發(fā)的應用程序不僅小,而且運行快。基于VC++下的設計,可以看出VC++它的多態(tài)性,繼承性,封裝性的優(yōu)越特點,這讓編譯設計更加的簡單方便,特別是它的繼承性。break。減法type=1)。雙目運算符需要兩個操作數(shù)才能運算,所以在執(zhí)行雙目運算符按鈕的函數(shù)代碼中,要把m_show中的值保存到變量data1中,然后把m_show清零。當docimal=1時,表示有小數(shù)點,否則則表示無小數(shù)點。 }其他按鈕如參照按鈕“1”來連接代碼,詳細代碼見附錄。 } else { if(m_Show==0) { m_Show=。 if(m_Flag==1) { m_Flag = 0。在編輯框上單擊鼠標右鍵,在彈出菜單中選擇“建立類向?qū)А辈藛雾?,彈出MFC ClassWizard對話框,選擇Member Variables選項卡,再將Class ,彈出Add Menber Variable,連接變量為m_show,變量類型設定為cstring 型。//輸入數(shù)據(jù)整數(shù)與小數(shù)部分double value=0。//判斷是否小數(shù)double data2=0。在按鈕上單擊鼠標右鍵,在彈出的快捷菜單中選擇屬性選項,此時也彈出Push Button屬性對話框,如圖34所示,在該對話框中輸入控件的ID值和標題屬性。其中按鈕的創(chuàng)建以“1”為例進行介紹,其他按鈕的創(chuàng)建可參照它進行操作。算出后把結果保存至m_show中。按下數(shù)字按鈕后,判斷m_show的正負號,對其進行相關處理,然后在判斷是否有小數(shù)點,處理后輸出結果。計算器的功能多少決定了計算器的實用價值,本設計中的簡易計算器實現(xiàn)的主要功能有:1)簡單的四則運算:加、減、乘、除 以及取百分數(shù)2)開方、冪運算、倒數(shù)、對數(shù)、階乘、平方3)正弦、余弦、正切這些功能都是很常見的需要計算器功能,它可以幫助人們完成很多需要計算處理的功能。目前所有計算機帶自帶計算器,大大的方便人們的計算,處理事務,本設計中,運用MFC實現(xiàn)計算器的功能。 計算AbstractWith the puter network munication technology, the rapid development of microelectronics technology, as the successor to the 21st century, keep up the pace of the times, which need to adapt to adapt to the rhythm of real life, real life, many times to be calculated by the line deal with some matters, the design calculator can help people avoid plicated calculations, you can also expedite Renmen efficiency, the design of MFC design is the use of simple calculator, including the eyes and t