Fundamentals of Programming (Paradigms) Flashcards
What scope is a variable that can be accessed from all parts of a program said to have?
Global
Four types of basic structure used within the structured approach to program design and construction
- Assignment
- Sequence
- Selection
- Iteration
What do rectangles represent in hierarchy charts?
Procedures
How is data stored in procedural programs?
Constants and variables
What name is given to containers for data and instructions in OOP?
Objects
In OOP, what specifies the properties and methods that objects have?
Classes
In OOP, what name is given to the process of combining methods and procedures in an object?
Encapsulation
In OOP, what is said that occurs when objects are processed differently depending on their class?
Polymorphism
In OOP, what type of method has the same name as a method in an inherited class but different implementation?
An overridden method
From the two types of association, which one means the child cannot exist outside of the parent?
Composition
In OOP, what is the purpose of inheritance?
Inheritance allows one class to share the properties and methods of another class
Between a class and student, which association exists?
Aggregation (if the class is destroyed, the student still exists)
In class diagrams which feature properties and methods, what symbol represents a private property?
-
Two OOP design principles
- Encapsulate what varies
- Favour composition over inheritance
- Program to interfaces, not implementation
In class diagrams, which type of line represents aggregation?
A line with a hollow diamond cap