Exam 4: Defining Classes I
Exam 1: Getting Started46 Questions
Exam 2: Console Input and Output29 Questions
Exam 3: Flow of Control43 Questions
Exam 4: Defining Classes I44 Questions
Exam 5: Defining Classes Ii46 Questions
Exam 6: Arrays47 Questions
Exam 7: Inheritance43 Questions
Exam 8: Console Input and Output43 Questions
Exam 9: Exception Handling45 Questions
Exam 10: File IO46 Questions
Exam 12: Uml and Patterns22 Questions
Exam 13: Interfaces and Inner Classes32 Questions
Exam 14: Generics and the Arraylist Class31 Questions
Exam 15: Linked Data Structures43 Questions
Exam 16: Collections and Iterators44 Questions
Exam 17: Swing I37 Questions
Exam 18: Swing II31 Questions
Exam 19: Java Never Ends18 Questions
Exam 11: Recursion43 Questions
Exam 20: Applets25 Questions
Select questions type
Mutator methods can return integer values indicating if the change of the instance variable was a success.
(True/False)
4.9/5
(25)
In a method invocation,there must be exactly the same number of arguments in parentheses as there are formal parameters in the method definition heading.
(True/False)
5.0/5
(28)
When you give a command to run a Java program,the runtime system invokes the class constructor.
(True/False)
4.9/5
(33)
Method overloading is when two or more methods of the same class have the same name but differ in number or types of parameters.
(True/False)
4.9/5
(34)
Write a method called Greeting that displays a personalized greeting given a first name.
(Essay)
4.8/5
(34)
Write a Java method that returns the value of PI,where PI = 3.1415926535.
(Essay)
4.9/5
(43)
The modifier private means that an instance variable can be accessed by name outside of the class definition.
(True/False)
4.7/5
(38)
Write a method called isEqual that returns a Boolean value.The method compares two integers for equality.
(Essay)
4.9/5
(37)
A variable whose meaning is confined to an object of a class is called:
(Multiple Choice)
4.8/5
(36)
Create a class named Appointment that contains instance variables startTime,endTime,dayOfWeek (valid values are Sunday through Saturday),and a date which consists of a month,day and year.All times should be in military time,therefore it is appropriate to use integers to represent the time.Create the appropriate accessor and mutator methods.
(Essay)
5.0/5
(37)
Discuss a situation in which it is appropriate to use the this parameter.
(Essay)
4.8/5
(35)
A more eloquent approach in implementing mutator methods is to return a ________ value.
(Multiple Choice)
4.8/5
(41)
When you want the parameters in a method to be the same as the instance variables you can use the _____ parameter.
(Multiple Choice)
4.8/5
(27)
Write preconditions and postconditions for the power method you wrote in question #4.
(Essay)
4.8/5
(44)
Showing 21 - 40 of 44
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)