历年AP Computer Science计算机科学系列
真题与答案下载
翰林国际教育全网首发
力争超快速发布最全资料
助你在升学路上一帆风顺
为你的未来保驾护航
2012 AP Computer Science A Free-Response Questions Free Download
2012 AP 计算机科学A简答题部分免费下载
此套题仅 Section II含有简答题,
共计时1小时45分钟,共4题
占总分50%
每道大题可能含有不同数量的小题
完整版下载链接见文末
部分真题预览:
1)A mountain climbing club maintains a record of the climbs that its members have made. Information about a climb includes the name of the mountain peak and the amount of time it took to reach the top. The information is contained in the ClimbInfo class as declared below.
The ClimbingClub class maintains a list of the climbs made by members of the club. The declaration of the ClimbingClub class is shown below. You will write two different implementations of the addClimb method. You will also answer two questions about an implementation of the distinctPeakNames method.
- Write an implementation of the ClimbingClub method addClimb that stores the ClimbInfo objects in the order they were added. This implementation of addClimb should create a new
ClimbInfo object with the given name and time. It appends a reference to that object to the end of climbList. For example, consider the following code segment.
When the code segment has completed executing, the instance variable climbList would contain the following entries.
Complete method addClimb below. - Write an implementation of the ClimbingClub method addClimb that stores the elements of climbList in alphabetical order by name (as determined by the compareTo method of the String class). This implementation of addClimb should create a new ClimbInfo object with the given name and time and then insert the object into the appropriate position in climbList. Entries that have the same name will be grouped together and can appear in any order within the group. For example, consider the following code segment.
When the code segment has completed execution, the instance variable climbList would contain the following entries in either of the orders shown below.
You may assume that climbList is in alphabetical order by name when the method is called. When the method has completed execution, climbList should still be in alphabetical order by name.
Complete method addClimb below.
完整版真题下载链接请注册或登录后查看
文件为PDF格式
推荐使用电脑下载
2012 AP Computer Science A 计算机科学FRQ简答题完整版答案免费下载
请持续关注,稍后更新
翰林学员全站资料免费打包下载,专享高速下载通道。