Exam 4: Writing Classes
Exam 1: Introduction65 Questions
Exam 2: Data and Expressions77 Questions
Exam 3: Using Classes and Objects58 Questions
Exam 4: Writing Classes56 Questions
Exam 5: Conditionals and Loops37 Questions
Exam 6: More Conditionals and Loops36 Questions
Exam 7: Object-Oriented Design76 Questions
Exam 8: Arrays70 Questions
Exam 9: Inheritance71 Questions
Exam 10: Polymorphism70 Questions
Exam 11: Exceptions68 Questions
Exam 12: Recursion68 Questions
Exam 13: Collections68 Questions
Select questions type
To define a class that will represent a car, which of the following definitions is most appropriate?
(Multiple Choice)
4.9/5
(34)
Having multiple class methods of the same name where each method has a different number of or type of parameters is known as
(Multiple Choice)
4.8/5
(39)
All Java classes must contain a main method which is the first method executed when the Java class is called upon.
(True/False)
4.8/5
(31)
An Employee will have a name, social security number, position, and hourly wages. Define the instance data for this class.
(Essay)
4.8/5
(46)
A method defined in a class can access the class' instance data without needing to pass them as parameters or declare them as local variables.
(True/False)
4.9/5
(33)
An object should be encapsulated in order to guard its data and methods from inappropriate access.
(True/False)
4.8/5
(38)
Regarding the software failure described at the Denver International Airport, it is critical to factor in errors and inefficiencies that always occur in a complex system.
(True/False)
4.9/5
(37)
What are the objects needed in order to create a Java GUI (graphical user interface)?
(Multiple Choice)
4.9/5
(39)
Assume method0 calls method1 and method2, method1 calls method3 which calls method4 and method5. Explain the chain of method calls (what order methods are called and from which method).
(Essay)
4.8/5
(36)
Consider a method defined with the header: public void doublefoo(double x). Which of the following method calls is legal?
(Multiple Choice)
4.9/5
(35)
What visibility modifiers would you use for the methods that move the elevator up one floor, move the elevator down one floor, that request the elevator, and that start the elevator moving?
(Essay)
4.9/5
(40)
Add a constructor to class Box for a cube, which has only 1 parameter, side.
(Essay)
4.9/5
(34)
StringTokenizer is a class in the java.util library that can divide a String based on some delimiter String (a delimiter is a separator). If the instruction StringTokener st = new StringTokenizer(str, "&&"); is executed, where str is some String, then st divides up str into separate Strings whenever
(Multiple Choice)
4.8/5
(37)
The interface of a class is based on those data instances and methods that are declared public.
(True/False)
5.0/5
(43)
The software failure at the Denver International Airport's baggage handling system is a good example of
(Multiple Choice)
4.9/5
(37)
Which of the following reserved words in Java is used to create an instance of a class?
(Multiple Choice)
4.8/5
(42)
Write the statement to instantiate an Box object, blueBox, with a length of 6, width of 4, and height of 2.
(Short Answer)
4.7/5
(39)
Showing 21 - 40 of 56
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)