☑Kizspy.me
Course Registration Management System
In this exam, you will develop a Course Registration Management System using
Object-Oriented Programming (OOP) in Python. The system should read course data
from a given file named course_data.txt, process the data, and implement specific
functionalities related to course registration and department analysis.
Question 1: Implement the Course Registration Class (2 Marks)
• Create a Course Registration class with a constructor (__init__ ) to
initialize the following properties:
о Public attributes:
0
"
course_id (string): Unique identifier of the course.
course_name (string): Name of the course.
instructor (string): Name of the course instructor.
department (string): Department offering the course.
Private attribute:
_credit_hours (int): Number of credit hours for the course.
o Implement getter and setter methods for the private attribute
_credit_hours to allow controlled access.
Question 2: Load Course Data from a File (3 Marks)
•
Write a function load_course_data (filename):
о
о
Reads course registration data from a file (e.g., "course_data.txt").
Handle FileNotFoundError if the specified file does not exist.
Parses the file content and creates a list of Course Registration obiects.
Zoom
+ 100%
Close