Uploaded by maanavshah17

Year 13 Computer Science Task - June 22nd, 2023

advertisement
Year 13 Computer Science – June 22nd, 2023
Activity 1 – Non-Composite data types
Products are classified as category A, B, C and D.
a) Define an enumeration type ProductCode
b) Assign the value C to variable ThisProductCode
Activity 2 – Sets (an example of a Composite data type)
a) Define a set data type ShoeSize. Values are 38, 39, 40, 41, 42, 43, 44
b) Write a selection statement that implements:
If variable ThisSize is 44, then output the message ‘OUT OF STOCK’.
Activity 3 – designing user-defined types for a given problem
Data is to be stored for nurses who work in a hospital.
•
•
•
•
•
•
The Nurse ID code for that hospital - a five-digit code
The family name
First names
The date the nurse first registered with the Nursing and Midwifery Council.
Whether or not the basic Health and Safety course has been completed.
The ward name on which the nurse is based.
Define a user-defined data type for the nurse data.
Download