📄 page_914.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>page_914</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_913.html">< previous page</a></td> <td align="center" width="40%" style="background: #EEF3E2"><strong style="color: #2F4F4F; font-size: 120%;">page_914</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_915.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 914</font></td></tr></table><table border="0" cellspacing="0" cellpadding="0" width="100%"><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 align="center"><font face="Times New Roman, Times, Serif" size="3"><img src="b53a424c282815ec6af0534b950c3924.gif" border="0" alt="0914-01.gif" width="534" height="521" /></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" width="100%"><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 align="center"><font face="Times New Roman, Times, Serif" size="2">Figure聽16-5<br />Class聽Interface聽Diagram聽for聽</font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">ExtTime</font><font face="Times New Roman, Times, Serif" size="2">聽Class</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">subclass can be confusing because the prefix <i>sub-</i> usually implies something smaller than the original (for example, subset of a mathematical set). In contrast, a subclass is often bigger than its superclassthat is, it has more data and/or functions.</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">In Figure 16-5, you see an arrow between the two ovals labeled </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">Increment</font><font face="Times New Roman, Times, Serif" size="3">. Because </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">Time</font><font face="Times New Roman, Times, Serif" size="3"> is a public base class of </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">ExtTime</font><font face="Times New Roman, Times, Serif" size="3">, and because </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">Increment</font><font face="Times New Roman, Times, Serif" size="3"> is not overridden by </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">ExtTime</font><font face="Times New Roman, Times, Serif" size="3">, the </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">Increment</font><font face="Times New Roman, Times, Serif" size="3"> function available to clients of </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">ExtTime</font><font face="Times New Roman, Times, Serif" size="3"> is the same as the one inherited from </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">Time</font><font face="Times New Roman, Times, Serif" size="3">. We use the arrow between the corresponding ovals to indicate this fact. (Notice in the diagram that </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">Time</font><font face="Times New Roman, Times, Serif" size="3">'s constructors are operations on </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">Time</font><font face="Times New Roman, Times, Serif" size="3">, not on </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">ExtTime</font><font face="Times New Roman, Times, Serif" size="3">. The </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">ExtTime</font><font face="Times New Roman, Times, Serif" size="3"> class must have its own constructors.)</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_913.html">< previous page</a></td> <td align="center" width="40%" style="background: #EEF3E2"><strong style="color: #2F4F4F; font-size: 120%;">page_914</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_915.html">next page ></a></td> </tr> </table> </body> </html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -