Home
Subjects
Textbook solutions
Create
Study sets, textbooks, questions
Log in
Sign up
Upgrade to remove ads
Only $35.99/year
Object interaction
STUDY
Flashcards
Learn
Write
Spell
Test
PLAY
Match
Gravity
Terms in this set (16)
What is abstraction?
ignoring details of parts to focus attention on a higher level of a problem- ignore information you do not need to know to focus on the relevant parts you do need to know
have abstraction levels
What is modularisation?
process of dividing a while into well-defined parts (built & examined separately & interact in well-defined ways)- break problem into subproblems (e.g. no single person can know everything about a car- 1 person/team focuses on the subproblem of the engine, 1 focuses on the wheels)
How do methods provide abstraction?
gives an abstraction level e.g. can use ticket machine using methods without needing to understand the source code
Can class be a data type?
yes
Hoe are object stored?
object is not stored directly in the field- contains a reference to the object instead (objects store references to other objects)
what does == do?
checks equality, returns boolean answer
What does / do?
division operator (/) returns the result of an integer division when applied to int operands e.g. 17 / 5 == 3
What does % do?
modulo operator (%) returns the remainder of integer division e.g. 17 % 5 == 2
How is / overloaded?
/ is overloaded: if 1 or more operands is a decimal (aka float, aka double) it does decimal division e.g. 17.0/5 = 3.4
what does value = (value + 1) % limit do?
sets value to 0 when limit is reached
What is the difference between double & float?
double can store double the number of bits float can store
What happens when you return a method which returns a class type?
Return of a method is always a single value but class types can return an object with multiple values in it
What is null?
reserved keyword meaning no object, can be assigned to all class types, indicates there is no reference currently stored in the variable, all object variables are initialised to null, can assign & test for null (e.g. in if statement)
What does assigning an object do?
Assigning an object stores a reference to the object instead of copying the object (2 references, 1 object). This means if you make a change to the object, the value stored in the assignment changes too.
Are 2 objects with the same name the same?
Two object with the same name are considered different objects
What does clone do?
copies the actual object
Sets found in the same folder
4 Recursion
21 terms
Building GUIs, Part 1
55 terms
Classes & objects
20 terms
9 Working in Teams
13 terms
Other sets by this creator
10 Sorting Algorithms
21 terms
9 Search Tree Structures
10 terms
8 Maps, Hash Tables & Dictionaries
49 terms
7: Priority Queues & Heaps
44 terms