IST 242 Final

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

1/72

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 10:15 PM on 5/1/24
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

73 Terms

1
New cards

Object oriented programming

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

2
New cards

Public interface

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

3
New cards

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.

4
New cards

Encapsulation

The hiding of implementation details

5
New cards

"Hello" and System.out

Example of an object

6
New cards

length, substring, and println

Examples of methods

7
New cards

String, Student, and PrintStream

Examples of classes

8
New cards

length and substring are methods of the String class

But println is not

9
New cards

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

public interface of the class

10
New cards

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

This is called encapsulation.

11
New cards

behavior (of an object)

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

12
New cards

state

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

13
New cards

instance variable

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

14
New cards

modifier

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

15
New cards

type

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

16
New cards

public interface

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

17
New cards

accessor method

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

18
New cards

instance variable

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

19
New cards

explicit parameter

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

20
New cards

constructor

A sequence of statements for initializing a newly instantiated object.

21
New cards

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.

22
New cards

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.

23
New cards

static method

A method with no implicit parameter.

24
New cards

package

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

25
New cards

inheritance

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

26
New cards

superclass

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

27
New cards

subclass

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

28
New cards

substitution principle

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

29
New cards

overriding

Redefining a method in a subclass.

30
New cards

overloading

Giving more than one meaning to a method name.

31
New cards

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.

32
New cards

polymorphism

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

33
New cards

hash code

A value that is computed by a hash function.

34
New cards

interface

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

35
New cards

implementing an interface

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

36
New cards

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);
}

37
New cards

MVC

Model view controller

38
New cards

GUI

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

39
New cards

collection

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

40
New cards

set

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

41
New cards

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.

42
New cards

queue

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

43
New cards

priority queue

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

44
New cards

map

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

45
New cards

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

List

46
New cards

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

set

47
New cards

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

Queue

48
New cards

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.

49
New cards

generic class

A class with one or more type parameters.

50
New cards

iterator

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

51
New cards

doubly-linked list

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

52
New cards

hash table

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

53
New cards

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.

54
New cards

Is a stack LIFO or FIFO

It is LIFO

55
New cards

Is a Queue LIFO or FIFO

It is FIFO

56
New cards

run-time stack

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

57
New cards

priority queue

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

58
New cards

selection sort

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

59
New cards

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).

60
New cards

merge sort

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

61
New cards

linear search

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

62
New cards

sequential search

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

63
New cards

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.

64
New cards

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.

65
New cards

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

66
New cards

what are statements

things that end in a semi colon

67
New cards

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

68
New cards

what are some primitive data types?

int, double, boolean, char

69
New cards

what is a class?

a blueprint or template for creating objects

70
New cards

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

71
New cards

what do getter/accessor methods do

they allow users to retrieve data from the object

72
New cards

what is a setter /mutator method

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

73
New cards

what does the state of an object mean

the current values stored in an objects fileds