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
Q

This keyword allows other methods in the code to access it

A

public

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

Bundling attributes and methods within one unit.

A

Encapsulation

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

An empty method

A

Abstract Method

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

The program is designed as a sequence of procedures, where each one performs a task.

A

Procedure-Oriented Programming (POP)

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

A comma-delimited list of input parameters, preceded by their data types and enclosed by parentheses

A

Parameter list

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

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.

A

Static Method

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

When is abstract used?

A

When a method does not have a body

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

Other terms for “Super Class”

A

Base Class, Ancestor Class, Parent Class

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

This keyword means that no value will be returned

A

void

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

A process of creating objects of the class

A

Instantiation

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

In what class is the read() and readLine() method found?

A

BufferedReader Class

37
Q

Special method used to initialize an object’s attributes when it’s created.

A

Constructor

38
Q

When is final used?

A

When a method is not allowed to be overridden by a subclass

39
Q

This keyword means that the Java VM will automatically execute the method

A

static

40
Q

Any field declared with the static modifier; tells compiler that there is exactly 1 copy of this variable

A

Static variable/Class variable

41
Q

You can use certain programs repeatedly; flexible.

A

Reusability

42
Q

Foundation from which individual objects are created

A

Class

43
Q

The current value of an object’s attributes at any given time.

A

State

44
Q

Term used to refer to the item/s inside the parenthesis

A

Arguments

45
Q

(T or F) public static can be written as static public

A

True

46
Q

This can change as the object interacts with methods or other objects.

A

State

47
Q

This is the default name of the method in every class; the entry point for your application.

A

main

48
Q

This is used to read user input from the java.util package

A

Scanner Class

49
Q

Blueprint for creating objects

A

Class

50
Q

This modifier allows the method to be visible to all classes

A

public

51
Q

In what package are the class libraries in Java contained?

A

Java

52
Q

This can have unique values for its attributes even if they’re within the same class

A

Object

53
Q

Functions defined within a class that specify the behavior of objects; they perform actions and manipulate data

A

Method

54
Q

Used to define a common set of methods that various classes can implement based on their needs.

A

Interfaces

55
Q

(Procedural or OOP) can be reused and extended; you can create classes based on existing ones.

A

OOP

56
Q

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

A

out

57
Q

Programming method that uses objects as the building blocks of software dev.

A

OOP

58
Q

This modifier specifies that the method can only be accessed within its class

A

private

59
Q

How do you use classes from other packages?

A

Explicitly refer to them by their package name, or import them on your source file.

60
Q

Programming that focuses on organizing a program into a set of functions/procedures.

A

Procedure-Oriented Programming (POP)

61
Q

Variables within a class that represent the state of objects created from the class

A

Attributes

62
Q

What is the syntax for instantiating an object?

A

ClassName objectName = new ClassName();

63
Q

A method of the java.io.PrintStream that allows you to output text

A

print()

64
Q

Java programming method that uses “text-only” interface

A

Console Programming

65
Q

(Procedural or OOP) easier to maintain code with the help of encapsulation and modularity.

A

OOP

66
Q

By default, what package do Java classes have access to?

A

java.lang

67
Q

Any variable or method that is non-static

A

Instance variable

68
Q

Defines the structure and behavior that the objects will have

A

Class

69
Q

What are the naming rules for a method name?

A

a) Should be lowercase, b) Multi-word beginning with a verb (lowercase), followed by adjectives (capital)

70
Q

A class that lets you manipulate OS-related objects; a part of java.lang

A

System

71
Q

Requires an object of its class to be created before it can be used

A

Instance variable

72
Q

(Procedural or OOP) data and functions are separate; functions operate on global or passed data.

A

Procedural

73
Q

An instance of a class

A

Object

74
Q

Indicates that the method might throw one of the listed exception types

A

Optional exception list

75
Q

What type of method operates on an instance of a class?

A

Instance Method

76
Q

This keyword means that the arguments of “main” should be strings

A

String args

77
Q

They represent real-world entities with attributes and behaviors.

A

Objects

78
Q

(Procedural or OOP) data and functions are encapsulated within objects

A

OOP

79
Q

Data type of the value returned by the method

A

Return type

80
Q

An action done by an object

A

Method

81
Q

Way of grouping related classes and interfaces in a structured way.

A

Packages

82
Q

Also known as “fields” or “properties”

A

Attributes

83
Q

Collection of methods that indicate that a class has some behavior besides what it inherits from the parent class.

A

Interfaces

84
Q

This is used to read user input from the java.io package

A

BufferedReader Class

85
Q

Specifies whether other classes can use a particular field or invoke a particular method

A

Access Modifier