Deck 3: Using Methods, Classes and Objects

ملء الشاشة (f)
exit full mode
سؤال
A(n) ____ is a program module that contains a series of statements that carry out a task.

A) argument
B) method
C) application
D) declaration
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Data items you use in a call to a method are called ____.

A) arguments
B) instance variables
C) method declarations
D) headers
سؤال
Every object is a _____ of a more general class.

A) constant
B) member
C) method
D) field
سؤال
You can write your own constructor methods; but when you don't write a constructor method for a class object, Java writes one for you.
سؤال
A method's identifier must be more than one word, must have embedded spaces, and can be a Java keyword.
سؤال
A(n) ____ causes a value to be sent from a called method back to the calling method.

A) return statement
B) method statement
C) instantiation
D) inheritance relationship
سؤال
The arguments in a method call are often referred to as ____.

A) constants
B) concept parameters
C) actual parameters
D) argument lists
سؤال
When a variable ceases to exist at the end of a method, programmers say the variable ____.

A) is undeclared
B) is out of memory range
C) goes out of scope
D) is lost
سؤال
Any class can contain an unlimited number of methods.
سؤال
A(n) ____ variable is known only within the boundaries of the method.

A) method
B) local
C) double
D) instance
سؤال
Application classes frequently instantiate objects that use the objects of other classes.
سؤال
Parentheses in a method declaration contain parameters that are "dropped into" the method.
سؤال
The ____ method executes first in an application, regardless of where you physically place it within its class.

A) start()
B) run()
C) main()
D) execute()
سؤال
A method body provides information about how other methods can interact with it.
سؤال
An application's main() method must have a void return type.
سؤال
When a value is returned from a method, you are required to use the value when the method is called.
سؤال
You can identify a class that is an application because it contains a public static void main() method.
سؤال
A method header is also called a(n) _____.

A) argument
B) address
C) statement
D) declaration
سؤال
The interface is the part of a method that the method's client does not see.
سؤال
____ is a principle of object-oriented programming that describes the encapsulation of method details within a class.

A) An interface
B) A calling method
C) Implementation hiding
D) Instantiation
سؤال
Access specifiers are sometimes called access____.

A) modifiers
B) bodies
C) initializers
D) declarations
سؤال
In order to allocate the needed memory for an object, you must use the ____ operator.

A) new
B) main
C) type
D) return
سؤال
A unique identifier is most likely used as a ____ key in a database.

A) special
B) public
C) static
D) primary
سؤال
Public classes are accessible by all objects, which means that public classes can be ____, or used as a basis for any other class.

A) saved
B) extended
C) copied
D) used
سؤال
To execute a method, you ____ it from another method.

A) declare
B) define
C) invoke
D) initialize
سؤال
Which of the following is NOT an initial value assigned to an object's data field by a default constructor?

A) numeric fields set to 0
B) Boolean fields set to true
C) character fields set to Unicode '\u0000'
D) a field of object references set to null
سؤال
For ease in locating class methods, many programmers store them in ____ order.

A) chronological
B) type
C) alphabetical
D) numeric
سؤال
After an object has been instantiated, its methods can be accessed using the object's _____, a dot, and a method call.

A) identifier
B) class
C) operator
D) output
سؤال
A(n) ____ constructor is one that requires no arguments.

A) class
B) default
C) explicit
D) write
سؤال
Methods that retrieve values are called ____ methods.

A) static
B) accessor
C) class
D) mutator
سؤال
Method names that begin with ____ and set are very typical.

A) next
B) call
C) read
D) get
سؤال
When an application is run, the method that must be executed first must be named ____.

A) first()
B) void()
C) main()
D) final()
سؤال
A(n) ____ method is a method that creates and initializes class objects.

A) constructor
B) accessor
C) non-static
D) instance
سؤال
A(n)  ____ is a type whose implementation is hidden and accessed through its public methods.

A) constructor
B) abstract data type
C) method body
D) reserved type
سؤال
Assigning ____ to a field means that no other classes can access the field's values.

A) user rights
B) protected access
C) key access
D) private access
سؤال
Often, programmers list the ____  first because it is the first method used when an object is created.

A) mutator method
B) accessor method
C) main
D) constructor
سؤال
Normally, you declare constructors to be ____so that other classes can instantiate objects that belong to the class.

A) reserved
B) private
C) public
D) default
سؤال
The name of the ____ is always the same as the name of the class whose objects it constructs.

