Object oriented programming vocab

studied byStudied by 11 people
5.0(1)
get a hint
hint

(int)(x + 0.5)

1 / 54

Tags and Description

55 Terms

1

(int)(x + 0.5)

Rounds the value of a double to the nearest whole number.

New cards
2

Abstract Class

A class, usually at the top of a Class Hierarchy, that cannot be instantiated, because not all of its methods are defined

New cards
3

Abstract method

A method, written in an Abstract Class, that is not defined. The word abstract must come right before the method's return type. It is up to the subclass to fill in the definition for the abstract method.

New cards
4

Accessor Method

A method that enables the user to obtain information about an object’s instance and static variables. Also referred to as getter methods

New cards
5

Getter Method

An instance method that allows the client to get the value of an instance variable on an object

New cards
6

Assigning to a variable (setter methods)

Assigning to a variable is updating the variable's value

New cards
7

attributes of an object (instance variables)

An object’s characteristics.

New cards
8

Behavior (methods)

The actions that can be completed by an object or class.The behavior of an object is what the object is able to do. It is the actions that can be performed by the object.

New cards
9

Boolean

boolean is a Java type that can either be true or false. It is primitive.

New cards
10

break

Breaks out of a while loop and executes statements that immediately follow while loop.

New cards
11

Calling a method

Calling a method actually gives the command, so the computer will run the code for that method. objectName.method()

New cards
12

Casting

Casting is turning something of one type into another type

New cards
13

Compile Time Error (syntax error)

An error in the actual Java code. The code will not compile into an executable program, because there are errors in the text of the code.

New cards
14

Client

When someone else creates a Class (like String, or Randomizer), and you are using the functionality of that Class in your program, your program is a client of the class. You are using the class as a client.

New cards
15

Class Hierarchy

Class hierarchy refers to the arrangement of classes and how they relate to each other

New cards
16

Class

A class is a template, or a blueprint, from which Java objects are created. All Java programs start with a class.

New cards
17

char

char is a Java type that represents a single character (a single letter). It is a primitive

New cards
18

Define a method

Defining a method means to teach the computer a new command and explain what it should do when receiving that command.

New cards
19

Declare a Variable

Declaring a variable is defining it for the first time.

New cards
20

Constructor

A constructor is a special method of a Class that constructs a new object (a new instance) of the Class and sets the initial values for the instance variables.

New cards
21

Concatenation

The process of adding two String values together. This creates a new String object. Primitives can be concatenated with String objects.

New cards
22

double

double is a Java type that represents a real number with decimal values. It is primitive.

New cards
23

Encapsulation

The process of hiding the implementation details of a class from the user.

New cards
24

Exception

An exception is thrown by Java when a runtime error is encountered. The exception provides information about what kind of error occurred.

New cards
25

For Loop

A for loop lets us repeat code a fixed number of times.

New cards
26

Immutable

Unable to be changed or manipulated. String are immutable.

New cards
27

Inheritance

When a subclass extends a superclass, the subclass inherits all of the static methods, static variables, and public instance methods of the superclass. This is called inheritance.

New cards
28

Instance Variable

A variable defined in a Class, for which each object of the class has its own copy

New cards
29

int

int is a Java type that represents an integer (a whole number)

New cards
30

Local Variable

A variable that is defined in a method or constructor. It only exists in the context of the method that it belongs to

New cards
31

Instance Method

An instance method is a method that defines the behavior of an object. It defines an action that the object can perform.

New cards
32

Instance

Instance is what you call a specific object constructed from a class. Instance and object generally refer to the same thing. An object is a specific instance of a class

New cards
33

new

Necessary keyword for instantiating a new class object.

New cards
34

Loop-and-a-half

A loop, most often set with while(true), that has a break statement in the loop body

New cards
35

Method

A method is a way to teach the computer a new command

New cards
36

Method Overloading

Classes can have multiple methods with the same name, as long as the parameters to those methods are different. Doing this is called "overloading" a method. Methods can have multiple signatures. Java will use the correct signature based on the actual parameters used in a program.

New cards
37

Method overloading

Methods can have multiple signatures. Java will use the correct signature based on the actual parameters used in a program. Classes can have multiple methods with the same name, as long as the parameters to those methods are different. Doing this is called "overloading" a method.

New cards
38

Mutator Methods

Methods used to change or manipulate instance variable or object data. Also referred to as setter methods.

New cards
39

Object Oriented Programming

The use of object and class types in programming.

Programming model that focuses on objects and the data and actions associated with the objects.

New cards
40

Object

An object is a variable of a data type that is user defined. Every object has a state and a behavior.

New cards
41

Private

Restricts access to data and methods to the declaring class.

New cards
42

Primitive Type

Primitive types are the basic, simple data types that are inherent to Java (int, double, char, and boolean)

New cards
43

Polymorphism

An object can take on different forms depending on its implementation. Java can call the correct method even when an object is disguised as a more generic reference type. Polymorphism is the capability of a method to do different things depending on which object it is acting upon.

New cards
44

Parameters

Pieces of information you can give to functions when you define them. When the function is called the arguments are the data you pass into the function's parameters. Parameter is the variable in the declaration of the function. Argument is the actual value of this variable that gets passed to the function.

New cards
45

Return value

The value returned from a method.

New cards
46

Return type

A method's return type is the type of value returned from that method.

New cards
47

return

Keyword used in methods to return a value back to the initial program that called the method.

New cards
48

public

Allows access to data and methods from classes outside the declaring class.

New cards
49

Runtime Error

An error that happens while the program is running. Even if the code is written with the proper syntax, there are things that can go wrong while the program is running.

New cards
50

Scope

Defines which part of the program a variable can be accessed from.

New cards
51

Sentinel

A constant that has the specific purpose of being the value that breaks out of a loop.

New cards
52

Setter method

An instance method that allows the client to set the value of an instance variable on an object.

New cards
53

Static method

A method called on the Class, rather than on a specific object of the Class.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.

New cards
54

Shadowing

If two variables within the same scope have the same name, the variable with the more specific scope will be called.

New cards
55

State(instance variable)

The data that is associated with an object or class

New cards

Explore top notes

note Note
studied byStudied by 10 people
Updated ... ago
4.0 Stars(1)
note Note
studied byStudied by 6 people
Updated ... ago
4.0 Stars(1)
note Note
studied byStudied by 9 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 15 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 6 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 14414 people
Updated ... ago
4.8 Stars(125)
note Note
studied byStudied by 7 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 150 people
Updated ... ago
5.0 Stars(6)

Explore top flashcards

flashcards Flashcard46 terms
studied byStudied by 11 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard33 terms
studied byStudied by 15 people
Updated ... ago
4.5 Stars(91)
flashcards Flashcard39 terms
studied byStudied by 12 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard31 terms
studied byStudied by 7 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard33 terms
studied byStudied by 2 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard30 terms
studied byStudied by 13 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard40 terms
studied byStudied by 27 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard33 terms
studied byStudied by 33 people
Updated ... ago
5.0 Stars(2)