📄 page_885.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>page_885</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_884.html">< previous page</a></td> <td align="center" width="40%" style="background: #EEF3E2"><strong style="color: #2F4F4F; font-size: 120%;">page_885</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_886.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 885</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="Times New Roman, Times, Serif" size="3">Module Structure Chart:</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"><img src="b6126eb2a6b8aa03f6403a6b84e567a5.gif" border="0" alt="0885-01.gif" width="444" height="148" /></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">Below is the BirthdayCalls program that implements our design. By using the preexisting </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">DateType</font><font face="Times New Roman, Times, Serif" size="3"> class, the program is significantly shorter and easier to understand than if it included all the code to manipulate dates. All we have to do is </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">#include</font><font face="Times New Roman, Times, Serif" size="3"> the header file </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">datetype.h</font><font face="Times New Roman, Times, Serif" size="3"> to make use of </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">DateType</font><font face="Times New Roman, Times, Serif" size="3"> class objects. To run the program, we link its object code file with the </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">DateType</font><font face="Times New Roman, Times, Serif" size="3"> object code file, the place where all the </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">DateType</font><font face="Times New Roman, Times, Serif" size="3"> implementation details are hidden.</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="Courier New, Courier, Mono New, Courier, Mono" size="2">//******************************************************************<br />//聽BirthdayCalls聽program<br />//聽A聽data聽file聽contains聽people's聽names,聽phone聽numbers,聽and聽birth<br />//聽dates.聽聽This聽program聽reads聽a聽date聽from聽standard聽input,聽calculates<br />//聽a聽date聽two聽weeks聽away,聽and聽prints聽the聽names,聽phone聽numbers,聽and<br />//聽birthdays聽of聽all聽those聽in聽the聽file聽whose聽birthdays聽come聽on聽or<br />//聽before聽the聽date聽two聽weeks聽away<br />//******************************************************************<br />#include聽datetype.h<br />#include聽<iostream.h><br />#include聽<fstream.h>聽聽聽聽//聽For聽file聽I/O<br /><br />typedef聽char聽String8[9];聽聽聽聽聽聽聽聽聽//聽Room聽for聽8聽characters聽plus聽\0<br />typedef聽char聽String15[16];聽聽聽聽聽聽聽//聽Room聽for聽15聽characters聽plus聽\0<br /><br />struct聽PhoneType<br />{<br />聽聽聽聽int聽聽聽聽聽areaCode;<br />聽聽聽聽String8聽number;<br />};<br />struct聽EntryType<br />{<br />聽聽聽聽String15聽聽firstName;<br />聽聽聽聽String15聽聽lastName;<br /></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_884.html">< previous page</a></td> <td align="center" width="40%" style="background: #EEF3E2"><strong style="color: #2F4F4F; font-size: 120%;">page_885</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_886.html">next page ></a></td> </tr> </table> </body> </html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -