about

AP Computer Science A is both a college-prep course for potential computer science majors and a foundation course for students planning to study in other technical fields such as engineering, physics, chemistry, and geology. The course emphasizes methodology, procedural abstraction, and in-depth study of algorithms, data structures, and data abstractions, as well as a detailed examination of a large case study program. Instruction includes preparation for the AP Computer Science A exam. In this course, students apply the programming tools they have learned to real-life examples on their own. Computer science is more than just programming; students who successfully complete the course will have an understanding of Java and the ability to adapt to any new programming language that they are taught in college.

notes / updates


October 3, 2025 | GPA Calculuator (a possible solution)
  
    import java.util.*;

public class GPACalculator {

    public static void main(String[] args) {

        Scanner kb = new Scanner(System.in);
        int input; //grade (0 to 100)
        double totalWeight = 0.0;
        double courseWeight;
        double sum = 0.0;

        //Record numerical grade and weight for course 1
        System.out.println("Enter the credits (double) for course 1: ");
        courseWeight = kb.nextDouble();
        totalWeight = totalWeight + courseWeight;
        System.out.println("Enter a grade (0 to 100) for course 1:");
        input = kb.nextInt();

        if (input >=93) {
            sum = sum + courseWeight*4.0;
        } else if (input >=90) {
            sum = sum + courseWeight*3.7;
        }  else if (input >=87) {
            sum = sum + courseWeight*3.3;
        }  else if (input >=83) {
            sum = sum + courseWeight*3.0;
        } else if (input >=80) {
            sum = sum + courseWeight*2.7;
        } else if (input >=77) {
            sum = sum + courseWeight*2.3;
        }  else if (input >=73) {
            sum = sum + courseWeight*2.0;
        }  else if (input >=70) {
            sum = sum + courseWeight*1.7;
        } else if (input >=67) {
            sum = sum + courseWeight*1.3;
        } else if (input >=63) {
            sum = sum + courseWeight;
        } else if (input >=60) {
            sum = sum + courseWeight*0.7;
        } else {
            sum = sum + courseWeight*0.0;
        }

   //reset courseWeight
        courseWeight = 0.0;
        //Record numerical grade and weight for course 2
        System.out.println("Enter the credits (double) for course 2: ");
        courseWeight = kb.nextDouble();
        totalWeight = totalWeight + courseWeight;
        System.out.println("Enter a grade (0 to 100) for course 2:");
        input = kb.nextInt();

        if (input >=93) {
            sum = sum + courseWeight*4.0;
        } else if (input >=90) {
            sum = sum + courseWeight*3.7;
        }  else if (input >=87) {
            sum = sum + courseWeight*3.3;
        }  else if (input >=83) {
            sum = sum + courseWeight*3.0;
        } else if (input >=80) {
            sum = sum + courseWeight*2.7;
        } else if (input >=77) {
            sum = sum + courseWeight*2.3;
        }  else if (input >=73) {
            sum = sum + courseWeight*2.0;
        }  else if (input >=70) {
            sum = sum + courseWeight*1.7;
        } else if (input >=67) {
            sum = sum + courseWeight*1.3;
        } else if (input >=63) {
            sum = sum + courseWeight;
        } else if (input >=60) {
            sum = sum + courseWeight*0.7;
        } else {
            sum = sum + courseWeight*0.0;
        }

        //reset courseWeight
        courseWeight = 0.0;

        //Record numerical grade and weight for course 3
        System.out.println("Enter the credits (double) for course 3: ");
        courseWeight = kb.nextDouble();
        totalWeight = totalWeight + courseWeight;
        System.out.println("Enter a grade (0 to 100) for course 3:");
        input = kb.nextInt();

        if (input >=93) {
            sum = sum + courseWeight*4.0;
        } else if (input >=90) {
            sum = sum + courseWeight*3.7;
        }  else if (input >=87) {
            sum = sum + courseWeight*3.3;
        }  else if (input >=83) {
            sum = sum + courseWeight*3.0;
        } else if (input >=80) {
            sum = sum + courseWeight*2.7;
        } else if (input >=77) {
            sum = sum + courseWeight*2.3;
        }  else if (input >=73) {
            sum = sum + courseWeight*2.0;
        }  else if (input >=70) {
            sum = sum + courseWeight*1.7;
        } else if (input >=67) {
            sum = sum + courseWeight*1.3;
        } else if (input >=63) {
            sum = sum + courseWeight;
        } else if (input >=60) {
            sum = sum + courseWeight*0.7;
        } else {
            sum = sum + courseWeight*0.0;
        }

        //reset courseWeight
        courseWeight = 0.0;

        //Record numerical grade and weight for course 4
        System.out.println("Enter the credits (double) for course 4: ");
        courseWeight = kb.nextDouble();
        totalWeight = totalWeight + courseWeight;
        System.out.println("Enter a grade (0 to 100) for course 4:");
        input = kb.nextInt();

        if (input >=93) {
            sum = sum + courseWeight*4.0;
        } else if (input >=90) {
            sum = sum + courseWeight*3.7;
        }  else if (input >=87) {
            sum = sum + courseWeight*3.3;
        }  else if (input >=83) {
            sum = sum + courseWeight*3.0;
        } else if (input >=80) {
            sum = sum + courseWeight*2.7;
        } else if (input >=77) {
            sum = sum + courseWeight*2.3;
        }  else if (input >=73) {
            sum = sum + courseWeight*2.0;
        }  else if (input >=70) {
            sum = sum + courseWeight*1.7;
        } else if (input >=67) {
            sum = sum + courseWeight*1.3;
        } else if (input >=63) {
            sum = sum + courseWeight;
        } else if (input >=60) {
            sum = sum + courseWeight*0.7;
        } else {
            sum = sum + courseWeight*0.0;
        }

        //reset courseWeight
        courseWeight = 0.0;

        //Record numerical grade and weight for course 5
        System.out.println("Enter the credits (double) for course 5: ");
        courseWeight = kb.nextDouble();
        totalWeight = totalWeight + courseWeight;
        System.out.println("Enter a grade (0 to 100) for course 5:");
        input = kb.nextInt();

        if (input >=93) {
            sum = sum + courseWeight*4.0;
        } else if (input >=90) {
            sum = sum + courseWeight*3.7;
        }  else if (input >=87) {
            sum = sum + courseWeight*3.3;
        }  else if (input >=83) {
            sum = sum + courseWeight*3.0;
        } else if (input >=80) {
            sum = sum + courseWeight*2.7;
        } else if (input >=77) {
            sum = sum + courseWeight*2.3;
        }  else if (input >=73) {
            sum = sum + courseWeight*2.0;
        }  else if (input >=70) {
            sum = sum + courseWeight*1.7;
        } else if (input >=67) {
            sum = sum + courseWeight*1.3;
        } else if (input >=63) {
            sum = sum + courseWeight;
        } else if (input >=60) {
            sum = sum + courseWeight*0.7;
        } else {
            sum = sum + courseWeight*0.0;
        }

        //reset courseWeight
        courseWeight = 0.0;


        System.out.println("The GPA is: " + sum /totalWeight);


    }
}
  