A) method
B) constructor
C) argument
D) variable
سؤال
Methods used with object instantiations are called ____ methods.

A) accessor
B) internal
C) static
D) instance
سؤال
____ parameters are variables in a method declaration that accept the values from the actual parameters.

A) System
B) Formal
C) Public
D) Static
سؤال
Match between columns
Used to return a value back to the calling method
return statement
Used to return a value back to the calling method
header
Used to return a value back to the calling method
instance variables
Used to return a value back to the calling method
method's signature
Used to return a value back to the calling method
formal parameters
Used to return a value back to the calling method
static method
Used to return a value back to the calling method
data fields
Used to return a value back to the calling method
parameter type
Used to return a value back to the calling method
class user
Used to return a value back to the calling method
implementation hiding
Used to return a value back to the calling method
dead code
Used to return a value back to the calling method
extended
Used to return a value back to the calling method
accessor method
Used to return a value back to the calling method
mutator method
Used to return a value back to the calling method
new operator
سؤال
Match between columns
The first line of a method
return statement
The first line of a method
header
The first line of a method
instance variables
The first line of a method
method's signature
The first line of a method
formal parameters
The first line of a method
static method
The first line of a method
data fields
The first line of a method
parameter type
The first line of a method
class user
The first line of a method
implementation hiding
The first line of a method
dead code
The first line of a method
extended
The first line of a method
accessor method
The first line of a method
mutator method
The first line of a method
new operator
سؤال
Match between columns
Included within the method declaration parentheses
return statement
Included within the method declaration parentheses
header
Included within the method declaration parentheses
instance variables
Included within the method declaration parentheses
method's signature
Included within the method declaration parentheses
formal parameters
Included within the method declaration parentheses
static method
Included within the method declaration parentheses
data fields
Included within the method declaration parentheses
parameter type
Included within the method declaration parentheses
class user
Included within the method declaration parentheses
implementation hiding
Included within the method declaration parentheses
dead code
Included within the method declaration parentheses
extended
Included within the method declaration parentheses
accessor method
Included within the method declaration parentheses
mutator method
Included within the method declaration parentheses
new operator
سؤال
Match between columns
Data components of a class
return statement
Data components of a class
header
Data components of a class
instance variables
Data components of a class
method's signature
Data components of a class
formal parameters
Data components of a class
static method
Data components of a class
data fields
Data components of a class
parameter type
Data components of a class
class user
Data components of a class
implementation hiding
Data components of a class
dead code
Data components of a class
extended
Data components of a class
accessor method
Data components of a class
mutator method
Data components of a class
new operator
سؤال
Match between columns
Are called class methods
return statement
Are called class methods
header
Are called class methods
instance variables
Are called class methods
method's signature
Are called class methods
formal parameters
Are called class methods
static method
Are called class methods
data fields
Are called class methods
parameter type
Are called class methods
class user
Are called class methods
implementation hiding
Are called class methods
dead code
Are called class methods
extended
Are called class methods
accessor method
Are called class methods
mutator method
Are called class methods
new operator
سؤال
Match between columns
Method that sets or changes field values
return statement
Method that sets or changes field values
header
Method that sets or changes field values
instance variables
Method that sets or changes field values
method's signature
Method that sets or changes field values
formal parameters
Method that sets or changes field values
static method
Method that sets or changes field values
data fields
Method that sets or changes field values
parameter type
Method that sets or changes field values
class user
Method that sets or changes field values
implementation hiding
Method that sets or changes field values
dead code
Method that sets or changes field values
extended
Method that sets or changes field values
accessor method
Method that sets or changes field values
mutator method
Method that sets or changes field values
new operator
سؤال
Hidden implementation methods are often referred to as existing in a(n) ____.

A) black box
B) static class
C) default class
D) interface
سؤال
The arguments in a method call are often referred to as ____ . The variables in the method declaration that accept the values from the actual parameters are ____.

