Exam 3: Using Methods, Classes and Objects
Exam 1: Creating Your First Java Classes76 Questions
Exam 2: Using Data81 Questions
Exam 3: Using Methods, Classes and Objects79 Questions
Exam 4: More Object Concepts84 Questions
Exam 5: Making Decisions80 Questions
Exam 6: Looping77 Questions
Exam 7: Characters, Strings and the Stringbuilder82 Questions
Exam 8: Arrays77 Questions
Exam 9: Advanced Array Concepts80 Questions
Exam 10: Introduction to Inheritance78 Questions
Exam 11: Advanced Inheritance Concepts78 Questions
Exam 12: Exception Handling79 Questions
Exam 13: File Input and Output78 Questions
Exam 14: Introduction to Swing Components79 Questions
Exam 15: Using Javafx and Scene Builder65 Questions
Select questions type
Match each term with the correct statement below.
Premises:
Allocates memory for an object
Responses:
accessor method
formal parameters
mutator method
Correct Answer:
Premises:
Responses:
Free
(Matching)
4.8/5
(39)
Correct Answer:
When a variable ceases to exist at the end of a method, programmers say the variable ____.
Free
(Multiple Choice)
4.9/5
(27)
Correct Answer:
C
A(n) ____ is a type whose implementation is hidden and accessed through its public methods.
Free
(Multiple Choice)
4.8/5
(34)
Correct Answer:
B
When a value is returned from a method, you are required to use the value when the method is called.
(True/False)
4.7/5
(24)
A(n) ____ describes the type of data the method sends back to its calling method.
(Multiple Choice)
4.8/5
(32)
A(n) ____ includes the class name, a dot, and the method name.
(Multiple Choice)
4.8/5
(33)
A(n) ____ method is a method that creates and initializes class objects.
(Multiple Choice)
4.8/5
(34)
A(n) ____ is a program module that contains a series of statements that carry out a task.
(Multiple Choice)
4.8/5
(32)
In order to allocate the needed memory for an object, you must use the ____ operator.
(Multiple Choice)
4.9/5
(38)
Assigning ____ to a field means that no other classes can access the field's values.
(Multiple Choice)
4.9/5
(41)
Method names that begin with ____ and set are very typical.
(Multiple Choice)
4.8/5
(37)
public Employee()
{
empSalary = 300.00;
}
The above code shows the Employee class constructor. What is a constructor and how would this default constructor operate?
(Essay)
4.8/5
(31)
How does the order in which methods appear in a class affect how the application executes? Please explain.
(Essay)
4.9/5
(32)
Match each term with the correct statement below.
Premises:
An application or a class that instantiates objects of another prewritten class
Responses:
implementation hiding
static method
extended
Correct Answer:
Premises:
Responses:
(Matching)
4.8/5
(37)
How do you create an object that is an instance of a class? Provide an example.
(Essay)
4.9/5
(34)
Often, programmers list the ____ first because it is the first method used when an object is created.
(Multiple Choice)
4.8/5
(39)
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.
(Essay)
4.8/5
(40)
Match each term with the correct statement below.
Premises:
Variables in the method declaration that accept the values from the actual parameters
Responses:
dead code
parameter type
instance variables
Correct Answer:
Premises:
Responses:
(Matching)
4.8/5
(40)
Match each term with the correct statement below.
Premises:
Data components of a class
Responses:
data fields
method's signature
implementation hiding
Correct Answer:
Premises:
Responses:
(Matching)
4.8/5
(48)
Showing 1 - 20 of 79
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)