• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/42

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

42 Cards in this Set

  • Front
  • Back
Objects are made up of
Properties and Methods
Creating a specific copy of an object is called
an Instance
Related objects interact with each other using
messages
Messages between related objects are passed in response to
events
T/F
JavaScript is an Object Oriented Programming language
True
An object consists of:
properties and methods
The values associated with an object are called
properties
The actions that can be performed on objects are called
methods
in the following code:
var txt="Hello world!";
document.write(txt.toUpperCase());

toUpperCase() is called a
method of the String object
In the following code:
<script type="text/javascript">
var txt="Hello World!";
document.write(txt.length);
</script>

what is length
the length property of the String object
What is an array
an array is a special variable that can hold more than one value, at a time
T/F
An OOP language allows you to define your own objects and make your own variable types.
True
String, Date, and Array are examples of ____ objects
built-in
If a person is an object, what would be some properties
name, height, weight, age, skin tone, eye color, etc.
If a person is an object, what would be some methods
The persons' methods could be eat(), sleep(), work(), play(), etc.
What is the key difference between OO and procedural programming
In OO design, the attributes and behavior are contained within a single object, whereas in procedural, or structured design, the attributes and behavior are normally separated.
T/F When you look at a person, you see the person as an object
True
A person has attributes, such as eye color, age, height, and so on. A person also has behaviors, such as walking, talking, breathing, and so on.
An object is defined by two terms: ____ & ____
attributes & behaviors
Why is testing and debugging more complicated in a procedural language
In procedural programming the data is separated from the procedures, and sometimes the data is global, so it is easy to modify data that is outside your scope. This means that access to data is uncontrolled and unpredictable (that is, several functions may have access to the global data). Second, because you have no control over who has access to the data, testing and debugging are much more difficult. Objects address these problems by combinging data and behavior into a nice, complete package.
T/F
When properly designed, there is no such thing as global data in an OO model.
True.
In OO, integers and strings are represented by
Attributes
In OO, beaviors are represented by
Methods
In OO terminology, data is referred to as ___
attributes
In OO terminology, functions are referred to as ___
methods
Combining the data and the methods into the same entity is called
encapsulation
T/F
It is generall better to build small objects with specific tasks rather than build large objects that perform many
True
The OO counterpart of Cobol's paragraph would be
a method
When an object is created, we say that the objects are
instantiated.
This diagram is called a
Class Diagram.
The top box represents
the NAME of the class, which in this case would be Airplane
The middle box represents
the member variables of the class
The bottom box represents
the methods of the class. Each one has a name, and then any parameters the method takes, and then a return type after the colon.
When one class inherits behavior from another class, and can change that behavior if needed, that's called
inheritance
What does it mean when you say a Jet extends Airplane
That means that Jet inherits all of Airplane's behavior to use for its own.
Jet would be a ___ of Airplane
subclass
Airplane is a ___ of Jet
superclass
Can a subclass add its own variables to the ones that it inherits
yes
___ lets you build classes based on other classes, and avoid duplicating code
Inheritance
What is polymorphism
Polymorphism is closely related to inheritance. When one class inherits from another, then polymorphism allows a subclass to stand in for the superclass.
What's so useful about polymorphism
You can write code that works on the superclass like Airplane, but will also work with any subclass type, like Jet or Rocket. So your code is more flexible. +
What is Encapsulation
Encapsulation is when you protect information in your code from being used incorrectly.
T/F
Encapsulation is all about making all your variables private.
False
It's about separating information from other parts of your application that shouldn't mess with that information.