USE THIS FOR INTRO TO COMPUTING Flashcards

1
Q

What is object-orienting programming?

A

Object-orienting programming allows a program to solve problems by programming objects that interact with each other.Classes are made to create objects which contain methods and attributes

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

Define class in OOP

A

A template used to define an object.It specifies the methods and attributes an object should have.

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

Define Object in OOP

A

An instance of a class

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

Define Method in OOP

A

A subroutine associated with an object

One type is a constructor- defines how an object is created

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

Define Attirtubute in OOP

A

Variables contained within and associated to an object

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

Define Encapsulation in OOP

A

Ensuring private attributes can only be amended through public methods.This prevents objects being, manipulated in unintended ways

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

Define Inheritance in OOP

A

The ability for a class to inherit the methods and attributes of a parent class .its child class can have its own methods and attribute and override methods of its parents class

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

Define Polymorphism in OOP

A

Meaning ‘many forms’ polymorphism is the ability for objects of different classes to be treated in the same way
For example, the same method may be applied to objects of different classes

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