Easy Multiple Choice QuestionsΒΆ

These problems are easier than most of those that you will usually see on the AP CS A exam.

10-12-1: What best describes the purpose of a class’s constructor?

10-12-2: Under which of these conditions is it appropriate to overload a method (ie: the class will contain two methods with the same name)?

10-12-3: 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.

10-12-4: Which of the following is true about abstract classes?

10-12-5: 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?

10-12-6: 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?

10-12-7: 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?