📄 page_944.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>page_944</title> <link rel="stylesheet" href="reset.css" type="text/css" media="all"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> </head> <body> <table summary="top nav" border="0" width="100%"> <tr> <td align="left" width="30%" style="background: #EEF3E2"><a style="color: blue; font-size: 120%; font-weight: bold; text-decoration: none; font-family: verdana;" href="page_943.html">< previous page</a></td> <td align="center" width="40%" style="background: #EEF3E2"><strong style="color: #2F4F4F; font-size: 120%;">page_944</strong></td> <td align="right" width="30%" style="background: #EEF3E2"><a style="color: blue; font-size: 120%; font-weight: bold; text-decoration: none; font-family: verdana;" href="page_945.html">next page ></a></td> </tr> <tr> <td align="left" colspan="3" style="background: #ffffff; padding: 20px;"> <table border="0" width="100%" cellpadding="0"><tr><td align="center"> <table border="0" cellpadding="2" cellspacing="0" width="100%"><tr><td align="left"></td> <td align="right"></td> </tr></table></td></tr><tr><td align="left"><p></p><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td align="right"><font face="Times New Roman, Times, Serif" size="2" color="#FF0000">Page 944</font></td></tr></table><table border="0" cellspacing="0" cellpadding="0"><tr><td rowspan="5"></td> <td colspan="3" height="12"></td> <td rowspan="5"></td></tr><tr><td colspan="3"></td></tr><tr><td></td> <td><font face="Courier New, Courier, Mono New, Courier, Mono" size="2">//******************************************************************<br /><br />long聽TimeCard::IDPart()聽const<br /><br />//聽Postcondition:<br />//聽聽聽聽聽Function聽value聽==聽id<br /><br />{<br />聽聽聽return聽id;<br />}<br /><br />//******************************************************************<br /><br />Time聽TimeCard::TimePart()聽const<br /><br />//聽Postcondition:<br />//聽聽聽聽聽Function聽value聽==聽timeStamp<br /><br />{<br />聽聽聽return聽timeStamp;<br />}<br /><br />//******************************************************************<br /><br />void聽TimeCard::Print()聽const<br /><br />//聽Postcondition:<br />//聽聽聽聽聽Time聽card聽has聽been聽output聽in聽the聽form<br />//聽聽聽聽聽聽聽ID:聽235658聽Time:聽08:14:25<br /><br />{<br />聽聽聽cout聽<<聽ID:聽聽<聽id聽<聽聽Time:聽;<br />聽聽聽timeStamp.Write();<br />}</font></td><td></td></tr><tr><td colspan="3"></td></tr><tr><td colspan="3" height="1"></td></tr></table><table border="0" cellspacing="0" cellpadding="0"><tr><td rowspan="5"></td> <td colspan="3" height="12"></td> <td rowspan="5"></td></tr><tr><td colspan="3"></td></tr><tr><td></td> <td><font face="Times New Roman, Times, Serif" size="3">Testing: These functions are all very easy to test. Because the </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">Time</font><font face="Times New Roman, Times, Serif" size="3"> class has already been tested and debugged, the </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">Punch</font><font face="Times New Roman, Times, Serif" size="3"> function (which calls </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">Time::Set</font><font face="Times New Roman, Times, Serif" size="3">) and the </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">Print</font><font face="Times New Roman, Times, Serif" size="3"> function (which calls </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">Time::Write</font><font face="Times New Roman, Times, Serif" size="3">) should work correctly. Also, none of the </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">TimeCard</font><font face="Times New Roman, Times, Serif" size="3"> member functions use loops or branching, so it is sufficient to write a single test driver that calls each of the member functions, supplying parameter values that satisfy the preconditions.</font></td><td></td></tr><tr><td colspan="3"></td></tr><tr><td colspan="3" height="1"></td></tr></table><table border="0" cellspacing="0" cellpadding="0"><tr><td rowspan="5"></td> <td colspan="3" height="12"></td> <td rowspan="5"></td></tr><tr><td colspan="3"></td></tr><tr><td></td> <td><font face="Times New Roman, Times, Serif" size="3">The Time Card List Object: This object represents a list of time cards. Once again, we'll have to write a new C++ class for this list because no builtin type or existing class will do.</font></td><td></td></tr><tr><td colspan="3"></td></tr><tr><td colspan="3" height="1"></td></tr></table></td></tr></table><p><font size="0"></font></p>聽 </td> </tr> <tr> <td align="left" width="30%" style="background: #EEF3E2"><a style="color: blue; font-size: 120%; font-weight: bold; text-decoration: none; font-family: verdana;" href="page_943.html">< previous page</a></td> <td align="center" width="40%" style="background: #EEF3E2"><strong style="color: #2F4F4F; font-size: 120%;">page_944</strong></td> <td align="right" width="30%" style="background: #EEF3E2"><a style="color: blue; font-size: 120%; font-weight: bold; text-decoration: none; font-family: verdana;" href="page_945.html">next page ></a></td> </tr> </table> </body> </html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -