Exam-style question
Try this first
A school system must represent students and provide operations related to each student. Describe how the system could be organised using the object-oriented paradigm, and contrast this with a possible procedural organisation. Include a reason why the object-oriented organisation fits the requirement.
Model answer
What a good answer should say
- Using the object-oriented paradigm, the system could represent each student as an object.
- The object would contain data about that student and operations related to the student, such as an operation for displaying or updating the student's information.
- This fits the requirement because the data and the operations that work with it are grouped together.
- A procedural organisation could instead store the student data separately and use procedures that receive or access that data to perform tasks such as displaying or updating it.
Explanation
Why this works
A strong answer applies the characteristics of both paradigms to the scenario. It should explain the grouping of student data and related operations in the object-oriented design and contrast this with procedures acting on data in the procedural design.
Common mistake
No common mistake is linked to this question yet.
