Week 5 Flashcards

1
Q

Using Inline functions?

A

reduce execution time but increase program size.

should be used only with small and frequently used function.

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

Const member function?

A

cannot modifies data member of object

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

Syarat const object?

A
  1. yang panggil harus const-member function
  2. inisialisasi waktu declare
  3. object harus di declare sbg constant
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Static data member?

A

single copy of the data for all objects of class

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

Syarat static member function?

A
  1. static function dapat digunakan tanpa declared object
  2. non-static function dapat mengakses static variable
  3. static function cannot access non-static variable
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

friend function?

A

non-member function yang diberikan akses untuk ke semua data member dari sebuah class

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

benefit friend function?

A
  1. menyediakan akses ke data member yang lebih efisien dibanding function call
  2. mengakomodasi operator function dengan akses yang mudah ke private data member
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

virtual function?

A

member function yang didefinisi ulang untuk kelas turunannya. virtual function tidak dapat sebagai global atau static

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