Object-Oriented Programming Flashcards

1
Q

content

A
  • classes and interfaces
  • objects with attributes and methods
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

object

A

functional unit

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

Advantages of OO Programming

A
  • improved software-development productivity
  • improved software maintainability
  • faster development
  • lower cost of development
  • higher-quality software
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Disadvantages of OO Programming

A
  • steep learning curve
  • larger program size
  • slower programs
  • not suitable for all kinds of programs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

instantiate an object

A

e.g.

Bicycle bike1 = new Bicycle();

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

class definition

A
  • data fields (attributes)
  • constructor
  • methods
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Inheritance

A
  • reuse of existing classes when creating a new class
  • derived class will inherit public operations defined in the base class
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

child class

A
  • inherit public operations of parent class
  • may override certain attributes or methods
  • only specefies what is different to parent class
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Access Control Attribute Keywords

A

private -> protected -> no modifier -> public

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

Encapsulation

A
  • put data and operations on this data private
  • user does not need to know the implementation details
  • ability to access and modify the data through public operations -> setters and getters
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Polymorphism

A
  • different objects respond to the same message in different ways
  • 1 method with different implementations
  • often in subclasses
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Interface

A
  • combination of all public methods and properties of an object
  • set of specifications you can always count on - a “contract”
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Definining and Implementing Interfaces

A
  • can’t be instantiated
  • no constructors
  • all methods are abstract
  • cannot contain instance fields
  • contains only both static and final declared fields
  • not extended by a class, but implemented by a class.
  • can extend multiple interfaces
How well did you know this?
1
Not at all
2
3
4
5
Perfectly