Professional Documents
Culture Documents
Midterm Code 03
Midterm Code 03
Midterm Code 03
Code: 03
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 category is to classify the laptops with countries such as: “China”, “America”
- The last attribute is the price of laptops such as: 800.0, 600.0
The program that has the interface as follows: (5 points)
Please choose:
1. Enter laptop’s information.
2. Print/show information of all laptops
3. Search laptops by code.
0. Exit
When the user chooses:
1. Allow the user to enter N laptops. The N laptops will be store in an array. The
code of the laptop (laptop_code atrribute) should be distinct. (10 points)
2. Display all laptops in the array out. (10 points)
3. Allow to search for a laptop by a given code (laptop_code) from the user. (15
points)
0. The program will quit and release all the resources. (5 points)