Deck 6: Using Methods

ملء الشاشة (f)
exit full mode
سؤال
____ variables and constants are those that are known to an entire class.

A)Global
C)Universal
B)Local
D)Comprehensive
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
In a flowchart, you draw the main() method and every other method separately with its own sentinel symbols.
سؤال
A method's ____ includes the method identifier and possibly other necessary identifying information.

A)title
C)header
B)space
D)opener
سؤال
The three parts of a method are the method's header, the method's body, and the method's return statement.
سؤال
A method's ____ consists of the method's statements.

A)body
C)space
B)space
D)group
سؤال
In every object-oriented programming language, the variables and constants declared in any method are usable anywhere within the program.
سؤال
Overloading a method is a good idea because it eliminates some programming work compared to writing separate methods.
سؤال
A method cannot be used more than once within a program or in other programs.
سؤال
Modularization provides ____.

A)ambiguity
C)detail focus
B)complexity
D)abstraction
سؤال
Methods are sometimes called ____.

A)segments
C)classes
B)modules
D)routines
سؤال
Programmers say that data items are ____ only after they have been declared and within the method in which they are declared.

A)available
C)visible
B)identified
D)useable
سؤال
Most programming languages contain a variety of mathematical methods, such as those that compute a square root or the absolute value of a number.
سؤال
The more the statements contribute to the same job, the less the functional cohesion of the method.
سؤال
An argument can be passed into a method in two ways: by value and by reference.
سؤال
Programmers say that variables and constants declared within a method are ____ only after declaration within that method.

A)in line
C)out of scope
B)useable
D)in scope
سؤال
You can pass an entire array to a method, or individual array element values.
سؤال
____ is the feature of programs and methods that assures you each has been tested and proven to function correctly.

A)Modularization
C)Portability
B)Reliability
D)Reusability
سؤال
The variables in the method declaration that accept the values from the actual parameters are the ____ parameters.

A)signature
C)formal
B)actual
D)recognized
سؤال
One advantage of modularization is that it simplifies the ____.

A)functions
C)logic
B)arguments
D)subroutines
سؤال
You should avoid overloading a method with the same argument data types because this will create an ambiguous method that will not compile.
سؤال
An advantage of ____________________ is that multiple programmers can work on a large problem.
سؤال
The feature of modular programs that allows individual methods to be used in a variety of applications is known as ____________________.
سؤال
You can indicate that a method parameter must be an array by placing ____ after the data type in the method's parameter list.

A)a place holder
C)parentheses
B)square brackets
D)curly brackets
سؤال
What is one item that must be included in a method's header if it can receive a parameter?

A)local parameter name
C)parameter's client
B)global parameter name
D)return data structure
سؤال
A method's name and parameter list constitute the method's ____.

A)identity
C)fingerprint
B)autograph
D)signature
سؤال
Arrays are passed to a method by ____.

A)type
C)reference
B)class
D)value
سؤال
____________________ is the process of paying attention to important properties while ignoring nonessential details.
سؤال
If you declare variables and constants within the methods that use them, the methods are more ____________________.
سؤال
When you ____ a method, you write multiple methods with a shared name but different parameter lists.

A)redo
C)reload
B)repurpose
D)overload
سؤال
When you overload a method, you run the risk of creating ____ methods-a situation in which the compiler cannot determine which method to use.

A)ambiguous
C)vague
B)uncertain
D)unclear
سؤال
The ____ type for a method can be any type, which includes numeric, character, and string, as well as other more specific types that exist in the programming language you are using.

A)return
C)case
B)data
D)variable
سؤال
Programmers refer to hidden implementation details as existing in a ____.

A)white box
C)black box
B)white hole
D)black hole
سؤال
When a method returns a value, you usually want to use it in the ____ method.

A)working
C)return
B)current
D)calling
سؤال
A(n) ____________________ is a reasonable unit of programming, designed to tackle one small task at a time.
سؤال
The arguments sent to a method in a method call are often referred to as ____ parameters.

A)signature
C)formal
B)actual
D)recognized
سؤال
Simple non-array variables are usually passed to methods by ____.

A)value
C)type
B)reference
D)class
سؤال
Methods can be ____ correctly by providing different parameter lists for methods with the same name.

A)updated
C)overloaded
B)tested
D)passed
سؤال
In most programming languages, you are allowed to include multiple ____ statements in a method.

A)return
C)back
B)end
D)depart
سؤال
With ____, you make a request to a method without knowing the details of how the method works.

A)implementation masking
C)method hiding
B)method masking
D)implementation hiding
سؤال
A method can return nothing, which makes it a(n) ____ method.

A)empty
C)open
B)void
D)valid
سؤال
When a method needs to use another method, it ____________________ that other method.
سؤال
____________________ variables are known to the entire class.
سؤال
Overloading a method is an example of ____________________, the ability of a method to act appropriately according to the context.
سؤال
When a method returns nothing, it is known as a(n) ____________________ method.
سؤال
The ____________________ type of a method indicates the data type of the value that the method will send back to the location where the method call was made.
سؤال
When you pass an argument by ____________________, the method receives its own copy of the value.
سؤال
The method name and parameter list taken together form the ____________________ of the method.
سؤال
When a method receives an argument, it is stored as a(n) ____________________ in the method header.
سؤال
When a method's local variables go ____________________, they cease to exist, or die.
سؤال
When you create methods with the same name but with different parameter lists, those methods are known as ____________________.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 6: Using Methods
1
____ variables and constants are those that are known to an entire class.

