CHAP 10 COSC 1010

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/22

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No study sessions yet.

23 Terms

1
New cards

procedural programming

writing programs made of functions that perform specific tasks

2
New cards

object-oriented programming

focused on creating objects

3
New cards

object

entity that contains data and procedures

4
New cards

encapsulation

combining data and code into a single object

5
New cards

data hiding

object’s data attributes are hidden from code outside the object

6
New cards

object reusability

the same object can be used in
different programs

7
New cards

data attributes

define the state of an object (clock object would have second, minute, + hour data attributes)

8
New cards

public methods

allow external code to manipulate the
object (set_time, set_alarm_time)

9
New cards

private methods

used for object’s inner workings

10
New cards

class

code that specifies the data attributes and
methods of a particular type of object (cookie cutter)

11
New cards

instance

an object created from a class (specific cookie)

12
New cards

class definition

set of statements that define a class’s
methods and data attributes (class Class_name:)

13
New cards

self parameter

required in every method in the class –
references the specific object that the method is working
on

14
New cards

new instance

call initializer method (My_instance=Class_Name()), then to call methods use My_instance.method()

15
New cards

initializer method

automatically executed when an
instance of the class is created (def __init__(self):)

16
New cards

hiding attributes

two underscores in front of attribute name (__current_minute)

17
New cards

instance attribute

belongs to a specific instance of a
class

18
New cards

object’s state

the values of the object’s attribute at a
given moment

19
New cards

__ str __ method

displays the object’s state, called when object is passed to the print function, vice versa

20
New cards

accessor methods

return a value from a class’s
attribute without changing it (get function)

21
New cards

mutator methods

store or change the value of a data
attribute (set function)

22
New cards

passing objects as arguments

sending an instance of a class (object) to a method

23
New cards

UML diagram

standard diagrams for graphically
depicting object-oriented systems (box divided into 3 sections)