輔無憂老師能分享AP計(jì)算機(jī)科學(xué)考試真題嗎?
隨著留學(xué)大軍的不斷膨脹,越來越多學(xué)生選擇讀國際課程去海外留學(xué),一些對計(jì)算機(jī)、工程、數(shù)學(xué)類專業(yè)感興趣的學(xué)生,會在AP課程選擇時(shí)關(guān)注計(jì)算機(jī)科學(xué),近期有學(xué)生在尋找AP課程輔導(dǎo),在我們官網(wǎng)詢問:輔無憂老師能分享AP計(jì)算機(jī)科學(xué)考試真題嗎?
自然是可以的,這里輔無憂給大家簡單分享部分2019年的AP計(jì)算機(jī)科學(xué)考試真題,供學(xué)生們參考:
Section I: Multiple Choice
1.Which of the following Java statements is equivalent to
!(x > 0 || x < 10)
A. !x > 0 && !x < 10
B. !(x > 0) || !(x < 10)
C. !(x > 0) && !(x < 10)
D. !x > 0 || !x < 10
E. None of the above
2.Which of the following method headings correctly defines a method that accepts an integer array as a parameter and returns the sum of the elements in the array?
A. public int sum(int[] nums)
B. public int[] sum(int[] nums)
C. public void sum(int[] nums)
D. public int[] sum(int nums[])
E. public int sum(int nums[])
3.What is the output of the following code segment?
int[][] arr = {{2, 4}, {6, 8}};
for (int i = 0; i < arr.length; i++) {
for (int j = 0; j < arr[i].length; j++) {
System.out.print(arr[i][j] + " ");
}
}
A. 2 4 6 8
B. 2 6 4 8
C. 4 2 8 6
D. 4 8 2 6
E. 6 2 8 4
4.Consider the following class hierarchy:
public class Animal {}
public class Mammal extends Animal {}
public class Reptile extends Animal {}
public class Dog extends Mammal {}
public class Cat extends Mammal {}
public class Snake extends Reptile {}
Which of the following statements is NOT true?
A. Dog is a Mammal.
B. Snake is an Animal.
C. Cat is a Reptile.
D. Reptile is an Animal.
E. None of the above.
5.What is the output of the following code segment?
String str1 = "apcs";
String str2 = "apcs";
String str3 = new String("apcs");
System.out.print(str1 == str2);
System.out.print(str1 == str3);
System.out.print(str1.equals(str2));
System.out.print(str1.equals(str3));
A. truefalsefalsefalse
B. truetruetruefalse
C. truefalsetruefalse
D. falsetruefalsetrue
E. falsefalsetruefalse
Section II: Free Response
1.Write the code for a recursive method that takes a non-negative integer n as a parameter and returns the nth Fibonacci number, where the first two Fibonacci numbers are 0 and 1.
2.A class named ComboLock has a three-digit combination lock. The lock is opened by turning the dial to the right, then to the left, and then to the right again. When the lock is turned to the right, the dial must be turned clockwise to the first digit in the combination. When the lock is turned to the left, the dial must be turned counter-clockwise to the second digit in the combination. Finally, when the lock is turned to the right again, the dial must be turned clockwise to the third digit in the combination. The ComboLock class should have the following methods:
public ComboLock(int secret1, int secret2, int secret3) - Constructor that initializes the combination to the values of the three parameters.
public void reset() - Resets the dial so that it points to 0.
public void turnRight(int ticks) - Turns the dial clockwise the specified number of ticks. A tick is a unit of the combination lock, and the dial has 40 ticks labeled 0 through 39.
public void turnLeft(int ticks) - Turns the dial counter-clockwise the specified number of ticks.
public boolean open() - Returns true if the lock can be opened (the dial is pointing to the correct combination), false otherwise.
Write the complete ComboLock class. You may assume that all parameters passed to the methods are valid (i.e., non-negative integers). Note that you only need to implement the methods listed above, not the entire class.
輔無憂老師能分享AP計(jì)算機(jī)科學(xué)考試真題嗎?上面已經(jīng)給大家分享了部分真題內(nèi)容,應(yīng)對任何考試,學(xué)生想要高分通過,都需要不斷練習(xí)真題,當(dāng)然也可以尋找國際課程輔導(dǎo)的幫助,如果你正好有AP計(jì)算機(jī)科學(xué)輔導(dǎo)等需求,可以隨時(shí)向輔無憂尋求輔導(dǎo)幫助。
本文鏈接:http://www.m6730.cn/shows/52/3364.html
輔無憂教育版權(quán)所有,未經(jīng)書面授權(quán),嚴(yán)禁轉(zhuǎn)載。
- IB課程
- AP課程
- A-level課程
- IGCSE/GCSE課程
- 專業(yè)課程預(yù)習(xí)
- 入學(xué)筆試面試
- 海外選課輔導(dǎo)
- 學(xué)術(shù)論文寫作
- 課程同步輔導(dǎo)
- 作業(yè)習(xí)題輔導(dǎo)
- 考試沖刺輔導(dǎo)
- 論文寫作輔導(dǎo)

- 新南威爾士大學(xué)可再生能源工程課程考試... 2025-05-12
- 謝菲爾德大學(xué)數(shù)字媒體與社會作業(yè)輔導(dǎo)哪... 2025-05-12
- 墨爾本大學(xué)法律課程考試輔導(dǎo)費(fèi)用 2025-05-12
- 莫納什大學(xué)國際關(guān)系考試輔導(dǎo)哪家好? 2025-05-12
- 澳洲墨大補(bǔ)考哪家能輔導(dǎo)? 2025-05-12
- 新加坡科廷大學(xué)會計(jì)和財(cái)務(wù)課程學(xué)習(xí)常見... 2025-05-12
- 紐約大學(xué)MGGY6203作業(yè)完成難點(diǎn) 2025-05-12
- 如何準(zhǔn)備利物浦大學(xué)碩士論文寫作? 2025-05-12
- 倫敦大學(xué)亞非學(xué)院論文寫作水平怎么提升 2025-05-12
- 渥太華大學(xué)掛科申訴避坑技巧 2025-05-12
