云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > 软件工程导论(第六版)张海藩 牟永敏课后习题答案

软件工程导论(第六版)张海藩 牟永敏课后习题答案

  • 62 次阅读
  • 3 次下载
  • 2025/5/3 4:03:39

法特点,找出并改正伪码中的错误。字频统计程序的伪码如下: INITIALIZE the Program READ the first text record

DO WHILE there are more words in the text record

DO WHILE there are more words in the text record EXTRACT the next text word

SEARCH the word-table for the extracted word IF the extracted word is found INCREMENT the word’s occurrence count ELSE

INSERT the extracted word into the table END IF

INCREMENT the words-processed count END DO at the end of the text record READ the next text record

END DO when all text records have heen read PRINT the table and summary information TERMINATE the program

答:INSERT the extracted word into the table在这个后面,有没有给这个word的occurrence/count赋值为1

第二题

2、研究下面给出的伪码程序,要求: (1) 画出它的程序流程图。

(2) 它是结构化的还是非结构化的?说明理由。 (3) 若是非结构化的,则

(a) 把它改造成仅用3种控制结构的结构化程序; (b) 写出这个结构化设计的伪码; (c) 用盒图表示这个结构化程序。 (4) 找出并改正程序逻辑中的错误。

COMMENT:PROGRAM SEARCHES FOR FIRST N REFERENCES

TO A TOPIC IN AN INFORMATION RETRIEVAL SYSTEM WITH T TOTAL ENTRIES

INPUT N

INPUT KEYWORD(S)FOR TOPIC I=O MATCH=0 DO WHILE I≤T I=I+1

IF WORD=KEYWORD THEN MATCH=MATCH+1 STORE IN BUFFER END

IF MATCH=N THEN GOTO OUTPUT END END IF N=0

THEN PRINT ″NO MATCH″

OUTPUT:ELSE CALL SUBROUTINE TO PRINT BUFFER

INFORMATION END

  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

法特点,找出并改正伪码中的错误。字频统计程序的伪码如下: INITIALIZE the Program READ the first text record DO WHILE there are more words in the text record DO WHILE there are more words in the text record EXTRACT the next text word SEARCH the word-table for the extracted word IF the extracted word is found INCREMENT the word’s occurrence

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com