历年 Computer Science计算机科学系列
2009 Computer Science A Released Exam Multiple Choices Free Download
此套题仅 Section I含有选择题，
2）A teacher put three bonus questions on a test and awarded 5 extra points to anyone who answered all three bonus questions correctly and no extra points otherwise. Assume that the boolean variables bonusOne, bonusTwo, and bonusThree indicate whether a student has answered the particular question correctly. Each variable was assigned true if the answer was correct and false if the answer was incorrect.
Which of the follow code segments will properly update the variable grade based on a student's performance on the bonus questions?
- I only
- II only
- III only
- I and III
- II and III
5)When designing a class hierarchy, which of the following should be true of a superclass?
- A superclass should contain the data and functionality that are common to all subclasses that inherit from the superclass.
- A superclass should be largest, most complex class from which all other subclasses are derived.
- A superclass should contain the data and functionality that a re only required for the most complex class.
- A superclass should have public data in order to provide access for the entire class hierarchy.
- A superclass should contain the most specific details of the class hierarchy.
38)Consider the following segment.
Which of the following best describes why the phrase "Mathematical error!" would be printed? (Remember that mathematically (a+b)*(a-b)= a2 - b2.)
- Precedence rules make the if condition true.
- Associativity rules make the if condition true.
- Roundoff error makes the if condition true.
- Overflow makes the if condition true.
- A compiler bug or hardware error has occurred.
2009 AP Computer Science A 计算机科学公开卷MC选择题完整版答案免费下载