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 秒で採点します。

同じような問題をもっと解きたい?このトピックの新しい問題を、解きながら採点。

練習を始める