A) call parameters, called parameters
B) formal parameters,  actual parameters
C) default parameters, formal parameters
D) actual parameters,   formal parameters
سؤال
Match between columns
Variables you declare within a class, but outside of any method
return statement
Variables you declare within a class, but outside of any method
header
Variables you declare within a class, but outside of any method
instance variables
Variables you declare within a class, but outside of any method
method's signature
Variables you declare within a class, but outside of any method
formal parameters
Variables you declare within a class, but outside of any method
static method
Variables you declare within a class, but outside of any method
data fields
Variables you declare within a class, but outside of any method
parameter type
Variables you declare within a class, but outside of any method
class user
Variables you declare within a class, but outside of any method
implementation hiding
Variables you declare within a class, but outside of any method
dead code
Variables you declare within a class, but outside of any method
extended
Variables you declare within a class, but outside of any method
accessor method
Variables you declare within a class, but outside of any method
mutator method
Variables you declare within a class, but outside of any method
new operator
سؤال
Match between columns
An application or a class that instantiates objects of another prewritten class
parameter type
An application or a class that instantiates objects of another prewritten class
return statement
An application or a class that instantiates objects of another prewritten class
header
An application or a class that instantiates objects of another prewritten class
instance variables
An application or a class that instantiates objects of another prewritten class
method's signature
An application or a class that instantiates objects of another prewritten class
formal parameters
An application or a class that instantiates objects of another prewritten class
static method
An application or a class that instantiates objects of another prewritten class
data fields
An application or a class that instantiates objects of another prewritten class
class user
An application or a class that instantiates objects of another prewritten class
implementation hiding
An application or a class that instantiates objects of another prewritten class
dead code
An application or a class that instantiates objects of another prewritten class
extended
An application or a class that instantiates objects of another prewritten class
accessor method
An application or a class that instantiates objects of another prewritten class
mutator method
An application or a class that instantiates objects of another prewritten class
new operator
سؤال
An empty method is called a ____.

A) default method
B) predefined method
C) stub
D) signature
سؤال
Match between columns
Classes that can be used as the basis for any other class
return statement
Classes that can be used as the basis for any other class
header
Classes that can be used as the basis for any other class
instance variables
Classes that can be used as the basis for any other class
method's signature
Classes that can be used as the basis for any other class
formal parameters
Classes that can be used as the basis for any other class
static method
Classes that can be used as the basis for any other class
data fields
Classes that can be used as the basis for any other class
parameter type
Classes that can be used as the basis for any other class
class user
Classes that can be used as the basis for any other class
implementation hiding
Classes that can be used as the basis for any other class
dead code
Classes that can be used as the basis for any other class
extended
Classes that can be used as the basis for any other class
accessor method
Classes that can be used as the basis for any other class
mutator method
Classes that can be used as the basis for any other class
new operator
سؤال
Match between columns
Allocates memory for an object
mutator method
Allocates memory for an object
instance variables
Allocates memory for an object
method's signature
Allocates memory for an object
formal parameters
Allocates memory for an object
static method
Allocates memory for an object
data fields
Allocates memory for an object
parameter type
Allocates memory for an object
return statement
Allocates memory for an object
class user
Allocates memory for an object
implementation hiding
Allocates memory for an object
dead code
Allocates memory for an object
extended
Allocates memory for an object
accessor method
Allocates memory for an object
header
Allocates memory for an object
new operator
سؤال
Match between columns
Variables in the method declaration that accept the values from the actual parameters
return statement
Variables in the method declaration that accept the values from the actual parameters
new operator
Variables in the method declaration that accept the values from the actual parameters
mutator method
Variables in the method declaration that accept the values from the actual parameters
accessor method
Variables in the method declaration that accept the values from the actual parameters
extended
Variables in the method declaration that accept the values from the actual parameters
dead code
Variables in the method declaration that accept the values from the actual parameters
implementation hiding
Variables in the method declaration that accept the values from the actual parameters
class user
Variables in the method declaration that accept the values from the actual parameters
parameter type
Variables in the method declaration that accept the values from the actual parameters
data fields
Variables in the method declaration that accept the values from the actual parameters
static method
Variables in the method declaration that accept the values from the actual parameters
formal parameters
Variables in the method declaration that accept the values from the actual parameters
method's signature
Variables in the method declaration that accept the values from the actual parameters
instance variables
Variables in the method declaration that accept the values from the actual parameters
header
سؤال
A(n) ____ includes the class name, a dot, and the method name.

A) constant
B) static method
C) method header
D) fully qualified identifier
سؤال
Match between columns
Unreachable statements that can never execute
new operator
Unreachable statements that can never execute
return statement
Unreachable statements that can never execute
header
Unreachable statements that can never execute
instance variables
Unreachable statements that can never execute
method's signature
Unreachable statements that can never execute
formal parameters
Unreachable statements that can never execute
static method
Unreachable statements that can never execute
data fields
Unreachable statements that can never execute
parameter type
Unreachable statements that can never execute
class user
Unreachable statements that can never execute
implementation hiding
Unreachable statements that can never execute
dead code
Unreachable statements that can never execute
extended
Unreachable statements that can never execute
accessor method
Unreachable statements that can never execute
mutator method
سؤال
A(n) ____ describes the type of data the method sends back to its calling method.