September 23, 2025 | The String class (official documentation)
At the following url find more information about the String class and its features:
https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html
September 23, 2025 | Solution to tonight's homework
 
 
/*
Working with Scanner, String to build a message for the user.
*/
import java.util.*;

public class Interaction {

   public static void main(String[] args) { 

      //variables
      String firstName, lastName, country, favMovie, output;
      int age, siblings;
      Scanner kb = new Scanner(System.in);

      System.out.println("Hi there. What's your first name?");
      firstName = kb.nextLine();
      
      System.out.println("And your last name?");
      lastName = kb.nextLine();
      
      System.out.println("Next, enter your country of origin.");
      country = kb.nextLine();
      
      System.out.println("Next, enter your favorite movie.");
      favMovie = kb.nextLine();
      
      System.out.println("Just two more questions. Next, enter your age.");
      age = kb.nextInt();
      
      System.out.println("And finally, how many siblings do you have?");
      siblings = kb.nextInt();
      
      output = "Hello " + firstName +" "+ lastName +". Nice to meet you.\nYou are from "
      + country +" and your favorite movie is " + favMovie +".\nYou are "+ age +
      " years old, and you indicated that you have " + siblings +" siblings.";
      
      System.out.println(output);
      
      System.out.println();
      
      System.out.println("The message I printed for you in the preceding step contains " 
      + output.length() +" characters.");


   }//end main
} //end class


September 8, 2025
AP registration instructions at this [ link ].
If you think you'll be changing your schedule or dropping the class altogether, please hold off on joining the AP classroom.
For your course section, use join code: Z4E3R6
If you have any questions, contact Mr. Dan Monahan (AP Coordinator).

September 1, 2025 | Introductory note.
Welcome to AP CS A. In this area of the course page we will post important course-related information such as links to resources, announcements, reminders, commentary or feedback on assessments etc. All entries will be dated and the most recent one will be at the top of the page. As far as daily course information goes, the Assignments and Bulletin tabs are the most important.

ap classroom