Exam 8: Objects and Classes
Exam 1: Introduction96 Questions
Exam 2: Fundamental Data Types103 Questions
Exam 3: Decisionseasy99 Questions
Exam 4: Loops100 Questions
Exam 5: Methods94 Questions
Exam 6: Arrays and Arraylists100 Questions
Exam 7: Inputoutput and Exception Handling100 Questions
Exam 8: Objects and Classes101 Questions
Exam 9: Inheritance and Interfaces99 Questions
Exam 10: Graphical User Interfaces54 Questions
Exam 11: Advanced User Interfaces91 Questions
Exam 12: Object-Oriented Design100 Questions
Exam 13: Recursion100 Questions
Exam 14: Sorting and Searching99 Questions
Exam 15: The Java Collections Framework100 Questions
Exam 16: Basic Data Structures94 Questions
Exam 17: Tree Structures100 Questions
Exam 18: Generic Classes78 Questions
Exam 19: Streams and Binary Inputoutput82 Questions
Exam 20: Multithreading82 Questions
Exam 21: Internet Networking74 Questions
Exam 22: Relational Databases75 Questions
Exam 23: XML74 Questions
Exam 24: Web Applications74 Questions
Select questions type
You have created a ShoppingCart class and a Fruit class. Which of the following will correctly declare an array list of Fruit objects in the ShoppingCart class?
(Multiple Choice)
4.8/5
(34)
Which of the following statements about a class is correct?
(Multiple Choice)
4.8/5
(41)
Consider the following code snippet:
Public class Vehicle
{
Private String model;
Private double rpm;
) . .
}
Which of the following methods would correctly remove the values of the class instance variables?
(Multiple Choice)
4.9/5
(30)
Which of the following declares a rpmRating instance variable for a Motor class that stores an integer value?
(Multiple Choice)
4.9/5
(41)
Which of the following is NOT part of the declaration of an instance variable?
(Multiple Choice)
4.9/5
(43)
Which of the following statements using data values in a class is NOT correct?
(Multiple Choice)
4.9/5
(35)
Insert the missing code in the following code fragment. This fragment is intended to initialize an instance variable.
Public class Employee
{
Private String empName;
) . .
Public Employee(String empName)
{
________
}
}
(Multiple Choice)
4.8/5
(35)
The object on which a method is invoked is called the ____.
(Multiple Choice)
4.8/5
(35)
Which of the following is a mutator method of the CashRegister class used in the textbook?
(Multiple Choice)
4.9/5
(39)
Consider the following code snippet:
Public class Student
{
Private static int lastAssignedStudentNum = 1500;
{ ) . . }
}
Which of the following statements about this code is correct?
(Multiple Choice)
4.9/5
(41)
You have created a Coin class and a Purse class. Which of the following will correctly allow the Purse class to collect Coin objects?
(Multiple Choice)
4.9/5
(43)
Consider the following code snippet:
Public class Vessel
{
Private String type;
Public String Vessel(String type)
{
) . .
}
}
What is wrong with this code?
(Multiple Choice)
4.8/5
(33)
Which of the following is an accessor method of the CashRegister class used in the textbook?
(Multiple Choice)
4.7/5
(41)
Consider the following code snippet:
Public class Employee
{
Private String empName;
Public String getEmpName()
{ ) . . }
}
Which of the following statements is correct?
(Multiple Choice)
4.7/5
(39)
Consider the following code snippet:
Public class AutoRace
{
Private int lapCount;
Private double totalTime;
) . .
}
Which of the following completeLap methods would correctly track how many laps occurred?
(Multiple Choice)
4.7/5
(37)
You are creating a class named Vessel. Which statement correctly declares a constructor for this class?
(Multiple Choice)
4.7/5
(27)
Which of the following statements about encapsulation is correct?
(Multiple Choice)
4.7/5
(29)
Showing 61 - 80 of 101
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)