Object Oriented Programming

0.0(0)
studied byStudied by 17 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/21

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 2:10 PM on 10/9/24
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

22 Terms

1
New cards

Class

the description/template of what the data looks like (the state) and what the data can do (the behaviour)

2
New cards

Objects

data items, an object is an instance of a class

3
New cards

attributes

gives and object’s properties

4
New cards

methods

describes the actions that the object can perform

5
New cards

instantiation

creating objects within a class

6
New cards

setter

sets the value of a particular attribute

7
New cards

getter

retrieves the value of a particular attribute

8
New cards

encapsulation

attributes cannot be directly accessed/edited by the user by making them private

9
New cards

constructor

allows a new object to be created

10
New cards

super class

parent class

11
New cards

subclass

class within a parent class

12
New cards

inheritance

  • where the subclass possess all of the methods/attributes of the superclass

  • each subclass can have its own attributes along with those in the superclass

13
New cards

overriding

classing a method from an object that shares the same name as a method further up

  • can be ignored is using superclass each super.______

    • the method from the original subclass is used instead

14
New cards

Declarative programming

statements are written that describe the problem to be solved and the language implementation decides the best way of solving it

15
New cards

Functional programming

statements are written as a series of functions which accept input data as arguments and return an output

16
New cards

procedural programming

has a series of instructions that tell the computer what to do with the input in order to solve the problem

17
New cards

structured programming

type of procedural programming which uses modular programming techniques to split large programs into manageable chunks

18
New cards

object oriented programming

abstracts details of implementations away from the programmers to make code reusable and programs easy to maintain

19
New cards

example of object oriented programming

class ToyTank

private colour

private name

public procedure new(givenColour, givenName)

colour = givenColour

name = givenName

end procedure

public procedure getColour()

print(“My colour is”, colour)

end procedure

public procedure setColour(newColour)

colour = newColour

end procedure

end class

20
New cards

Polymorphism

Reusing the same code in another area/object to obtain different results

21
New cards

Parameters

A variables used in a subroutine to refer to data provided within the input of the subroutine

22
New cards

method examples

update [attribute]

change [attribute]

set [attribute]