A) access specifier
B) actual parameter
C) return type
D) instance method
سؤال
Match between columns
Method that retrieves a value
return statement
Method that retrieves a value
header
Method that retrieves a value
instance variables
Method that retrieves a value
method's signature
Method that retrieves a value
formal parameters
Method that retrieves a value
static method
Method that retrieves a value
data fields
Method that retrieves a value
parameter type
Method that retrieves a value
class user
Method that retrieves a value
implementation hiding
Method that retrieves a value
dead code
Method that retrieves a value
extended
Method that retrieves a value
accessor method
Method that retrieves a value
mutator method
Method that retrieves a value
new operator
سؤال
Match between columns
The combination of the method name and the number, types, and order of arguments
new operator
The combination of the method name and the number, types, and order of arguments
return statement
The combination of the method name and the number, types, and order of arguments
header
The combination of the method name and the number, types, and order of arguments
instance variables
The combination of the method name and the number, types, and order of arguments
method's signature
The combination of the method name and the number, types, and order of arguments
formal parameters
The combination of the method name and the number, types, and order of arguments
static method
The combination of the method name and the number, types, and order of arguments
data fields
The combination of the method name and the number, types, and order of arguments
parameter type
The combination of the method name and the number, types, and order of arguments
class user
The combination of the method name and the number, types, and order of arguments
implementation hiding
The combination of the method name and the number, types, and order of arguments
dead code
The combination of the method name and the number, types, and order of arguments
extended
The combination of the method name and the number, types, and order of arguments
accessor method
The combination of the method name and the number, types, and order of arguments
mutator method
سؤال
Match between columns
Encapsulating method details in a class
return statement
Encapsulating method details in a class
new operator
Encapsulating method details in a class
mutator method
Encapsulating method details in a class
accessor method
Encapsulating method details in a class
extended
Encapsulating method details in a class
dead code
Encapsulating method details in a class
implementation hiding
Encapsulating method details in a class
class user
Encapsulating method details in a class
parameter type
Encapsulating method details in a class
data fields
Encapsulating method details in a class
static method
Encapsulating method details in a class
formal parameters
Encapsulating method details in a class
method's signature
Encapsulating method details in a class
instance variables
Encapsulating method details in a class
header
سؤال
Describe what a public access class is and when you would use one. 
سؤال
A major advantage of a method is that it is easily reusable. What does it mean to reuse a method and what are the advantages of doing so?
سؤال
What are the possible results if arguments to a method are passed in the wrong order?
سؤال
How do you create an object that is an instance of a class? Provide an example.
سؤال
public int getStudentNum()
{
   return studentNum;
}

In the above code, identify if the method is a mutator method or an accessor method. Describe how the two types of methods differ and how they are similar.
سؤال
How do you use a value returned from a method? Provide an example.
سؤال
Describe instantiation and how it relates to 'is-a relationships.'
سؤال
What is a method and how is one used?
سؤال
Describe how you can use multiple arguments in a method. Provide an example.
سؤال
public class Employee
{
   private int empNum;
   private double empSalary;

   public void setEmpNum(int emp)
   {
      empNum = emp;
   } 
   public void setEmpSalary(double sal)
   {
      empSalary = sal;
   }
}
Given the class defined in the code above, write the Java statements that will create a new employee instance called employee15 and assign an empNum of 15 and empSalar y of 500.00 to that employee instance.
سؤال
What is the difference between a mutator method and an accessor method? Provide an example of each.
سؤال
What are the four components of a method header?
سؤال
public Employee()
{
empSalary = 300.00;
}
​ The above code shows the Employee class constructor. What is a constructor and how would this default constructor operate?
سؤال
How does the order in which methods appear in a class affect how the application executes? Please explain.
سؤال
Does a programmer need to write every class he or she uses? Why or why not?
سؤال
What are the two parts of every method? Describe them.
سؤال
Write a valid class header with public access. Assign a valid identifier of your choice. Then write the body of the class that contains one data field named myPractice with a data type of double . Be sure to include any necessary curly braces and semicolons.
سؤال
When creating a method that requires multiple parameters, why would a programmer need to understand a method's signature, and why must a method call match the called method's signature?
سؤال
Explain the purpose of a return type of a method. Describe the return value of a method that returns no data.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/79
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 3: Using Methods, Classes and Objects
1
A(n) ____ is a program module that contains a series of statements that carry out a task.

