📄 程序员考试模拟试卷——下午题[7] - 学赛网软考学院.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0052)http://www.educity.cn/rk/prog/200804111009291137.htm -->
<HTML lang=zh-CN xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>程序员考试模拟试卷——下午题[7] - 学赛网软考学院</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content=程序员 name=keywords>
<META
content=学赛网是IT在线教育平台和IT教育在线平台,内容包括软考,计算机等级考试,等考,计算机专业考研,计算机自学考试,计算机考研,计算机自考,同城拜师,职业规划,学习资料下载,IT认证,IT英语,IT教育论坛,IT教育博客.学赛网是希赛公司旗下的专业关注IT教育的网站,由希赛IT教育研发中心负责运维工作.
name=description><LINK href="程序员考试模拟试卷——下午题[7] - 学赛网软考学院.files/Article_cnt.css"
type=text/css rel=stylesheet>
<SCRIPT src="程序员考试模拟试卷——下午题[7] - 学赛网软考学院.files/Article_head_func.js"
type=text/javascript></SCRIPT>
<SCRIPT>
function StorePage(){
var win_open;
if(window.confirm("您确定要加入学赛收藏夹吗?")==1)
{win_open=window.open("http://bbs.educity.cn/bbs/add2Favorite.asp?Title=%B3%CC%D0%F2%D4%B1%BF%BC%CA%D4%C4%A3%C4%E2%CA%D4%BE%ED%A1%AA%A1%AA%CF%C2%CE%E7%CC%E2%5B7%5D&URL=http%3A%2F%2Fwww%2Eeducity%2Ecn%2Frk%2Frk%2Fprog%2F200804111009291137%2Ehtm&Class=3","_blank","top=200,left=200,width=300,height=200,Toolbar=no,scrollbars=no");
if(!win_open) alert('页面已被浏览器拦截,收藏失败。');}
}
</SCRIPT>
<META content="MSHTML 6.00.2900.3395" name=GENERATOR></HEAD>
<BODY><!-- 导航 -->
<SCRIPT src="程序员考试模拟试卷——下午题[7] - 学赛网软考学院.files/Article_head.js"
type=text/javascript></SCRIPT>
<!-- end -->
<DIV class=blank1></DIV>
<DIV class=PageLineH></DIV><!-- 内容开始 -->
<DIV id=gPageCnt>
<DIV id=CntMain>
<DIV class=nowpz>您现在的位置:<A href="http://www.educity.cn/">学赛首页</A> > <A
href="http://www.educity.cn/rk/"><FONT color=#bc2931>软考学院</FONT></A> > <A
href="http://www.educity.cn/rk/category.asp?class=prog">程序员</A> > 正文</DIV>
<DIV class=article>
<DIV class=title>程序员考试模拟试卷——下午题[7]</DIV>
<DIV class=info><FONT color=#bc2931>http://www.educity.cn</FONT> 作者:<A
href="http://www.educity.cn/incSearch/search_author.asp?in=%C8%ED%BF%BC%D1%A7%D4%BA"
target=_blank>软考学院</A> 来源:希赛教育 2008年4月11日 <A
href="http://www.educity.cn/incSearch/search_bbstitle.asp?t=%B3%CC%D0%F2%D4%B1%BF%BC%CA%D4%C4%A3%C4%E2%CA%D4%BE%ED%A1%AA%A1%AA%CF%C2%CE%E7%CC%E2%5B7%5D&c=%C8%ED%BF%BC%D1%A7%D4%BA%7C%7C%B3%CC%D0%F2%D4%B1"
target=_blank>发表评论</A> <A
href="http://www.educity.cn/incSearch/search_board.asp?c=%C8%ED%BF%BC%D1%A7%D4%BA%7C%7C%B3%CC%D0%F2%D4%B1"
target=_blank>进入社区</A> </DIV>
<DIV id=ArticleCnt><!-- Google广告代码 -->
<DIV style="FLOAT: left; MARGIN: 5px">
<SCRIPT type=text/javascript><!--
google_ad_client = "pub-7544158037619893";
/* 250x250, 创建于 08-6-3 */
google_ad_slot = "3368625097";
google_ad_width = 250;
google_ad_height = 250;
//-->
</SCRIPT>
<SCRIPT src="程序员考试模拟试卷——下午题[7] - 学赛网软考学院.files/show_ads.js"
type=text/javascript>
</SCRIPT>
</DIV>
<P></P>
<P> MsgBox "请在文本框中输入由0和1组成的字符串"</P>
<P> Exit Sub</P>
<P> End If</P>
<P> For int1 = 1 To Len(strSource)</P>
<P> ___(1)___</P>
<P> If str1 <> "1" And str1 <> "0" Then</P>
<P> MsgBox "不能输入非0或非1的字符"</P>
<P> Exit Sub</P>
<P> End If</P>
<P> Next</P>
<P> str1 = ___(2)____</P>
<P> num = 1</P>
<P> For int1 = 2 To Len(strSource)</P>
<P> If str1 = Mid(strSource, int1, 1) Then</P>
<P> ___(3)___</P>
<P> Else</P>
<P> If result < num Then</P>
<P> result = num</P>
<P> End If</P>
<P> str1 = Mid(strSource, int1, 1)</P>
<P> ___(4)___</P>
<P> End If</P>
<P> Next</P>
<P> If result < num Then</P>
<P> result = num</P>
<P> End If</P>
<P> ___(5)___</P>
<P> End Sub</P>
<P><STRONG> 试题八</STRONG>(15分,每空3分)(欢迎访问软件考试网www.hbsoft.net)</P>
<P> 阅读以下说明、<A href="http://www.educity.cn/incsearch/search.asp?key=Java"
target=_blank>Java</A>代码将应填入___(n)___处的字句写在答题纸的对应栏内。</P>
<P><STRONG> [说明]</STRONG></P>
<P> IC卡和200卡都是从电话卡派生。下面程序将电话卡定义为抽象类。其中balance为双精度变量,代表电话卡中的余额;cardNumber是长整型,代表电话卡的卡号;password是整型变量,代表电话卡的密码;connectNumber是字符串变量,代表电话卡的接入号码;connected是布尔变量,代表电话是否接通。</P>
<P> performDial()实现各种电话接通后的扣除费用的操作。其中200卡每次通话扣除0.5元的通话费用和附加费用;IC卡每次通话扣除0.9元的通话费。TimeLeft()方法用于测试电话卡余额还可以拨打电话的次数。performConnection()用于电话接入操作,如果卡号和密码正确,则接通,否则,接不通。</P>
<P> 本文摘自<A href="http://www.educity.cn/incsearch/search.asp?key=%CF%A3%C8%FC"
target=_blank>希赛</A>数字图书《<A
href="http://www.educity.cn/incsearch/search.asp?key=%B3%CC%D0%F2%D4%B1"
target=_blank>程序员</A>模拟试题分析与解答》,更多的详细内容请见:http://book.csai.cn/viewbook.asp?id=77</P>
<P><STRONG> [程序]</STRONG></P>
<P> abstract class PhoneCard</P>
<P> {</P>
<P> double balace;</P>
<P> ___(1)___ performDial();</P>
<P> double getBalance()</P>
<P> { return balance; }</P>
<P> double TimeLeft()</P>
<P> {</P>
<P> double current=balance;</P>
<P> int times=0;</P>
<P> do
<P align=right>[<A
href="http://www.educity.cn/rk/prog/200804111009281842.htm">1</A>] [<A
href="http://www.educity.cn/rk/prog/200804111009281120.htm">2</A>] [<A
href="http://www.educity.cn/rk/prog/200804111009281201.htm">3</A>] [<A
href="http://www.educity.cn/rk/prog/200804111009281140.htm">4</A>] [<A
href="http://www.educity.cn/rk/prog/200804111009291173.htm">5</A>] [<A
href="http://www.educity.cn/rk/prog/200804111009291689.htm">6</A>] [7]
[<A href="http://www.educity.cn/rk/prog/200804111009291055.htm">8</A>]
</P></DIV>
<DIV class=page></DIV>
<SCRIPT language=javascript>function T(n){document.getElementById("ArticleCnt").style.fontSize=n+"px";}</SCRIPT>
<DIV class=t1>【<A href="javascript:T(16);">大</A> <A
href="javascript:T(14);">中</A> <A href="javascript:T(12);">小</A>】【<A
href="javascript:StorePage();">收藏到我的学赛</A>】 【<A
href="http://www.educity.cn/incSearch/search_bbstitle.asp?t=%B3%CC%D0%F2%D4%B1%BF%BC%CA%D4%C4%A3%C4%E2%CA%D4%BE%ED%A1%AA%A1%AA%CF%C2%CE%E7%CC%E2%5B7%5D&c=%C8%ED%BF%BC%D1%A7%D4%BA%7C%7C%B3%CC%D0%F2%D4%B1"
target=_blank>发表评论</A>】【<A
href="http://www.educity.cn/incSearch/search_board.asp?c=%C8%ED%BF%BC%D1%A7%D4%BA%7C%7C%B3%CC%D0%F2%D4%B1"
target=_blank>进入社区</A>】 </DIV></DIV>
<DIV class=adv><!-- <div class="ttl">学赛广告推广</div> -->
<DIV class=cnt>
<SCRIPT language=JavaScript
src="程序员考试模拟试卷——下午题[7] - 学赛网软考学院.files/article_ad.js"></SCRIPT>
</DIV></DIV>
<DIV id=AboutLink>
<SCRIPT language=JavaScript
src="程序员考试模拟试卷——下午题[7] - 学赛网软考学院.files/article_api.htm"></SCRIPT>
</DIV></DIV>
<DIV id=CntR>
<SCRIPT language=JavaScript
src="程序员考试模拟试卷——下午题[7] - 学赛网软考学院.files/Article_rightlist.js"></SCRIPT>
</DIV>
<DIV class=clr></DIV></DIV><!-- end -->
<DIV class=PageLineH></DIV>
<DIV class=blank1></DIV>
<DIV id=CSAIBottomFoot align=center>
<SCRIPT src="程序员考试模拟试卷——下午题[7] - 学赛网软考学院.files/Article_foot.js"
type=text/javascript></SCRIPT>
</DIV>
<SCRIPT src="程序员考试模拟试卷——下午题[7] - 学赛网软考学院.files/Article_foot_func.js"
type=text/javascript></SCRIPT>
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -