What best describes the purpose of a class’s constructor?
Under which of these conditions is it appropriate to overload a method (ie: the class will contain two methods with the same name)?
Which of the following statements about a class that contains an abstract method is (are) true?
I. You can’t have any constructors in this class.
II. This class must be declared as abstract.
III. You can’t declare any fields in this class.
Which of the following is true about abstract classes?
A car dealership needs a program to store information about the cars for sale. For each car, they want to keep track of the following information: number of doors (2 or 4), whether the car has air conditioning, and its average number of miles per gallon. Which of the following is the best design?
A program is being written by a team of programmers. One programmer is implementing a class called
Employee; another programmer is writing code that will use the
Employee class. Which of the following aspects of the public methods and fields of the
Employee class does not need to be known by both programmers?
A bookstore is working on an on-line ordering system. For each type of published material (books, movies, audio tapes) they need to track the id, title, author(s), date published, and price. Which of the following would be the best design?