MidTerm 2 Flashcards

1
Q

A sequence of instructions with a name____

A

Method

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

____are supplied when a method is called

A

Parameters

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

the method ___ is the result that the method computes

A

Return

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

when writing a method, we only present the___of the method to the user of the method.

A

Abstraction

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

the action of hiding the implementation is known as___

A

Encapsulation

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

The engineering term for encapsulation is ___

A

black box

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

In Java, a method can never change the contents of a____ that is passed to that method.

A

Variable

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

A java program contains ___classes

A

1 or more

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

The____is a special static method that Java recognizes as an entry point into a program.

A

main method

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

The ___acts as a table of contents or set of directions to control the flow of the program

A

main method

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

Every class must have these 3 basic functions of every computation.

A

input, process, output

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

A ___ is a special method that is called when an object is instantiated to initialize the instance variables

A

constructor

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

The purpose of a constructor is to _____

A

initialize a newly created object

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

The name of the constructor must match the ___name

A

class

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

A class can have how many constructors?

A

1 or more

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

object oriented programming

A

solve tasks using collaborative objects

17
Q

class describes a set

A

objects with the same behavior

18
Q

to construct a new object of a class we ____it by using the ___ operator.

A

instantiate

new

19
Q

Once you have instantiated an object, you can utilize its

A

methods

20
Q

These methods are called ___ because they are invoked on an object

A

instance methods

21
Q

When we use methods of different classes we must specify the

A
class name 
and instance method name
22
Q

When you create a class you will encapsulate it, this involves

A

hiding the implementation and creating / providing public interface

23
Q

The public interface of a class consists of..

A

all the instance methods that a user of your class might want to apply to it objects

24
Q

The___make up the public interface of the class.

A

method declaration

25
Q

The private implementation consists of:

A

the data and method bodies

26
Q

once you have ____your class by creating an object of that class, you can invoke one or all of its methods.

A

instantiated

27
Q

a mutator method/set method

A

will modify the object on which it operates

28
Q

Accessor methods/get methods

A

do not modify, only queries the object for some information