A) argument
B) method
C) application
D) declaration
B
2
Data items you use in a call to a method are called ____.

A) arguments
B) instance variables
C) method declarations
D) headers
A
3
Every object is a _____ of a more general class.

A) constant
B) member
C) method
D) field
B
4
You can write your own constructor methods; but when you don't write a constructor method for a class object, Java writes one for you.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
5
A method's identifier must be more than one word, must have embedded spaces, and can be a Java keyword.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
6
A(n) ____ causes a value to be sent from a called method back to the calling method.

A) return statement
B) method statement
C) instantiation
D) inheritance relationship
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
7
The arguments in a method call are often referred to as ____.

A) constants
B) concept parameters
C) actual parameters
D) argument lists
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
8
When a variable ceases to exist at the end of a method, programmers say the variable ____.

A) is undeclared
B) is out of memory range
C) goes out of scope
D) is lost
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
9
Any class can contain an unlimited number of methods.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
10
A(n) ____ variable is known only within the boundaries of the method.

A) method
B) local
C) double
D) instance
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
11
Application classes frequently instantiate objects that use the objects of other classes.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
12
Parentheses in a method declaration contain parameters that are "dropped into" the method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
13
The ____ method executes first in an application, regardless of where you physically place it within its class.

A) start()
B) run()
C) main()
D) execute()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
14
A method body provides information about how other methods can interact with it.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
15
An application's main() method must have a void return type.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
16
When a value is returned from a method, you are required to use the value when the method is called.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
17
You can identify a class that is an application because it contains a public static void main() method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
18
A method header is also called a(n) _____.

A) argument
B) address
C) statement
D) declaration
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
19
The interface is the part of a method that the method's client does not see.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
20
____ is a principle of object-oriented programming that describes the encapsulation of method details within a class.

A) An interface
B) A calling method
C) Implementation hiding
D) Instantiation
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
21
Access specifiers are sometimes called access____.

A) modifiers
B) bodies
C) initializers
D) declarations
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
22
In order to allocate the needed memory for an object, you must use the ____ operator.

A) new
B) main
C) type
D) return
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
23
A unique identifier is most likely used as a ____ key in a database.

A) special
B) public
C) static
D) primary
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
24
Public classes are accessible by all objects, which means that public classes can be ____, or used as a basis for any other class.

A) saved
B) extended
C) copied
D) used
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
25
To execute a method, you ____ it from another method.

A) declare
B) define
C) invoke
D) initialize
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
26
Which of the following is NOT an initial value assigned to an object's data field by a default constructor?

A) numeric fields set to 0
B) Boolean fields set to true
C) character fields set to Unicode '\u0000'
D) a field of object references set to null
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
27
For ease in locating class methods, many programmers store them in ____ order.

A) chronological
B) type
C) alphabetical
D) numeric
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
28
After an object has been instantiated, its methods can be accessed using the object's _____, a dot, and a method call.

A) identifier
B) class
C) operator
D) output
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
29
A(n) ____ constructor is one that requires no arguments.

A) class
B) default
C) explicit
D) write
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
30
Methods that retrieve values are called ____ methods.

A) static
B) accessor
C) class
D) mutator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
31
Method names that begin with ____ and set are very typical.

A) next
B) call
C) read
D) get
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
32
When an application is run, the method that must be executed first must be named ____.

A) first()
B) void()
C) main()
D) final()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
33
A(n) ____ method is a method that creates and initializes class objects.

A) constructor
B) accessor
C) non-static
D) instance
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
34
A(n)  ____ is a type whose implementation is hidden and accessed through its public methods.

A) constructor
B) abstract data type
C) method body
D) reserved type
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
35
Assigning ____ to a field means that no other classes can access the field's values.

A) user rights
B) protected access
C) key access
D) private access
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
36
Often, programmers list the ____  first because it is the first method used when an object is created.

A) mutator method
B) accessor method
C) main
D) constructor
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
37
Normally, you declare constructors to be ____so that other classes can instantiate objects that belong to the class.

A) reserved
B) private
C) public
D) default
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
38
The name of the ____ is always the same as the name of the class whose objects it constructs.

