Cambridge International A Level · Computer Science (9618)

Further Programming:练习题

5 道选择题即时批改,另有 5 道文字题附完整解题步骤,全部围绕「Further Programming」。

10 道题目27 免费,无需注册
第 1 题
1

Which Object-Oriented Programming (OOP) principle refers to the bundling of data (attributes) and methods (functions) that operate on the data into a single unit, and restricting direct access to some of the object's components?

第 2 题
1

A random-access file consists of a fixed-length header of \( 512 \) bytes, followed by sequential records of \( 64 \) bytes each. If the first record is designated as Record 0, what is the starting byte offset for Record \( k \)?

第 3 题
1

In file processing, why is a random-access file generally more efficient than a sequential file for applications requiring frequent updates to specific customer records?

第 4 题
1

A declarative programming language contains the following facts and rules:
prereq(cs101, cs102).
prereq(cs102, cs103).
path(X, Y) :- prereq(X, Y).
path(X, Y) :- prereq(X, Z), path(Z, Y).
Which set of results for \( A \) satisfies the goal ?- path(cs101, A).?

第 5 题
1

In Object-Oriented Programming, what is the primary role of encapsulation regarding the internal state of an object?

第 6 题
4

In a declarative programming language, how does a rule differ from a fact?

先自己写一遍答案,再对照解题步骤。

第 7 题
5

When performing file operations, explain the specific purpose of opening a file in APPEND mode compared to WRITE mode.

先自己写一遍答案,再对照解题步骤。

第 8 题
3

Explain why exception handling is preferred over using standard selection statements (like IF...ELSE) for managing runtime errors in complex applications.

先自己写一遍答案,再对照解题步骤。

第 9 题
4

A programmer is developing a system that logs user activities to a text file. They are choosing between WRITE mode and APPEND mode.

(a) Describe the difference in behavior regarding the file pointer when a file is opened in these two modes.

(b) Explain one potential risk of using WRITE mode in a logging system and how exception handling could be used to make the file-opening process more robust.

先自己写一遍答案,再对照解题步骤。

第 10 题
6

A program is designed to read data from a random-access file. The program must handle two specific potential issues: the file not existing, and the user requesting a record index that is out of bounds.

(a) Write pseudocode using a nested TRY...CATCH structure or multiple CATCH blocks to handle these two errors separately with specific error messages.

(b) Justify the use of exception handling instead of standard IF statements for managing hardware-related errors (like a disk failure) during file processing.

先自己写一遍答案,再对照解题步骤。

* thinka 提供的内容由 AI 生成,未必在任何情况下都完全准确或最新,请结合官方教材与教师指导使用。

你已看过标准答案。现在轮到你的答案被批改。

这一页能告诉你好答案是什么样子,却无法指出你的答案缺了什么。thinka 按真实评分标准批改你的文字答案,约 15 秒完成。

想多做几道同类题目?立即开始练习这个课题,边做边批改。

立即练习