• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/41

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

41 Cards in this Set

  • Front
  • Back
  • 3rd side (hint)

Bit

Fundamental unit in a computer, stores 1 or 0

Stores 1 or 0

Byte

Group of 8 bits

Syntax

Grammatical rules of a programming language

Ex. In Java you always end a statement with a ;

High–level language

A programming language that is defined by syntax understood by human

What humans can understand

Low-level language

The language which can be directly understood/executed by the computer

What computers understand

Complier

A compiler is a program that translates high-level language to low-level language. It translateshuman-written code into computer code (a sequence of zeros and ones)

Takes human code and makes the computer understand it

Library

A library is a collection of previously compiled code that can be used in future. For example,BasicIO is a library written by someone which we are using now

Written code you can use


Ex. turtle

Application Programming Interface (API)

A description of the resources (classes and methods) providedby a library

Says what a library can do

Package

A collection of classes within a Java program. For example, we use a package when dealing withmultiple classes

Global/Instance variables

Variables defined at the class level and are accessible anywhere in the class


Scope (of a variable)

The visibility of the variable (the region where a variable is accessible). For example, a global variable is visible/accessible anywhere is the class

Things can only be used in certain areas

Method

A component of a Java class which contains some code. It represents a functionality/behaviourof the class

Cascading method call

Chain method calling (in a single line)

Ex. pic.getPixel(0, 0).getColor();

Main class

A Java class that includes the main method. The flow of execution of any Java program starts at the main method. All main classes have this...


Ex. public static void main(String[] args){...}

Constructor

A special method which has the same name as the class name. It gets executed automaticallywhen an object is initialized

Formal parameter

The variable name and type defined in method declaration. Ex. public void multiply(int x, int y){...}

when you call a method

Actual parameter

The values inserted when calling a method. Ex. multiply(7, 3);

what the method recives

Value parameter

The value of the variable is copied over to the formal parameter, i.e., passing the valuenot the variable itself.


Ex.


num1 = 5;


int num2 = 8;


multiply ( num1 , num2 ) ;


// equivalent to multiply (5 , 8); we are creatinga copy of the values of num1 and num2 and passing them . We passthe values , not the variables

Object

Something that has states (characteristics) and behaviours (functionalities). States are the instance/global variables whereas behaviour refers to the methods of the class. For example, the statesof a Turtle are direction, pen state and current coordinate on canvas. Some of the behaviours includepenUp, penDown, forward, backward, etc.

Coupling

How much do we know about a class. Can be tight or loose

Loose coupling

A class having sufficient privacy

Ex. uses (private) a lot

Tight coupling

Not having lots of privacy

Ex. uses (public) a lot

Encapsulation

Allows for information hiding to reduce (coupling) of classes. Thisis done by the usage of private keyword for instance variables and methods. Other classes can accessthem using accessor and updater methods (getSomething(), setSomething(...)).

Abstraction

The approach of thinking about the overall/broad idea not the details

Procedural abstraction

The details of performing an action are abstracted.Used in multiple or one method.



Data abstraction

Used in multiple classes, The details of state and implementation of behaviour are abstracted.

Object-Oriented language

A programming language that allows the concept of objects (i.e., abstractionand encapsulation). For example, Java is an object-oriented programming language. Everything in Java is an object.

Private

A keyword in Java which indicates a variable or method to be private. This means that otherclasses cannot access them (encapsulation/information hiding)

Casting

A way to change the type of a variable. In Java, it is written by writing the desired type inparentheses in front of the value. For example, int x = (int) 3.14;

Implicit type conversion

A type conversion (cast) which is done automatically by Java. For example:


double x = 10;


//it automatically becomes 10.0

Narrowing conversion

The process in which a type is down cast to another type usually losing precision.For example, converting a double to int

Collection

An object which holds sub-objects, i.e., Picture holds Pixels, Sound holds Samples

Garabage collection

A way for Java to reclaim memory which is not used anymore

Reference Variable

A variable which represents an object or an address in memory rather than a value.

End of File (EOF)

End Of File is the condition (state) that become true when an attempt is made to read data fromthe file but no further data available to be read

Algorithm

A well-defined sequence of steps to solve a problem (the recipe of a program).

Switch statement

A more compact way of if, else if, else if, · · ·, else if, else statements. Itaccepts a value and checks the possible cases

Persistent object

Extending an object’s lifetime so that it is written to hard drive and will not vanishafter the program closes

serialVersionUID

A constant that may be specified for a Serializable (persistent) object. It specifies aunique key that differentiates objects of this class from objects of other classes that have been writtento hard drive. The compiler can verify that the object read is of the correct type and version

Garbage collection

The process of discovering unused memory and clearing it for reuse

In-test Loop

A loop in which its condition is neither the first operation in the loop, nor the last. It iswithin the loop. This means that the statements of the loop body are in two parts: the part beforethe condition which is executed 1 or more times and the part after the condition which is executed 0or more times. There is no in-test loop in Java but we can build one using an if statement:


while ( true ) {


// the part before the condition , runs once at least


if( file . isEOF () ) {


//in - loop condition


break ;}


// the part after the condition , possible to run zero times .


}