A) method
B) constructor
C) argument
D) variable
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
39
Methods used with object instantiations are called ____ methods.

A) accessor
B) internal
C) static
D) instance
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
40
____ parameters are variables in a method declaration that accept the values from the actual parameters.

A) System
B) Formal
C) Public
D) Static
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
41
Match between columns
Used to return a value back to the calling method
return statement
Used to return a value back to the calling method
header
Used to return a value back to the calling method
instance variables
Used to return a value back to the calling method
method's signature
Used to return a value back to the calling method
formal parameters
Used to return a value back to the calling method
static method
Used to return a value back to the calling method
data fields
Used to return a value back to the calling method
parameter type
Used to return a value back to the calling method
class user
Used to return a value back to the calling method
implementation hiding
Used to return a value back to the calling method
dead code
Used to return a value back to the calling method
extended
Used to return a value back to the calling method
accessor method
Used to return a value back to the calling method
mutator method
Used to return a value back to the calling method
new operator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
42
Match between columns
The first line of a method
return statement
The first line of a method
header
The first line of a method
instance variables
The first line of a method
method's signature
The first line of a method
formal parameters
The first line of a method
static method
The first line of a method
data fields
The first line of a method
parameter type
The first line of a method
class user
The first line of a method
implementation hiding
The first line of a method
dead code
The first line of a method
extended
The first line of a method
accessor method
The first line of a method
mutator method
The first line of a method
new operator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
43
Match between columns
Included within the method declaration parentheses
return statement
Included within the method declaration parentheses
header
Included within the method declaration parentheses
instance variables
Included within the method declaration parentheses
method's signature
Included within the method declaration parentheses
formal parameters
Included within the method declaration parentheses
static method
Included within the method declaration parentheses
data fields
Included within the method declaration parentheses
parameter type
Included within the method declaration parentheses
class user
Included within the method declaration parentheses
implementation hiding
Included within the method declaration parentheses
dead code
Included within the method declaration parentheses
extended
Included within the method declaration parentheses
accessor method
Included within the method declaration parentheses
mutator method
Included within the method declaration parentheses
new operator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
44
Match between columns
Data components of a class
return statement
Data components of a class
header
Data components of a class
instance variables
Data components of a class
method's signature
Data components of a class
formal parameters
Data components of a class
static method
Data components of a class
data fields
Data components of a class
parameter type
Data components of a class
class user
Data components of a class
implementation hiding
Data components of a class
dead code
Data components of a class
extended
Data components of a class
accessor method
Data components of a class
mutator method
Data components of a class
new operator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
45
Match between columns
Are called class methods
return statement
Are called class methods
header
Are called class methods
instance variables
Are called class methods
method's signature
Are called class methods
formal parameters
Are called class methods
static method
Are called class methods
data fields
Are called class methods
parameter type
Are called class methods
class user
Are called class methods
implementation hiding
Are called class methods
dead code
Are called class methods
extended
Are called class methods
accessor method
Are called class methods
mutator method
Are called class methods
new operator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
46
Match between columns
Method that sets or changes field values
return statement
Method that sets or changes field values
header
Method that sets or changes field values
instance variables
Method that sets or changes field values
method's signature
Method that sets or changes field values
formal parameters
Method that sets or changes field values
static method
Method that sets or changes field values
data fields
Method that sets or changes field values
parameter type
Method that sets or changes field values
class user
Method that sets or changes field values
implementation hiding
Method that sets or changes field values
dead code
Method that sets or changes field values
extended
Method that sets or changes field values
accessor method
Method that sets or changes field values
mutator method
Method that sets or changes field values
new operator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
47
Hidden implementation methods are often referred to as existing in a(n) ____.

A) black box
B) static class
C) default class
D) interface
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
48
The arguments in a method call are often referred to as ____ . The variables in the method declaration that accept the values from the actual parameters are ____.

