AP Computer Science

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

class

1) A Java reserver word used to define a class 2) The blueprint of an object - the model that defines the variables and methods an object will contain when instantiated.

object

1) The basic software part in an Object-Oriented program. 2) An encapsulated collection of data variables and methods. 3) An instance of class. Has state and behavior.

Attribute

A Characteristic. Properties of an object.

boolean

A Java reserved word for a logical primitive data type that can only take the values "True" or "False".

public

A Java reserved word for a visibility modifier. A public class or interface can be used anywhere. A public method or variable is inherited by all subclasses and is accessible anywhere.

private

A Java reserved word for a visibility modifier. Private methods and variables are NOT inherited by subclasses and can only be accessed in the class in which they have been declared.

static

A Java reserved word that describes methods and variables. A static method is also called a class method and can be referred without an instance of the class. A static variable is also called a class variable and is common to all instances of a class; Data and methods can be used without instantiation of their own class.

void

A Java reserved word that indicates that no value is returned.

final

A Java reserved word that is a modifier for classes, methods, and variables. A "final" variable is a constant

double

A Java reserved word that represents a primitive floating point numeric type, stored using 64 bits in IEEE 754 format. Ex. 4.23

narrowing conversion

A conversion from one data type into another in which information could be lost. Converting from "double" to an "int" is a narrowing conversion

int

A java reserved word for a primitive dat type, stored using 32 bits in two's complement format. Ex. 5

Constructor

A method that is run when an object is instantiated, usually to initialize that object's instance variables.

Method

A named group of declarations and programming statements that can be invoked (executed) when needed. A Method is part of a class. Alters an objects State.

string literal

A primitive value used in a program. Ex. ("Hello")

Polymorphism

A technique for involving different methods at different times. all Java method invocations can be polymathic because the invoke the method of an object type, not the reference type. (Multiple children of the same parents)

Parameter

A value passed through a method when invoke.

constant

A value that cannot be changed. Used to make more code more readable and to make changes easier. Defined in Java using the "final" modifier.

Object Reference Variable

A variable that holds a reference to an object, but not the object itself. Stores the address where the object is stored i memory. Variable name for the Object.

strongly typed

Assigned values must correspond to the declared type.

primitive data

Characters with letters, or numbers: int, double, booleans

//

Comments a line of code in Java that will not be run with the program. More of a side note. //Hello

System.out.println()

Displays text for the user: Ex. System.out.println("Hello") Hello

Operator Precedence Hierarchy

The order in which operators are evaluated in an expression.

instantiate

The process of creating a new object and assigning it a value.

State

The state of being an object, defined by the values of its dat. Fields

invoke

evoke or call forth, with or as if by magic

%

Remainder operator.

Object-Oriented Programming

An approach to software design and implementation that is centered around Objects and Classes.

Variable

An identifier in a program that represents a memory location in which a data value is stored.

Escape Sequence

In Java characters beginning with the backslash character (\), used to indicate a special situation when printing values. For example, the escape sequence \t means that a horizontal tab should be printed; Special way to represent characters in a String.

main

Method that appears within a class, it invokes other methods.

casting

Most general form of converting in Java Ex. dollars = (int) money

members

Properties and methods of a class.

Concatenation

Puts together two or more Character strings. To link together in a series. Ex. ("Hello " + Name )

Inheritance

The ability to create a new class from an existing one. Inherited variables and methods of the original (parent) class are available in the new (child) class as if they were declared locally.

Encapsulation

The characteristic of an object that limits access to its variables and methods. All interaction with the object occurs through an interface. Each object protects and manages its own information.

Abstraction

The idea of hiding details. If the right details are hidden at the right times, abstraction can make programming simpler and better focused.

Assignment Statement

Uses the equal sign to give the object property on the left of the equal sign the value on the right of the equal sign.

Behavior

What an object does, defined by its methods. Methods or Functions


Ensembles d'études connexes

Chapter 6 - Leasehold: The Law of Landlord and Tenant

View Set

Subtopic renal, urinary, and reproductive systems

View Set

AVEDA: Chapter 3 Anatomy and Physiology

View Set

Enterprise Architecture Management

View Set

Unit 7.5 Quantitative Evaluation Measurements (Series 65)

View Set

AP Macroeconomics Final Review Mods 1-20 (Work in Progress)

View Set

Chapter 16: Microbial Biotechnology

View Set