Comp Sci Ch. 2 Flashcards
This flashcard deck was created using Flashcardlet's card creator
What is an attribute?
An objects values that represent its state
What is an object?
Part of a java program that represents a real object
What is a method?
A group of programming statements given a name so we can use them when we need them
What is a class?
The data-type/blueprint of an object. Represents a concept
What is encapsulation?
The means by which an object protects and manages its own info
What is inheritance?
The means by which a class can be created by other classss
What is polymorphism?
The idea by which we we can refer to objects if different but related types in the same way
What do we directly interact with in programs?
Objects
Can there be multiple objects in a class?
Yes
What do methods do?
The functions of the program
This is when one class can be used to derive other classes
Inheritance
What is object and method in system.out.println (“hello world”) ?
System.out is object. Println is method. Hello world is parameter
Where does the info we feed into a method considered?
Parameter
What is abstraction?
Hiding details
How do we know if something is abstract?
We don’t need to think about the inner workings
What is a character string in java?
An object
What can you not do with a literal string?
Break it across two lines
What is contametation?
Splicing together multiple strings
What does a concatenator do?
String together numbers and letters working left to right
What do you use parentheses for in a concatenator?
To add stuff
What is an escape sequence?
A series of character that represent a special character
What is a variable a name for?
A location in memory
How do you declare a variable?
Specify it’s name and the info it will hold
What changes the value of a variable?
An assignment statement