Exam 4: Defining Classes I
Exam 1: Getting Started45 Questions
Exam 2: Console Input and Output29 Questions
Exam 3: Flow of Control44 Questions
Exam 4: Defining Classes I45 Questions
Exam 5: Defining Classes II46 Questions
Exam 6: Arrays46 Questions
Exam 7: Inheritance43 Questions
Exam 8: Polymorphism and Abstract Classes43 Questions
Exam 9: Exception Handling45 Questions
Exam 10: File IO46 Questions
Exam 11: Recursion44 Questions
Exam 12: Uml and Patterns22 Questions
Exam 13: Interfaces and Inner Classes32 Questions
Exam 14: Generics and the Arraylist Class32 Questions
Exam 15: Linked Data Structures43 Questions
Exam 16: Collections,maps,and Iterators44 Questions
Exam 17: Swing I37 Questions
Exam 18: Swing II31 Questions
Exam 19: Java Never Ends26 Questions
Exam 20: Applets25 Questions
Select questions type
A _________ states what is assumed to be true when the method is called.
Free
(Multiple Choice)
4.7/5
(30)
Correct Answer:
C
Define the terms arguments and parameters.How are they different?
Free
(Essay)
4.9/5
(33)
Correct Answer:
Parameters,also referred to as formal parameters,are used to define the list of variables included in the parenthesis in a method signature.An argument is the value actually sent to the method upon invocation.The terms parameters and argument are very similar in meaning and are often used interchangeably by programmers.The terms differ slightly in that an argument is the actual value that replaces the parameter within the method.
When you give a command to run a Java program,the runtime system invokes the class constructor.
Free
(True/False)
4.8/5
(39)
Correct Answer:
False
Discuss a situation in which it is appropriate to use the this parameter.
(Essay)
4.8/5
(42)
Discuss the importance of accessor and mutator methods and how they apply to the abstraction concept.
(Essay)
4.8/5
(41)
Mutator methods can return integer values indicating if the change of the instance variable was a success.
(True/False)
4.8/5
(45)
An invocation of a method that returns a value can be used as an expression any place that a value of the Type_Returned can be used.
(True/False)
4.8/5
(25)
Two methods that are expected to be in all Java classes are:
(Multiple Choice)
4.8/5
(42)
Discuss the public and private modifiers in context of methods and instance variables.
(Essay)
4.9/5
(39)
The body of a method that returns a value must contain at least one _________ statement.
(Multiple Choice)
4.8/5
(39)
Write preconditions and postconditions for the power method you wrote in question #4.
(Essay)
4.8/5
(38)
Add two constructors to the Appointment class created in question #9.Include a default constructor and a constructor to initialize an Appointment to suitable arguments.
(Essay)
4.9/5
(28)
Write a Java class that represents a Student with instance variables name,id,and gpa.Include constructors,accessor,mutator and any facilitator methods you may need.
(Essay)
5.0/5
(40)
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)
4.8/5
(37)
Showing 1 - 20 of 45
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)