D1 - Objects as a programming concept

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

1/8

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

9 Terms

1
New cards

object

a representation of a real world entity (e.g book or car or student)

2
New cards

class

a template for creating objects. Identifies what data needs to be stored (fields) for objects of this type and what methods are available to allow access to this data

3
New cards

types of relationships between objects

dependency (uses)

aggregation (has a)

inheritance (is a)

4
New cards

coupled

two classes that use/reference eachother

5
New cards

why are dependencies bad?

Dependencies increase overhead maintenance. It is desirable for objects to be self-contained (through encapsulation). If an object depends on another class to provide data and useful methods, we must be sure that it is available whenever using the object. It decreases code reuse, which has a negative impact of development speed

6
New cards

integer

used to represent whole numbers. Stored as a 2s complement signed integer so can take values from -231 to 231-1.

7
New cards

Real (double / float in java)

difference between double and float is amount of memory used to store the number. Float uses 32 bits, and double uses 64 bits

8
New cards

string

used to represent a sequence of characters like a name

9
New cards

boolean

used to represent data that can only take two values, e.g true or false, male/female. It occupies 1 bit of data in memory