Fundamentals of Programming (Paradigms) Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What scope is a variable that can be accessed from all parts of a program said to have?

A

Global

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Four types of basic structure used within the structured approach to program design and construction

A
  1. Assignment
  2. Sequence
  3. Selection
  4. Iteration
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What do rectangles represent in hierarchy charts?

A

Procedures

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How is data stored in procedural programs?

A

Constants and variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What name is given to containers for data and instructions in OOP?

A

Objects

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

In OOP, what specifies the properties and methods that objects have?

A

Classes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

In OOP, what name is given to the process of combining methods and procedures in an object?

A

Encapsulation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

In OOP, what is said that occurs when objects are processed differently depending on their class?

A

Polymorphism

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

In OOP, what type of method has the same name as a method in an inherited class but different implementation?

A

An overridden method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

From the two types of association, which one means the child cannot exist outside of the parent?

A

Composition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

In OOP, what is the purpose of inheritance?

A

Inheritance allows one class to share the properties and methods of another class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Between a class and student, which association exists?

A

Aggregation (if the class is destroyed, the student still exists)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

In class diagrams which feature properties and methods, what symbol represents a private property?

A

-

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Two OOP design principles

A
  1. Encapsulate what varies
  2. Favour composition over inheritance
  3. Program to interfaces, not implementation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

In class diagrams, which type of line represents aggregation?

A

A line with a hollow diamond cap

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

In class diagrams, which type of line represents composition?

A

A line with a filled in diamond cap