A)Global
C)Universal
B)Local
D)Comprehensive
A
2
In a flowchart, you draw the main() method and every other method separately with its own sentinel symbols.
True
3
A method's ____ includes the method identifier and possibly other necessary identifying information.

A)title
C)header
B)space
D)opener
C
4
The three parts of a method are the method's header, the method's body, and the method's return statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
A method's ____ consists of the method's statements.

A)body
C)space
B)space
D)group
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
In every object-oriented programming language, the variables and constants declared in any method are usable anywhere within the program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
Overloading a method is a good idea because it eliminates some programming work compared to writing separate methods.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
A method cannot be used more than once within a program or in other programs.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
Modularization provides ____.

A)ambiguity
C)detail focus
B)complexity
D)abstraction
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
Methods are sometimes called ____.

A)segments
C)classes
B)modules
D)routines
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
Programmers say that data items are ____ only after they have been declared and within the method in which they are declared.

A)available
C)visible
B)identified
D)useable
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
Most programming languages contain a variety of mathematical methods, such as those that compute a square root or the absolute value of a number.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
The more the statements contribute to the same job, the less the functional cohesion of the method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
14
An argument can be passed into a method in two ways: by value and by reference.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
Programmers say that variables and constants declared within a method are ____ only after declaration within that method.

A)in line
C)out of scope
B)useable
D)in scope
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
You can pass an entire array to a method, or individual array element values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
____ is the feature of programs and methods that assures you each has been tested and proven to function correctly.

A)Modularization
C)Portability
B)Reliability
D)Reusability
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
The variables in the method declaration that accept the values from the actual parameters are the ____ parameters.

A)signature
C)formal
B)actual
D)recognized
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
One advantage of modularization is that it simplifies the ____.

A)functions
C)logic
B)arguments
D)subroutines
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
You should avoid overloading a method with the same argument data types because this will create an ambiguous method that will not compile.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
An advantage of ____________________ is that multiple programmers can work on a large problem.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
22
The feature of modular programs that allows individual methods to be used in a variety of applications is known as ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
You can indicate that a method parameter must be an array by placing ____ after the data type in the method's parameter list.

A)a place holder
C)parentheses
B)square brackets
D)curly brackets
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
What is one item that must be included in a method's header if it can receive a parameter?

A)local parameter name
C)parameter's client
B)global parameter name
D)return data structure
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
25
A method's name and parameter list constitute the method's ____.

A)identity
C)fingerprint
B)autograph
D)signature
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
Arrays are passed to a method by ____.

A)type
C)reference
B)class
D)value
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
27
____________________ is the process of paying attention to important properties while ignoring nonessential details.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
If you declare variables and constants within the methods that use them, the methods are more ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
29
When you ____ a method, you write multiple methods with a shared name but different parameter lists.

A)redo
C)reload
B)repurpose
D)overload
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
30
When you overload a method, you run the risk of creating ____ methods-a situation in which the compiler cannot determine which method to use.

A)ambiguous
C)vague
B)uncertain
D)unclear
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
31
The ____ type for a method can be any type, which includes numeric, character, and string, as well as other more specific types that exist in the programming language you are using.

A)return
C)case
B)data
D)variable
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
32
Programmers refer to hidden implementation details as existing in a ____.

A)white box
C)black box
B)white hole
D)black hole
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
When a method returns a value, you usually want to use it in the ____ method.

A)working
C)return
B)current
D)calling
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
34
A(n) ____________________ is a reasonable unit of programming, designed to tackle one small task at a time.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
The arguments sent to a method in a method call are often referred to as ____ parameters.

A)signature
C)formal
B)actual
D)recognized
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
36
Simple non-array variables are usually passed to methods by ____.

A)value
C)type
B)reference
D)class
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
37
Methods can be ____ correctly by providing different parameter lists for methods with the same name.

A)updated
C)overloaded
B)tested
D)passed
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
In most programming languages, you are allowed to include multiple ____ statements in a method.

A)return
C)back
B)end
D)depart
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
With ____, you make a request to a method without knowing the details of how the method works.

A)implementation masking
C)method hiding
B)method masking
D)implementation hiding
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
40
A method can return nothing, which makes it a(n) ____ method.

A)empty
C)open
B)void
D)valid
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
When a method needs to use another method, it ____________________ that other method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
____________________ variables are known to the entire class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
Overloading a method is an example of ____________________, the ability of a method to act appropriately according to the context.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
When a method returns nothing, it is known as a(n) ____________________ method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
45
The ____________________ type of a method indicates the data type of the value that the method will send back to the location where the method call was made.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
When you pass an argument by ____________________, the method receives its own copy of the value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
The method name and parameter list taken together form the ____________________ of the method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
When a method receives an argument, it is stored as a(n) ____________________ in the method header.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
When a method's local variables go ____________________, they cease to exist, or die.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
When you create methods with the same name but with different parameter lists, those methods are known as ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.