A) call parameters, called parameters
B) formal parameters,  actual parameters
C) default parameters, formal parameters
D) actual parameters,   formal parameters
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
49
Match between columns
Variables you declare within a class, but outside of any method
return statement
Variables you declare within a class, but outside of any method
header
Variables you declare within a class, but outside of any method
instance variables
Variables you declare within a class, but outside of any method
method's signature
Variables you declare within a class, but outside of any method
formal parameters
Variables you declare within a class, but outside of any method
static method
Variables you declare within a class, but outside of any method
data fields
Variables you declare within a class, but outside of any method
parameter type
Variables you declare within a class, but outside of any method
class user
Variables you declare within a class, but outside of any method
implementation hiding
Variables you declare within a class, but outside of any method
dead code
Variables you declare within a class, but outside of any method
extended
Variables you declare within a class, but outside of any method
accessor method
Variables you declare within a class, but outside of any method
mutator method
Variables you declare within a class, but outside of any method
new operator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
50
Match between columns
An application or a class that instantiates objects of another prewritten class
parameter type
An application or a class that instantiates objects of another prewritten class
return statement
An application or a class that instantiates objects of another prewritten class
header
An application or a class that instantiates objects of another prewritten class
instance variables
An application or a class that instantiates objects of another prewritten class
method's signature
An application or a class that instantiates objects of another prewritten class
formal parameters
An application or a class that instantiates objects of another prewritten class
static method
An application or a class that instantiates objects of another prewritten class
data fields
An application or a class that instantiates objects of another prewritten class
class user
An application or a class that instantiates objects of another prewritten class
implementation hiding
An application or a class that instantiates objects of another prewritten class
dead code
An application or a class that instantiates objects of another prewritten class
extended
An application or a class that instantiates objects of another prewritten class
accessor method
An application or a class that instantiates objects of another prewritten class
mutator method
An application or a class that instantiates objects of another prewritten class
new operator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
51
An empty method is called a ____.

A) default method
B) predefined method
C) stub
D) signature
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
52
Match between columns
Classes that can be used as the basis for any other class
return statement
Classes that can be used as the basis for any other class
header
Classes that can be used as the basis for any other class
instance variables
Classes that can be used as the basis for any other class
method's signature
Classes that can be used as the basis for any other class
formal parameters
Classes that can be used as the basis for any other class
static method
Classes that can be used as the basis for any other class
data fields
Classes that can be used as the basis for any other class
parameter type
Classes that can be used as the basis for any other class
class user
Classes that can be used as the basis for any other class
implementation hiding
Classes that can be used as the basis for any other class
dead code
Classes that can be used as the basis for any other class
extended
Classes that can be used as the basis for any other class
accessor method
Classes that can be used as the basis for any other class
mutator method
Classes that can be used as the basis for any other class
new operator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
53
Match between columns
Allocates memory for an object
mutator method
Allocates memory for an object
instance variables
Allocates memory for an object
method's signature
Allocates memory for an object
formal parameters
Allocates memory for an object
static method
Allocates memory for an object
data fields
Allocates memory for an object
parameter type
Allocates memory for an object
return statement
Allocates memory for an object
class user
Allocates memory for an object
implementation hiding
Allocates memory for an object
dead code
Allocates memory for an object
extended
Allocates memory for an object
accessor method
Allocates memory for an object
header
Allocates memory for an object
new operator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
54
Match between columns
Variables in the method declaration that accept the values from the actual parameters
return statement
Variables in the method declaration that accept the values from the actual parameters
new operator
Variables in the method declaration that accept the values from the actual parameters
mutator method
Variables in the method declaration that accept the values from the actual parameters
accessor method
Variables in the method declaration that accept the values from the actual parameters
extended
Variables in the method declaration that accept the values from the actual parameters
dead code
Variables in the method declaration that accept the values from the actual parameters
implementation hiding
Variables in the method declaration that accept the values from the actual parameters
class user
Variables in the method declaration that accept the values from the actual parameters
parameter type
Variables in the method declaration that accept the values from the actual parameters
data fields
Variables in the method declaration that accept the values from the actual parameters
static method
Variables in the method declaration that accept the values from the actual parameters
formal parameters
Variables in the method declaration that accept the values from the actual parameters
method's signature
Variables in the method declaration that accept the values from the actual parameters
instance variables
Variables in the method declaration that accept the values from the actual parameters
header
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
55
A(n) ____ includes the class name, a dot, and the method name.

A) constant
B) static method
C) method header
D) fully qualified identifier
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
56
Match between columns
Unreachable statements that can never execute
new operator
Unreachable statements that can never execute
return statement
Unreachable statements that can never execute
header
Unreachable statements that can never execute
instance variables
Unreachable statements that can never execute
method's signature
Unreachable statements that can never execute
formal parameters
Unreachable statements that can never execute
static method
Unreachable statements that can never execute
data fields
Unreachable statements that can never execute
parameter type
Unreachable statements that can never execute
class user
Unreachable statements that can never execute
implementation hiding
Unreachable statements that can never execute
dead code
Unreachable statements that can never execute
extended
Unreachable statements that can never execute
accessor method
Unreachable statements that can never execute
mutator method
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
57
A(n) ____ describes the type of data the method sends back to its calling method.

