Intro to OOP Flashcards

1
Q

Class that doesn’t require instantiation

A

Static Class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Showing only the necessary features of an object and hiding what’s complex

A

Abstraction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Also known as “structured programming”

A

Procedure-Oriented Programming (POP)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Ability of different objects to respond (in different ways) to the same functions.

A

Polymorphism

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

They store data that can be manipulated by methods

A

Attributes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Where one class can inherit properties of another class.

A

Inheritance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

(T or F) “args” in the main method cannot be renamed

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

No modifier; the member can only be accessed within its own package, and a subclass

A

protected

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Class that should be instantiated

A

Non-static Class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Other terms for “Sub Class”

A

Derived Class, Descendant Class, Child Class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

(Procedural or OOP) functions can be reused; more effort to manage data.

A

Procedural

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Allows groups of classes to be available only when needed.

A

Packages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

This has attributes and behaviors

A

Object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Eliminates potential conflicts of similarly-named classes.

A

Packages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

An object used for sending output to the screen

A

System.out

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Any variable declared in a class, but outside a method, constructor, or block

A

Instance variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

This modifier specifies that the member can only be accessed in its own package

A

package-private

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What are the access modifiers in Java?

A

public, protected, package-private, private

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Allows devs to create GUI

A

Swing Programming

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Helps with understanding part of a system (code) without having to understand the entire thing.

A

Modularity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

(Procedural or OOP) understanding of the program becomes complex as it grows.

A

Procedural

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Everything enclosed between braces; contains the method’s code

A

Method body

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is the syntax used to read user input using the BufferedReader class?

A

BufferedReader objectName = new BufferedReader(new InputStreamReader(System.in));

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

(T or F) when printing, you must import the java.io.* package

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
This keyword allows other methods in the code to access it
public
26
Bundling attributes and methods within one unit.
Encapsulation
27
An empty method
Abstract Method
28
The program is designed as a sequence of procedures, where each one performs a task.
Procedure-Oriented Programming (POP)
29
A comma-delimited list of input parameters, preceded by their data types and enclosed by parentheses
Parameter list
30
This method belongs to a class rather than any object instance; they don't modify object attributes and can be called on the class itself.
Static Method
31
When is abstract used?
When a method does not have a body
32
Other terms for "Super Class"
Base Class, Ancestor Class, Parent Class
33
This keyword means that no value will be returned
void
34
A process of creating objects of the class
Instantiation
35
36
In what class is the read() and readLine() method found?
BufferedReader Class
37
Special method used to initialize an object's attributes when it's created.
Constructor
38
When is final used?
When a method is not allowed to be overridden by a subclass
39
This keyword means that the Java VM will automatically execute the method
static
40
Any field declared with the static modifier; tells compiler that there is exactly 1 copy of this variable
Static variable/Class variable
41
You can use certain programs repeatedly; flexible.
Reusability
42
Foundation from which individual objects are created
Class
43
The current value of an object's attributes at any given time.
State
44
Term used to refer to the item/s inside the parenthesis
Arguments
45
(T or F) public static can be written as static public
True
46
This can change as the object interacts with methods or other objects.
State
47
This is the default name of the method in every class; the entry point for your application.
main
48
This is used to read user input from the java.util package
Scanner Class
49
Blueprint for creating objects
Class
50
This modifier allows the method to be visible to all classes
public
51
In what package are the class libraries in Java contained?
Java
52
This can have unique values for its attributes even if they're within the same class
Object
53
Functions defined within a class that specify the behavior of objects; they perform actions and manipulate data
Method
54
Used to define a common set of methods that various classes can implement based on their needs.
Interfaces
55
(Procedural or OOP) can be reused and extended; you can create classes based on existing ones.
OOP
56
This is an object that is static and publicly available inside a class; it represents a standard output and is an instance of the java.io.PrintStream class
out
57
Programming method that uses objects as the building blocks of software dev.
OOP
58
This modifier specifies that the method can only be accessed within its class
private
59
How do you use classes from other packages?
Explicitly refer to them by their package name, or import them on your source file.
60
Programming that focuses on organizing a program into a set of functions/procedures.
Procedure-Oriented Programming (POP)
61
Variables within a class that represent the state of objects created from the class
Attributes
62
What is the syntax for instantiating an object?
ClassName objectName = new ClassName();
63
A method of the java.io.PrintStream that allows you to output text
print()
64
Java programming method that uses "text-only" interface
Console Programming
65
(Procedural or OOP) easier to maintain code with the help of encapsulation and modularity.
OOP
66
By default, what package do Java classes have access to?
java.lang
67
Any variable or method that is non-static
Instance variable
68
Defines the structure and behavior that the objects will have
Class
69
What are the naming rules for a method name?
a) Should be lowercase, b) Multi-word beginning with a verb (lowercase), followed by adjectives (capital)
70
A class that lets you manipulate OS-related objects; a part of java.lang
System
71
Requires an object of its class to be created before it can be used
Instance variable
72
(Procedural or OOP) data and functions are separate; functions operate on global or passed data.
Procedural
73
An instance of a class
Object
74
Indicates that the method might throw one of the listed exception types
Optional exception list
75
What type of method operates on an instance of a class?
Instance Method
76
This keyword means that the arguments of "main" should be strings
String args
77
They represent real-world entities with attributes and behaviors.
Objects
78
(Procedural or OOP) data and functions are encapsulated within objects
OOP
79
Data type of the value returned by the method
Return type
80
An action done by an object
Method
81
Way of grouping related classes and interfaces in a structured way.
Packages
82
Also known as "fields" or "properties"
Attributes
83
Collection of methods that indicate that a class has some behavior besides what it inherits from the parent class.
Interfaces
84
This is used to read user input from the java.io package
BufferedReader Class
85
Specifies whether other classes can use a particular field or invoke a particular method
Access Modifier