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
What is the difference between a mutator method and an accessor method? Provide an example of each.
(Essay)
4.8/5
(39)
Match each term with the correct statement below.
Premises:
Unreachable statements that can never execute
Responses:
mutator method
formal parameters
method's signature
Correct Answer:
Premises:
Responses:
(Matching)
4.7/5
(35)
Parentheses in a method declaration contain parameters that are "dropped into" the method.
(True/False)
4.8/5
(36)
Methods used with object instantiations are called ____ methods.
(Multiple Choice)
4.8/5
(30)
Match each term with the correct statement below.
Premises:
Method that retrieves a value
Responses:
method's signature
dead code
class user
Correct Answer:
Premises:
Responses:
(Matching)
4.9/5
(38)
Which of the following is NOT an initial value assigned to an object's data field by a default constructor?
(Multiple Choice)
4.9/5
(35)
Normally, you declare constructors to be ____so that other classes can instantiate objects that belong to the class.
(Multiple Choice)
4.9/5
(39)
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.
(Essay)
4.8/5
(35)
The name of the ____ is always the same as the name of the class whose objects it constructs.
(Multiple Choice)
4.8/5
(42)
The ____ method executes first in an application, regardless of where you physically place it within its class.
(Multiple Choice)
4.8/5
(33)
Does a programmer need to write every class he or she uses? Why or why not?
(Essay)
4.7/5
(41)
Showing 41 - 60 of 79
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)