AP CSA
- Java Style Guidelines
- 必考 Array 算法
Array Algorithms with Different Loop Versions
1. Determine the Minimum or Maximum Value in an Array
Find Maximum Value
2. Compute a Sum or Average of Array Elements
Compute Sum
Compute Average
3. Search for a Particular Element in the Array
Search for the Number 7
4. Determine if At Least One Element Has a Particular Property
Check if at Least One Element is Even
5. Determine if All Elements Have a Particular Property
Check if All Elements are Positive
6. Access All Consecutive Pairs of Elements
7. Determine the Presence or Absence of Duplicate Elements
8. Determine the Number of Elements Meeting Specific Criteria
Count Odd Numbers
9. Shift or Rotate Elements Left or Right
Shift Elements Left by One Position
Shift Elements Right by One Position
10. Reverse the Order of the Elements
1. Using a Two-Pointer Technique
2. Using an Auxiliary Array
加分Project
点这里查看详情
从AP Classroom 中选一个已经做过的 FRQ,写出可执行代码,在blueJay中成功运行,具体要求和评分标准如下:
FRQ Coding Project Rubric / FRQ 编程项目评分标准
Grade | Guidelines | Criteria |
---|---|---|
A+ (9-10) | Exceptional work. Shows clear understanding and full mastery of the problem, and code is executed flawlessly. 出色的作品。展现了对问题的深入理解和完整掌握,代码运行无误。 |
|
A (8) | Excellent work. Code is accurate and runs without errors, with some minor style or completeness issues. 优秀作品。代码正确,运行无误,只有些微样式或完整性问题。 |
|
A- (7) | Strong work, but may have minor flaws in logic or structure. Code generally runs well. 表现良好,但在逻辑或结构上有小瑕疵。代码整体运行正常。 |
|
B+ (6) | Good effort with noticeable flaws. Code runs, but may have errors or inefficiencies. 有明显缺陷的良好尝试。代码可以运行,但可能有错误或低效部分。 |
|
B (5) | Satisfactory but needs improvement. Code has a mix of correct and incorrect results. 基本合格,但需改进。代码结果有正确和错误混合。 |
|
B- (4) | Acceptable, but with significant issues in execution, structure, or clarity. 可接受,但在执行、结构或清晰度上有重大问题。 |
|
C+ (3) | Limited success. Code runs but with minimal correctness, clarity, or efficiency. 成功有限。代码运行,但正确性、清晰度或效率低。 |
|
C (2) | Minimal success. Code compiles, but has many issues in logic and readability. 成功极少。代码可以编译,但逻辑和可读性有很多问题。 |
|
C- (1) | Very limited or incomplete. Code is far from functional and poorly constructed. 极其有限或不完整。代码几乎无法正常运行且结构糟糕。 |
|
Ask for Reflection / 提交时可能问你的问题:
- Why did you choose this particular FRQ? / 为什么选择这个特定的 FRQ?
- How did you approach solving the main problem? / 如何解决主要问题?
- Describe one challenge you faced and how you overcame it. / 描述遇到的一个挑战及如何克服。
Core Concepts:
核心知识点
Java Class Sample:
//This is a Cat class. It is like a blueprint for making Cat objects.
// A class defines the characteristics(color and breed) and actions(meowing) of the objects.
public class Cat{
//Characteristics of the Cat class
//instance variables
private String color;
private String breed;
private int age;
private boolean isHungry;
private String name;
private double weight;
private double height;
// Default Constructor
public Cat(){
//This is a constructor. It is used to create a Cat object
//with some default values.
color = "unkown";
breed = "unkown";
age = 0;
isHungry = true;
}
// Constructor with parameters
public Cat(int a){
age = a;
}
public Cat(int a, String c){
age = a;
color = c;
}
public Cat(String c, int a){
color = c;
age = a;
}
// Methods
public void showAge(){
System.out.println("Age: " + age);
}
public void meow(){
System.out.println("Meow!!!");
}
public void eat(int foodAmount){
System.out.println("I eat " + foodAmount + " a day");
}
// Main method
public static void main(String[] args){
//int num = 2;
//System.out.println("num: " + num);
//int num2 = num;
//System.out.println("num2: " + num2);
//num = 9; //changing num later does not affect num2
//System.out.println("num2 after num change: " + num2);
//System.out.println("num after num change: " + num);
Cat littleCat = new Cat(20, "black");
//System.out.println("littleCat's color: " + littleCat.color);
Cat bigCat = littleCat;
//System.out.println("bigCat's color: " + bigCat.color);
littleCat.color = "pink";
//bigCat.showAge();
bigCat.eat(50);
//System.out.println("littleCat's color after change: " + littleCat.color);
//System.out.println("bigCat's color after change littleCat: " + bigCat.color);
}
}