國立暨南國際大學 101 學年度第二學期小考試卷                   (考試時間: 14:10-14:20)
科目名稱:程式設計 開課系所:資訊工程 學系 任課教師
吳坤熹
系所別:
年級:
學號:
姓名:
考試日期
2013.5.14
  1. (10%) Consider the Sketcher program which you finished as on textbook P.923.  If we modify the CSketcherDoc::OnUpdateColorRed() function and change the contents from

    pCmdUI->SetCheck(m_Color == RED);


    to

    pCmdUI->SetCheck(m_Color == BLACK);


    Then when the first time you click the "Color" menu, how many items will you see as checked.  What are they?


  2. (10%) Consider the Sketcher program which you finished as on textbook P.923.  If we modify the CSketcherDoc::OnUpdateColorRed() function and change the contents from

    pCmdUI->SetCheck(m_Color == RED);


    to

    if (m_Color == BLACK) pCmdUI->SetText("RED");


    Will you still be able to click the menu item and change m_Color to RED?