Computer Science 9618/22 — October/November 2023
Cambridge AS Level · Fundamental Problem-solving and Programming Skills · worked solutions for every part, with the mark scheme
Topics Programming · Data Types and Structures · Algorithm Design and Problem-solving · Software Development
Refer to the insert for the list of pseudocode functions and operators.
A shop sells car accessories. A customer order is created if an item cannot be supplied from current stock. A program is being developed to create and manage the customer orders.
The following identifier table shows some of the data that will be stored for each order.
Complete the identifier table by adding meaningful variable names and appropriate data types.
| Example value | Explanation | Variable name | Data type |
|---|---|---|---|
| "Mr Khan" | The name of the customer | ||
| 3 | The number of items in the order | ||
| TRUE | To indicate whether this is a new customer | ||
| 15.75 | The deposit paid by the customer |
Other variables in the program have example values as shown:
| Variable | Example value |
|---|---|
| Total | 124.00 |
| DepRate | 2.00 |
| Description | "AB12345:Cleaning Brush (small)" |
Complete the table by evaluating each expression using the example values.
| Expression | Evaluates to |
|---|---|
| (Total * DepRate) + 1.5 | |
| RIGHT(Description, 7) | |
| (LENGTH(Description) - 8) > 16 | |
| NUM_TO_STR(INT(DepRate * 10)) & '%' |
The data that needs to be stored for each customer order in part (a) is not all of the same type.
Describe an effective way of storing this data for many customer orders while the program is running.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................
The rest of this paper
7 more questions- Q2Algorithm Design and Problem-solving · Programming7M
- Q3Data Types and Structures9M
- Q4Algorithm Design and Problem-solving · Programming · Software Development9M
- Q5Data Types and Structures · Programming6M
- Q6Data Types and Structures · Programming9M
- Q7Software Development · Programming6M
- Q8Programming · Data Types and Structures18M