This is Java Jeopardy Writing Methods…chapter 4…

Post on 31-Mar-2015

224 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

Transcript

This isJava Jeopardy

WritingMethods…chapter 4…

Objects Methods Everything Classes

Using Classes

More Methods Misc.

1 1 1 1 1 1

2 2 2 2 2 2

3 3 3 3 3 3

4 4 4 4 4 4

To Final Jeopardy

What are methods?

This defines an object’s behaviors.

Back to BoardObjects 1

What are attributes?

This is the term used to describe the properties of an object’s state of being.

Back to BoardObjects 2

What is aggregation?

When an object has other objects as instance data it is said to have this type of relationship.

Back to BoardObjects 3

What is association?

When an object is aware of and uses another object they are said to have this type of relationship.

Back to BoardObject 4

What is method overloading?This is when we have multiple

methods with the same name differentiated by their signatures only.

Back to Board

Method 1

What is a void method?

This type of method does not have a return statement.

Back to BoardMethod 2

What is method decomposition?This is the process of breaking down

a complex method into easier to handle, smaller methods.

Back to BoardMethod 3

What is parameter list?

When methods are created this follows the method name explaining the type of values that can be passed to the method and their names.

Back to BoardMethod 4

What is scope?

This refers to the range in which a variable can be referenced.

Back to BoardEverything Classes 1

What is private visibility?

This type of visibility protects instance data by requiring programmers to interact with an object’s method to change the object’s state.

Back to BoardEverything Classes 2

What are data declarations and method declarations? These are the members of a class.

Back to Board

Everything Classes 3

What is public visibility?

In order for a programmer to interact with protected objects created in our classes, methods we have created should be declared with this type of visibility.

Back to Board

Everything Classes 4

What is new?

This reserved word is used to create a new instance of a given class.

Back to BoardUsing Classes 1

What is a constructor?

This is often used to initialize the variables associated with each object.

Back to BoardUsing Classes 2

What are actual parameters? When using methods from a class you

have created you pass these parameters into the method declaration within the class you created?

Back to BoardUsing Classes 3

What is an instance?

When evaluating the relationship between objects and classes, objects are often referred to as this of a class.

Back to BoardUsing Classes 4

What are formal parameters?

These parameters are located in the header of the method declaration.

Back to Board

More Methods 1

What is method signature?

This is the methods name along with the number, type, and order of its parameters.

Back to BoardMore Methods 2

What is local data?

This type of data can only be used within the method in which it is declared.

Back to BoardMore Method 3

What is the method declaration? This defines the code that is executed

when the method is invoked.

Back to BoardMore Methods 4

What is instance data?

Attributes, such as the variable face in the coin class, are considered this type of data because memory space is created for each instance of the class that is created.

Back to BoardMisc 1

What is encapsulation?

This term refers to objects working with other parts of a program only through the objects own methods.

Back to BoardMisc 2

What are visibility modifiers? Public and Private are two examples of

this.

Back to BoardMisc 3

What are support methods?

Methods that only exist to aid other methods of the class are said to be this type of method.

Back to BoardMisc 4

Final Jeopardy Category

Visibility Modifiers

make your wagers

Let’s see your answers.

Fill in the chart below explaining the impact on ecapsulation.

Begin Now.

Variable

Methods

public private

Scrolling methods

Public VariablesDoes not protect data

Private VariablesProtects Data

Public MethodsProvides services to clients

Private MethodsSupports other methods in the class

top related