AP CSA Unit 2 Using Objects Vocab

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

1/102

flashcard set

Earn XP

Description and Tags

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

103 Terms

1
New cards
instance
2
New cards
Object
An object is a variable of a data type that is user defined. Every object has a state and a behavior.
3
New cards
Class
Classes are the template through which objects are created. It is the formal blueprint for creating objects.
4
New cards
Instance
A created object with defined attributes
5
New cards
States
The data that is associated with an object or class.
6
New cards
Behavior
The actions that can be completed by an object or class.
7
New cards
Object Oriented Programming
The use of object and class types in programming.
8
New cards
Instance Variables
used to store the state, or data of the object instances.
9
New cards
Constructor/Signature
Allows for the creation of a new object. Consists of the constructor name and parameter list.
10
New cards
new
Necessary keyword for instantiating a new class object.
11
New cards
Instantiate
Create an instance of a class object
12
New cards
Formal and Actual Parameters
Formal parameters are the parameters outlined in the parameters list in the constructor, while actual parameters are the parameters that are input when a new instance of a class object is created.
13
New cards
Overloading
When a class has more than one constructor with the same name, but different parameter lists.
14
New cards
null
A keyword that indicates a reference object doesn't point to any object data.
15
New cards
Method
Procedures that allow us to control and define the behavior of an object/
16
New cards
Access Specifier
Determines who has access to using the method when writing classes and objects.
17
New cards
Return Type
Indicates what type value is being returned from the method.
18
New cards
Calling a method
objectName.method()
19
New cards
Procedural Abstraction
the ability to use methods and programs that we do not fully understand, or are unable to write.
20
New cards
Method overloading
Methods can have multiple signatures. Java will use the correct signature base don the actual parameters used in a program.
21
New cards
return keyword
Used to return a value back to the main program from a method.
22
New cards
Scope
Defines which part of the program a variable can be accessed from.
23
New cards
Immutable
Unable to be changed or manipulated. String are immutable.
24
New cards
Concatenation
The process of adding two String values together. This creates a new String object. Primitives can be concatenated with String objects.
25
New cards
Implicit Conversion
The automatic process of transforming a variables data type. This occurs when a primitive and String object are concatenated by changing the primitive value to a String object type.
26
New cards
Escape Sequences
Enable users to use special characters and actions within String objects. \ is the start of a escape sequence
27
New cards
String(String str) constructor
Constructs a new String object that represents the same sequence of characters as str.
28
New cards
int length()
Returns the number of characters in a String object
29
New cards
String substring(int from, int to )
Returns the substring beginning at index from and ending at index - 1.
30
New cards
String subString(int from)
Returns substring( from, lenth())
31
New cards
IndexOutOfBoundsException
A Strng object has index values from 0 to length - 1. Attempting to access indices outside this range will result in this error.
32
New cards
int indexOf(String str)
Returns the index of the first occurrence of str; returns -1 if not found.
33
New cards
int compareTo( String other)
Returns a value
34
New cards
Application Programming Interfaces(APIs)
APIs and libraries simplify complex programming task by providing sets of clearly defined methods of communication among various computing components.
35
New cards
Documentation(DOCs)
DOCs is the refernce for how to use different methods and classes.
36
New cards
Integer and Double classes
These Classes are part of the java.lang package and Object classes and have a number of useful methods.
37
New cards
Integers(int value) and Double(double value)
Constructs a new Integer object or a new Double Object that represents the specified int or double value.
38
New cards
Integer.MIN_VALUE and Integer.MAX_VALUE
The minimum/maximum value represented by an int or Integer, which are -2147483648 and 2147483647.
39
New cards
int intValue() and double doubleValue()
Returns the value of this Integer as an int and this Double as a double.
40
New cards
Autoboxing
Automatic conversion between primitive types and their corresponding object wrapper classes.
41
New cards
Unboxing
Reverse of autoboxing; automatic conversion between t wrapper class to the primitive type.
42
New cards
Static Methods
Static methods are the methods in Java that can be called without creating an object of class. Static methods are called using the dot operator along with the class name unless they are defined in the enclosing class
43
New cards
Math Class
The Math class is part of the java.lang package and contains only static methods.
44
New cards
int abs(int x)
Returns the absolute value of an int value
45
New cards
double abs( double x)
Returns the absolute value of a double value
46
New cards
double pow( double base, double exponet)
Returns the value of the first parameter raised to the power of the second parameter
47
New cards
double sqrt( double x)
Returns the positive square root of a double value
48
New cards
double random()
Returns a double value greater than or equal to 0.0 and less than 1.0
49
New cards
Math.random
Can be manipulated to produce a random int or double in a defined range.
50
New cards
Formula for generating any range from 0 - 9:
int rand = (int) (Math.random() * 10);
51
New cards
Formula for generating any range from 0 - integer is:
int rand = (int) (Math.random() * (integer + 1));
52
New cards
Formula for generating any range from (start to start + range) is:
int rand = (int) (Math.random() * (integer + 1) + start);
53
New cards
Object
An object is a variable of a data type that is user defined. Every object has a state and a behavior.
54
New cards
Class
Classes are the template through which objects are created. It is the formal blueprint for creating objects.
55
New cards
Instance
A created object with defined attributes
56
New cards
States
The data that is associated with an object or class.
57
New cards
Behavior
The actions that can be completed by an object or class.
58
New cards
Object Oriented Programming
The use of object and class types in programming.
59
New cards
Instance Variables
used to store the state, or data of the object instances.
60
New cards
Constructor/Signature
Allows for the creation of a new object. Consists of the constructor name and parameter list.
61
New cards
new
Necessary keyword for instantiating a new class object.
62
New cards
Instantiate
Create an instance of a class object
63
New cards
Formal and Actual Parameters
Formal parameters are the parameters outlined in the parameters list in the constructor, while actual parameters are the parameters that are input when a new instance of a class object is created.
64
New cards
Overloading
When a class has more than one constructor with the same name, but different parameter lists.
65
New cards
null
A keyword that indicates a reference object doesn't point to any object data.
66
New cards
Method
Procedures that allow us to control and define the behavior of an object/
67
New cards
Access Specifier
Determines who has access to using the method when writing classes and objects.
68
New cards
Return Type
Indicates what type value is being returned from the method.
69
New cards
Calling a method
objectName.method()
70
New cards
Procedural Abstraction
the ability to use methods and programs that we do not fully understand, or are unable to write.
71
New cards
Method overloading
Methods can have multiple signatures. Java will use the correct signature base don the actual parameters used in a program.
72
New cards
return keyword
Used to return a value back to the main program from a method.
73
New cards
Scope
Defines which part of the program a variable can be accessed from.
74
New cards
Immutable
Unable to be changed or manipulated. String are immutable.
75
New cards
Concatenation
The process of adding two String values together. This creates a new String object. Primitives can be concatenated with String objects.
76
New cards
Implicit Conversion
The automatic process of transforming a variables data type. This occurs when a primitive and String object are concatenated by changing the primitive value to a String object type.
77
New cards
Escape Sequences
Enable users to use special characters and actions within String objects. \ is the start of a escape sequence
78
New cards
String(String str) constructor
Constructs a new String object that represents the same sequence of characters as str.
79
New cards
int length()
Returns the number of characters in a String object
80
New cards
String substring(int from, int to )
Returns the substring beginning at index from and ending at index - 1.
81
New cards
String subString(int from)
Returns substring( from, lenth())
82
New cards
IndexOutOfBoundsException
A Strng object has index values from 0 to length - 1. Attempting to access indices outside this range will result in this error.
83
New cards
int indexOf(String str)
Returns the index of the first occurrence of str; returns -1 if not found.
84
New cards
int compareTo( String other)
Returns a value
85
New cards
Application Programming Interfaces(APIs)
APIs and libraries simplify complex programming task by providing sets of clearly defined methods of communication among various computing components.
86
New cards
Documentation(DOCs)
DOCs is the refernce for how to use different methods and classes.
87
New cards
Integer and Double classes
These Classes are part of the java.lang package and Object classes and have a number of useful methods.
88
New cards
Integers(int value) and Double(double value)
Constructs a new Integer object or a new Double Object that represents the specified int or double value.
89
New cards
Integer.MIN_VALUE and Integer.MAX_VALUE
The minimum/maximum value represented by an int or Integer, which are -2147483648 and 2147483647.
90
New cards
int intValue() and double doubleValue()
Returns the value of this Integer as an int and this Double as a double.
91
New cards
Autoboxing
Automatic conversion between primitive types and their corresponding object wrapper classes.
92
New cards
Unboxing
Reverse of autoboxing; automatic conversion between t wrapper class to the primitive type.
93
New cards
Static Methods
Static methods are the methods in Java that can be called without creating an object of class. Static methods are called using the dot operator along with the class name unless they are defined in the enclosing class
94
New cards
Math Class
The Math class is part of the java.lang package and contains only static methods.
95
New cards
int abs(int x)
Returns the absolute value of an int value
96
New cards
double abs( double x)
Returns the absolute value of a double value
97
New cards
double pow( double base, double exponet)
Returns the value of the first parameter raised to the power of the second parameter
98
New cards
double sqrt( double x)
Returns the positive square root of a double value
99
New cards
double random()
Returns a double value greater than or equal to 0.0 and less than 1.0
100
New cards
Math.random
Can be manipulated to produce a random int or double in a defined range.