A) access specifier
B) actual parameter
C) return type
D) instance method
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
58
Match between columns
Method that retrieves a value
return statement
Method that retrieves a value
header
Method that retrieves a value
instance variables
Method that retrieves a value
method's signature
Method that retrieves a value
formal parameters
Method that retrieves a value
static method
Method that retrieves a value
data fields
Method that retrieves a value
parameter type
Method that retrieves a value
class user
Method that retrieves a value
implementation hiding
Method that retrieves a value
dead code
Method that retrieves a value
extended
Method that retrieves a value
accessor method
Method that retrieves a value
mutator method
Method that retrieves a value
new operator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
59
Match between columns
The combination of the method name and the number, types, and order of arguments
new operator
The combination of the method name and the number, types, and order of arguments
return statement
The combination of the method name and the number, types, and order of arguments
header
The combination of the method name and the number, types, and order of arguments
instance variables
The combination of the method name and the number, types, and order of arguments
method's signature
The combination of the method name and the number, types, and order of arguments
formal parameters
The combination of the method name and the number, types, and order of arguments
static method
The combination of the method name and the number, types, and order of arguments
data fields
The combination of the method name and the number, types, and order of arguments
parameter type
The combination of the method name and the number, types, and order of arguments
class user
The combination of the method name and the number, types, and order of arguments
implementation hiding
The combination of the method name and the number, types, and order of arguments
dead code
The combination of the method name and the number, types, and order of arguments
extended
The combination of the method name and the number, types, and order of arguments
accessor method
The combination of the method name and the number, types, and order of arguments
mutator method
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
60
Match between columns
Encapsulating method details in a class
return statement
Encapsulating method details in a class
new operator
Encapsulating method details in a class
mutator method
Encapsulating method details in a class
accessor method
Encapsulating method details in a class
extended
Encapsulating method details in a class
dead code
Encapsulating method details in a class
implementation hiding
Encapsulating method details in a class
class user
Encapsulating method details in a class
parameter type
Encapsulating method details in a class
data fields
Encapsulating method details in a class
static method
Encapsulating method details in a class
formal parameters
Encapsulating method details in a class
method's signature
Encapsulating method details in a class
instance variables
Encapsulating method details in a class
header
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
61
Describe what a public access class is and when you would use one. 
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
62
A major advantage of a method is that it is easily reusable. What does it mean to reuse a method and what are the advantages of doing so?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
63
What are the possible results if arguments to a method are passed in the wrong order?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
64
How do you create an object that is an instance of a class? Provide an example.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
65
public int getStudentNum()
{
   return studentNum;
}

In the above code, identify if the method is a mutator method or an accessor method. Describe how the two types of methods differ and how they are similar.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
66
How do you use a value returned from a method? Provide an example.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
67
Describe instantiation and how it relates to 'is-a relationships.'
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
68
What is a method and how is one used?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
69
Describe how you can use multiple arguments in a method. Provide an example.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
70
public class Employee
{
   private int empNum;
   private double empSalary;

   public void setEmpNum(int emp)
   {
      empNum = emp;
   } 
   public void setEmpSalary(double sal)
   {
      empSalary = sal;
   }
}
Given the class defined in the code above, write the Java statements that will create a new employee instance called employee15 and assign an empNum of 15 and empSalar y of 500.00 to that employee instance.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
71
What is the difference between a mutator method and an accessor method? Provide an example of each.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
72
What are the four components of a method header?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
73
public Employee()
{
empSalary = 300.00;
}
​ The above code shows the Employee class constructor. What is a constructor and how would this default constructor operate?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
74
How does the order in which methods appear in a class affect how the application executes? Please explain.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
75
Does a programmer need to write every class he or she uses? Why or why not?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
76
What are the two parts of every method? Describe them.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
77
Write a valid class header with public access. Assign a valid identifier of your choice. Then write the body of the class that contains one data field named myPractice with a data type of double . Be sure to include any necessary curly braces and semicolons.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
78
When creating a method that requires multiple parameters, why would a programmer need to understand a method's signature, and why must a method call match the called method's signature?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
79
Explain the purpose of a return type of a method. Describe the return value of a method that returns no data.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 79 في هذه المجموعة.