Object-Oriented Programming Final

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/46

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

47 Terms

1
New cards

Object-oriented programming

A programming paradigm based on the concept of "objects," which are instances of classes that encapsulate data and methods. It emphasizes principles such as inheritance, encapsulation, and polymorphism to create modular and reusable code.

2
New cards

Constructor

Java declaration that provides the initialization logic for new objects

3
New cards

Object reference

The value stored in a variable which refers to an object

4
New cards

Field

Java declaration that provides state (data memory) for objects

5
New cards

Method

Java declaration that provides behavior (executable logic) for objects

6
New cards

Class

Java declaration that provides an overall blueprint for creating instances of a particular type of object - such as instance of a pizza order

7
New cards

Primitive

A type of value such as int, double, char, or boolean that can be held within a variable

8
New cards

Static

When declaring a field, what java keyword should be used to indicate that the field is a storage area for the class itself, rather than a separate storage area within each instance of the class?

9
New cards

A reference (or pointer) to the object

When an object is given as a method argument, what is actually passed?

10
New cards

The signatures ad documented behavior of public constructors, methods and sometimes fields in a class or class library

What best defines the meaning of API?

11
New cards

Garbage collection

12
New cards

Aggregation

What is the unified modeling language (UML) term for an association of objects with a whole-part relationship? (also has-a relationship)

13
New cards

String.format() method

Create.a string where literal components are interspersed with the values of other primitive types (which are converted to strings as necessary)

14
New cards

StringBuilder

Efficiently create a large string that is composed of many smaller strings appended together

15
New cards

A “parse” method of a numeric wrapper class

Convert a string to double or int

16
New cards

String.split() method

Tokenize a string

17
New cards

String.indexOf

Locate the first occurrence of one (smaller) string within another

18
New cards

Dynamic binding

When a language (like Java) selects the method to be called based on the object being referenced - not based on the type (class) of the variable used for the call

19
New cards

Overriding

Defining a more specialized version of a method than the one that was defined in a superclass

20
New cards

Overloading

Creating multiple methods with the same name, but different signatures (parameter types)

21
New cards

Inheritance

In object-oriented languages like Java, defining a (child) class that extends another (parent) class - thus creating a more specialized version of the parent class

22
New cards

Polymorphism

Term for referencing different types of objects with the same variable. Java allows this as long as each object being referenced “IS-A” instance of the type of the variable

23
New cards

Abstract

A method definition without a body - such definitions require subclasses to provide a complete method definition that does include a body. Also describes a class containing such method definition

24
New cards

Subclass

A (child) class that extends another class by inheritance

25
New cards

super

The keyword used to call a constructor or method of a parent class

26
New cards

interface

The keyword used to define a named group of abstract methods which can be implemented by diverse classes

27
New cards

try

The java keyword that defines a block of statements in which exceptions might be raised

28
New cards

catch

The keyword that defines a block of statements to be executed when a specific exception is raised

29
New cards

@Test

The annotation which indicates that a method is a Unit test

30
New cards

instanceof

The keyword used to create a boolean expression that tests an object’s type or supertype

31
New cards

extends

Java keyword used to define a class as inheriting from another class

32
New cards

implements

Keyword used in a class definition to guarantee that the class defines every (abstract) method from an interface - by providing a body with logic for each of the interface’s methods

33
New cards

Throwable

Parent class of all exceptions and errors - thus representing any type of anomalous condition that could be raised by a Java program

34
New cards

abstract

The method definition keyword used in a superclass to establish the signature and return type of a method - but not implement it

35
New cards

final

Keyword stating that a variable or field will not be changed after first initialization

36
New cards

Immutable

An object, field, or variable whose value cannot be changed

37
New cards

Is-A

object-modeling (UML) term which describes a relationship among two categories (like Dog and Animal) where the first represents a more specialized category of the second

38
New cards

Superclass

a (parent) class being extended by inheritance

39
New cards

Annotation

extra metadata to specific declarations for use by the compiler
or other tools - for example noting that a method is a Junit test.

40
New cards

private

declare that a field or method cannot be accessed by code from any other classes.

41
New cards

handle

The general term for responding to an anomalous condition which was triggered in some method call (possibly nested several levels deep).

42
New cards

Traceback

The term for a list of method names and Java file line numbers where a problem arose during program execution. The list of methods shows the nested method calls that were being executed when the failure occurred.

43
New cards

Error

Parent class for various system problems (such as misconfigured software and running out of memory) that cannot (reasonably) be handled by a Java program.

44
New cards

Exception

Parent class for anomalous conditions which a program could try to handle. The Java class name matches the term we typically use to refer to them.

45
New cards

RuntimeException

The parent class for unchecked exceptions in Java.

46
New cards

throw

The java keyword that is used to raise an anomalous condition such as an exception.

47
New cards

throws

The java keyword which declares that a method can raise certain exceptions without handling them itself - thus making these exceptions the responsibility of all callers to handle.