In Unified Modelling Language (UML) class diagrams, which symbol is used to represent composition?
AQA A Level · Computer Science 7517
Programming paradigms and object-oriented programming: Practice Questions
5 multiple-choice questions marked as you go, and 5 written questions with worked solutions. All on Programming paradigms and object-oriented programming.
In a procedural-oriented approach to program design, what tool is primarily used to show the relationship between a main module and its sub-modules?
Consider the relationship between a University class and a Department class. If the Department cannot exist without the University, and the destruction of the University results in the destruction of all its Departments, how is this relationship represented in a UML class diagram?
What does a white diamond line represent in a Unified Modelling Language (UML) class diagram?
In the context of Object-Oriented Programming (OOP) design principles, which of the following best describes the concept of "programming to an interface, not an implementation"?
In a Unified Modelling Language (UML) class diagram, how are composition and aggregation visually distinguished?
Write your answer out first, then check it against the worked solution.
Explain the fundamental difference between composition and aggregation when modeling relationships between objects in OOP.
Write your answer out first, then check it against the worked solution.
Explain the design principle "favour composition over inheritance" and why it is often recommended in OOP.
Write your answer out first, then check it against the worked solution.
A software developer is comparing different programming paradigms for a new project.
(a) State the three basic combining principles that are fundamental to all imperative programming languages.
(b) In the context of Object-Oriented Programming (OOP), explain the difference between aggregation and composition with reference to the lifecycle of the objects involved.
(c) In a UML class diagram, identify the specific symbol used to represent a composition relationship.
Write your answer out first, then check it against the worked solution.
Object-oriented programming (OOP) uses several key concepts to manage complexity.
(a) Explain the relationship between a class and an object.
(b) Define encapsulation and explain how it is implemented in a class using access specifiers.
Write your answer out first, then check it against the worked solution.
* The content provided by thinka is generated by AI and may not always be accurate or up-to-date. Please use it as a supplementary resource and verify with official materials.
You've seen the model answer. Now get yours marked.
This page can show you how a good answer looks. It cannot tell you what your answer was missing. thinka marks your written work against the real mark scheme in about 15 seconds.
Want more questions like these? Get a fresh set on this topic, graded as you go.
Practice More