Chapter 9 Flashcards

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

built-in type

A

compilers know how to represent objects of the type and which operations can be done on it without being told by declarations supplied by a programmer in sourse code

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

class

A

a user-defined type that spcefies how object of its type are represented, how those objects can be created, how they are used, and how they can be destroyed

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

const

A

const value; it’s possible to write static const in classes in order to make one copy og the value in the program rather than one per object

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

constructor

A

a member function with the same name as its class that is used for initialization of objects of the class

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

destructor

A

a member function which destructs or deletes an object

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

enum

A

a keyword for enumeration

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

enumeration

A

a user defined type, specifying its set of values as symbolic constants

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

enumerator

A

a named constant that is a part of enumeration

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

helper function

A

a function (usually supplied by the writer of a class) that does not need direct access to the representation of the class, yet is seen as part of the useful interface to the class

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

implementation

A

a part of a class’s declaration that its users can access only indirectly through the interface - class members (private)

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

in-class initializer

A

an initializer for a class member specified as part of the member declaration

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

inlining

A

a function is inline when it is defined within a class; the compiler will try to generate the to generate code for the function at each point of call rather than using function-call instructions to use common code -> performance advantage for small functions

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

interface

A

part of a class’s declaration that its users access directly (public)

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

invariant

A

a rule for what constitutes a valid value

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

representation

A

a type “knows” how to represent the data needed in an object

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

struct

A

a class where all members are public by default

17
Q

user-defined types

A

not built-in

18
Q

valid state

A

valid value of an object