Professional Documents
Culture Documents
Midterm Code 04
Midterm Code 04
Code: 04
Course Code: INS 2020 – Semester II 2023/2024 Lecturer’s Signature
Course Title: Programming 1
Time allowed: 60 mins. Closed-book exam.
Full name: Marks
Student ID:
Code number: . Class:
1
The program that has the interface as follows: (10 points)
Please choose:
1. Enter Magazine’s information.
2. Print/show information of all Magazines
3. Search products by ID
0. Exit
When the user chooses:
1. Allow the user to enter N Magazines. The N Magazines will be store in an array. The ID
of the Magazine (Magazine_id atrribute) should be distinct. (10 points)
2. Display all Magazines in the array out. (10 points)
3. Allow to search for a Magazine by a given ID (Magazine _id) from the user. (15 points)
0. The program will quit and release all the resources. (5 points)
Note: The program is written in functions