COP2253 Zybooks Chapter Seven Flashcards

1
Q

object

A

a grouping of data (variables) and operations that can be performed on that data (methods)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

abstraction (or information hiding or excapsulation)

A

means to have a user interact with an item at a high-level, with lower-level internal details hidden from the user

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

ADT

A

abstract data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

class

A

defines a new type that can group data and methods to form an object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

public member methods

A

indicate all operations a class user can perform on the object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

creating an object consists of two steps:

A

declaring a reference variable of the class type, and assigning the variable with an explicitly allocated instance of the class type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

new operator

A

explicitly allocates an object of he specified class type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

member access operator

A

”.” used to invoke a method on an object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

private fields

A

variables that member methods can access but class users cannot

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

class members

A

collectively, a class’ fields and methods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

method definition

A

provides an access modifier, return type, name, arguments, and the method’s statements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

mutator (setter)

A

method may modify a class’ fields

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

accessor (getter)

A

method accesses but may not modify a class’ fields

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

constructor

A

a special class member that is called when an object of that class type is created and which can be used to initialize all fields (has the same name as the class and has NO return type)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

default constructor

A

a constructor called without any arguments

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

border cases

A

unusual or extreme test case values like 0, negative numbers, or large numbers

17
Q

regression testing

A

to retest an item like a class anytime that item is changed (if previously-passed test cases fail, the item has regressed)

18
Q

reference

A

a variable type that refers to an object

19
Q

implicit parameter

A

the object reference before the method name

20
Q

this.

A

keyword used to access an implicitly passed object reference

21
Q

primitive type

A

variable directly stores the data for that variable type

22
Q

reference type

A

variable can refer to an instance of a class (object)

23
Q

wrapper classes

A

built-in reference types that augment the primitive types

24
Q

autoboxing

A

the automatic conversion of primitive types to the corresponding wrapper classes

25
Q

unboxing

A

the automatic conversion of wrapper class objects to the corresponding primitive types

26
Q

static field (or class variable)

A

a field of the class instead of a field of each class object

27
Q

static member method

A

a class method that is independent of class objects

28
Q

package

A

a grouping of related types, classes, interfaces, and subpackage

29
Q

fully qualified name

A

the concatenation of the package name with the class name using a period

30
Q

import statement

A

imports a package member into a file to enable use of the package member directly, without having to use the package member’s fully qualified name

31
Q

wildcard character

A
  • imports all members of a package