Week 4 Flashcards

(6 cards)

1
Q

What is a Conditional Expression?

A

Evaluates to one expression or the other, depending on the value of a boolean expression

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

What is a Case Expression?

A

Evaluates the expression to a given case

case c of

“u” -> (x,y+1)
“d” -> (x,y-1)
“l” -> (x-1,y)

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

What is the generate-and-select design pattern?

A

Can be used to describe good solution to the problem, obtained by filtering values from a generator using a selector

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

What is the Selector?

A

The Selector can be used to filter out those values that might provide solutions to the problem

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

What is Polymorphism?

A

Polymorphism is a key concept in computer science and programming that allows entities to take on multiple forms

It can refer to various programming paradigms, including object-oriented programming (OOP) and functional programming

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

What is the 2 problems of Code Copying?

A

Error prone - errors must be fixed in every copy

Inefficient - space must be allocated for every copy

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