IST 242 Final

studied byStudied by 0 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 72

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

73 Terms

1

Object oriented programming

Designing a program by discovering objects, their properties and their relationships.

New cards
2

Public interface

The features (methods, variables, and nested types) of a class that are accessible to all clients)

New cards
3

class

Describes a set of objects with the same behavior. For example, the String class describes the behavior of all strings. It is a programmer-defined data type.

New cards
4

Encapsulation

The hiding of implementation details

New cards
5

"Hello" and System.out

Example of an object

New cards
6

length, substring, and println

Examples of methods

New cards
7

String, Student, and PrintStream

Examples of classes

New cards
8

length and substring are methods of the String class

But println is not

New cards
9

The names and behavior of the methods of a class form the

public interface of the class

New cards
10

The user of a class only knows the public interface, not the implementation details, of a class.

This is called encapsulation.

New cards
11

behavior (of an object)

The actions taken by an object when its methods are invoked.

New cards
12

state

The current value of an object, which is determined by the cumulative action of all methods that were invoked on it.

New cards
13

instance variable

A variable defined in a class for which every object of the class has its own value.

New cards
14

modifier

A reserved word that indicates the accessibility of a feature, such as private or public.

New cards
15

type

A named set of values and the operations that can be carried out with them.

New cards
16

public interface

The features methods, variables, and nested types) of a class that are accessible to all clients.

New cards
17

accessor method

A method that accesses an object but does not change it.

New cards
18

instance variable

A variable defined in a class for which every object of the class has its own value.

New cards
19

explicit parameter

A parameter of a method other than the object on which the method is invoked.

New cards
20

constructor

A sequence of statements for initializing a newly instantiated object.

New cards
21

object reference

A value that denotes the location of an object in memory. In Java, a variable whose type is a class contains a reference to an object of that class.

New cards
22

static variable

A variable defined in a class that has only one value for the whole class, and which can be accessed and changed by any method of that class.

New cards
23

static method

A method with no implicit parameter.

New cards
24

package

A collection of related classes. The import statement is used to access one or more classes in a package.

New cards
25

inheritance

The is-a relationship between a more general superclass and a more specialized subclass.

New cards
26

superclass

A general class from which a more specialized class (a subclass) inherits.

New cards
27

subclass

A class that inherits variables and methods from a superclass but adds instance variables, adds methods, or redefines methods.

New cards
28

substitution principle

The principle that a subclass object can be used in place of any superclass object.

New cards
29

overriding

Redefining a method in a subclass.

New cards
30

overloading

Giving more than one meaning to a method name.

New cards
31

dynamic method lookup

Selecting a method to be invoked at run time. In Java, dynamic method lookup considers the class of the implicit parameter object to select the appropriate method.

New cards
32

polymorphism

Selecting a method among several methods that have the same name on the basis of the actual types of the implicit parameters.

New cards
33

hash code

A value that is computed by a hash function.

New cards
34

interface

A type with no instance variables, only abstract methods and constants.

New cards
35

implementing an interface

Implementing a class that defines all methods specified in the interface.

New cards
36

How to make a class comparable example

class Person implements Comparable<Person>{
Your constructor here and this.'s and the getters and setters then
@ Override
Public int compareto(Person other){
Return Integer.compare(this.age, other.age);
}

New cards
37

MVC

Model view controller

New cards
38

GUI

Graphical User Interface in which the user supplies inputs through graphical components such as buttons, menus, and text fields.

New cards
39

collection

A data structure that provides a mechanism for adding, removing, and locating elements.

New cards
40

set

An unordered collection that allows efficient addition, location, and removal of elements.

New cards
41

stack

A data structure with "last-in, first-out" retrieval. Elements can be added and removed only at one position, called the top of the stack.

New cards
42

queue

A collection of items with "first in, first out" retrieval.

New cards
43

priority queue

An abstract data type that enables efficient insertion of elements and efficient removal of the smallest element.

New cards
44

map

A data structure that keeps associations between key and value objects.

New cards
45

A grade book application stores a collection of quizzes. It should use a

List

New cards
46

A student information system stores a collection of student records. It should use a

set

New cards
47

A _____ is a better choice than a stack for organizing your required reading.

Queue

New cards
48

linked list (List<Integer> numbers = new LinkedList<>();)

A data structure that can hold an arbitrary number of objects, each of which is stored in a link object, which contains a pointer to the next link.

New cards
49

generic class

A class with one or more type parameters.

New cards
50

iterator

An object that can inspect all elements in a container such as a linked list.

New cards
51

doubly-linked list

A linked list in which each link has a reference to both its predecessor and successor links.

New cards
52

hash table

A data structure in which elements are mapped to array positions according to their hash function values.

New cards
53

binary search tree

A binary tree in which each subtree has the property that all left descendants are smaller than the value stored in the root, and all right descendants are larger.

New cards
54

Is a stack LIFO or FIFO

It is LIFO

New cards
55

Is a Queue LIFO or FIFO

It is FIFO

New cards
56

run-time stack

The data structure that stores the local variables of all called methods as a program runs.

New cards
57

priority queue

An abstract data type that enables efficient insertion of elements and efficient removal of the smallest element.

New cards
58

selection sort

A sorting algorithm in which the smallest element is repeatedly found and removed until no elements remain.

New cards
59

big-Oh notation

The notation g(n) = O(f(n)), which denotes that the function g grows at a rate that is bounded by the growth rate of the function f with respect to n. For example, 10n2 + 100n - 1000 = O(n2).

New cards
60

merge sort

A sorting algorithm that first sorts two halves of a data structure and then merges the sorted subarrays together.

New cards
61

linear search

Searching a container (such as an array or list) for an object by inspecting each element in turn.

New cards
62

sequential search

Searching a container (such as an array or list) for an object by inspecting each element in turn.

New cards
63

binary search

A fast algorithm for finding a value in a sorted array. It narrows the search down to half of the array in every step.

New cards
64

Array VS ArrayList

In summary, arrays are simpler and more efficient for fixed-size collections, while ArrayLists provide more flexibility and ease of use for dynamic collections. The choice between them depends on the specific requirements of your program.

New cards
65

What is a declaration?

they introduce something into the program and can be later referenced or used, it should have a type and a name

New cards
66

what are statements

things that end in a semi colon

New cards
67

benefits of using a static type?

-they help guide, catch and eliminate large classes early in development
- enable IDEs like IntelliJ, NetBeans, etc to provide more intelligent advice to programmers on the fly
- keeps compiler implementations simple

New cards
68

what are some primitive data types?

int, double, boolean, char

New cards
69

what is a class?

a blueprint or template for creating objects

New cards
70

what does the this reference variable do?

it is a reference variable that appears within the current class that but is in, it can be used to access files, methods etc

New cards
71

what do getter/accessor methods do

they allow users to retrieve data from the object

New cards
72

what is a setter /mutator method

they allow users to change/update/set fields of an object instance

New cards
73

what does the state of an object mean

the current values stored in an objects fileds

New cards
robot