國立暨南國際大學 98 學年度第二學期小考試卷
科目名稱:資訊系統
與網路導論 |
開課系所:資訊工程
學系 |
任課教師
|
吳坤熹
|
系所別:
|
年級:
|
學號:
|
姓名:
|
考試日期
|
2010.5.12
|
(考試時間: 14:10-14:25)
Open book; turn off computers & mobile phones
- (10%) Consider the OnUpdateColorRed() function in P.826,
if we modify its definition as follows, how will the program behave
differently?
void CSketcherDoc::OnUpdateColorRed(CCmdUI *pCmdUI)
{
if (m_Color==BLACK)
pCmdUI->Enable(0);
else
pCmdUI->Enable();
}
-
(10%) Please refer to P.816. In the example of Chapter 14, we created
the message handler OnColorBlack() to be a member function of the class
CSketchDoc. Can the program still work if we created it as a member
function of the class CSketchView? Why or why not?
(Certainly, we assume the data members m_Element and m_Color are also created in the class CSketcherView.)