The College Board Advanced Placement™ Computer Science-A Summer Institute: Mr. John Meinzen

Home | Day 1 | Day 2 | Day 3 | Day 4 | Day 5 | Handouts

Morning Session I : Introductions & Understanding the Course [Mark Selections in Handbook]

Key Understanding:

  • RELAX...or at least Don't's only 4 days, not 5

  • AP courses focus on building conceptual understandings through the teaching of linked learning objectives and essential knowledge statements, all contextualized around course-specific Big Ideas.

  • Assessments, instructions, and resources should be aligned to learning goals and matched to performance standards


Resources : three main websites for the week (setup as browser tabs used during each of 4 days):

  1. College Board : official AP CSA course website

  2. John Meinzen's APSI website (these webpages)

  3. Google Drive : files to be generated & shared during APSI


Introductions & Setup: Shared Google Drive : Overview of Week

  • APSI Host

  • Workshop Leader : Edwardsville High School, Mr. John Meinzen

    • What are we doing?

    • This week has a linear progression of Informing, Exploring, Planning, & Improving

    • ...including pedagogical spiraling of "Learning" and "Assessing"....

    • ...and which are scaffolded for new & experienced teachers addressed through...

    • ..."tangential mini-discussion" as questions arise...

    • ...that may interrupt your focus. --> let John know when you need context or time.


  • "Hooking the Students" - Explore and Play a little with the following Computer Science Games :


    • Introduction to Coding (not necessarily Java)

      • -MineCraft [skip video]. Usually used for AP CS Principles as a "drag-n-drop" programming language. Includes daily lessons, videos, tutorials [drag-n-drop], assessments and more.

      • Hour of Code at - Lots of various levels of programming and languages

      • CodeCombat - drag-n-drop coding within a Dungeon-based game setting. Engaging but defaults to Python rather than Java

      • LightBot2.0 - [no longer available in browsers] for basic introduction to graphical programming...requires Flash in browser which is being deprecated...but lives on as an "app" for iPhone and android.

      • Getting Computers Setup -- Editors and IDE's

        • Using BlueJ (or similar) to:

          • Write a Cake recipe (Class or Type) : "I want a Cake recipe that has some eggs, sugar, a description, and whether has chocolate or not."

          • Create a CyberPet or PetRock object : "Create an unique pet for yourself. Make sure it has a name, and at least a few abilities such as run, jump, swim, etc."

        • - basic text editor for Java if Java SDK is installed first. Follows KISS methodology. Nagware.


        • NotePad++ is a text editor that is extensible and flexible but a challenge to configure. Shareware.

        • NotePad++ Installation HOW-TO

          Note: The original HOW-TO instructions provided by under the Creative Common License. This HOW-TO tab is also under the same Creative Common License.


          A NOTE ABOUT JAVA:

          • Please click on the "Java SDK Install" tab for details on installing the necessary software to run and, more importantly, COMPILE java programs. Many computer have "java" pre-installed but not the necessary Java SDK (or JDK) files necessary for programming.

          • If you don't have java SDK (or JDK) installed on your computer please install the Java SDK first before completing the rest of the NotePad++ installation.


          Download and Install NotePad++

          1. Obtain the latest version of NotePad++ from which is available for free.


          Configuring NotePad++to compile and run Java Programs

          1. Verify the NppExec Plugin is installed.

            1. First check the Plugins menu and see if NppExec is already installed...if you don't see NppExec listed on the menue then it must be installed. Continue to steps 2 - 7.

            2. Open NotePad++ and open the Plugin menu (Alt+P)

            3. Plugins->Plugin Manager->Show Plugin Manager.

            4. notepad++-plugin-manger

            5. When you click open Plugin manager you will get a new window with the list of available plugins and installed plugins on your Notepad++

            6. Now search for the plugin named NppExec in the list of available of plugins and install it.

            7. After completion of installing the plugin NotePad++ needs to be restarted to take the changes.

            8. After restating Open Plugin menu (Alt+P) you can find the installed plugin NppExec in the plugin menu.

          2. Settings for the NppExec to be done one-by-one:

            1. Disable  Console command history.

            2. Enable Show Console Dialog.

            3. Enable save all files on execute.

            4. Enable Follow $(CURRENT_DIRECTORY).

          3. To compile your java source code, open the execute window [F6 or by menu: Plugins->NppExec->Execute...]  and enter these command codes.

            • cd $(CURRENT_DIRECTORY)
              javac $(FILE_NAME)


            • Alternatively, If the two lines above do not work, you can enter longer command codes. Make sure there is a space between "...bin\javac" and $(FILE_NAME) **:

              cd $(CURRENT_DIRECTORY)
              C:\Program Files\Java\jdk1.8.0_45\bin\javac $(FILE_NAME)


            • **This assumes Java SDK 1.8.0_45 is installed in the default location at: C:\Program Files\Java\jdk1.8.0_45\bin\ as mentioned in the NOTE ABOUT JAVA

            • Explanation of the above command codes:

              The 1st code line in the above command will change the directory to current directory where your java sourcecode will be saved. After saving your sourcecode, the next command code line will invoke the Java compiler. And the rest is done by Java compiler to translate your java sourcecode into java bytecode (in binary) are now ready to have your java bytecode be run/executed by the java virtual machine (jvm)

          4. Using saved command codes to compile and/or run your java programs...this will save you from having to type in each code line every time:

            1. After completing the command codes in step 4 above and successfully compiling your program, save the two code lines as compileJava so that next time you need not to enter the two command code lines every time you want to compile your programs.

            2. To run your compiled java code enter these command code lines again in temporary code and save as runJava**.


              cd $(CURRENT_DIRECTORY)
              java $(NAME_PART)


              The first line in the above command code is same as the first line of the command to compile your java sourcecode (i.e. use the same directory or folder) and the second line the above command code invokes the java virtual machine (jvm) to run/execute your java bytecode that was compiled in step 2 above.

            3. The following command codes combine the steps 1 and 2 so that you can both compile and run commands in a single step. Save these code lines as compileAndRunJava**.


              cd $(CURRENT_DIRECTORY)
              javac $(FILE_NAME)
              java $(NAME_PART)


              Alternatively, If any of the lines above do not work, you can enter longer command codes. Make sure there is a space between "...bin\javac" and $(FILE_NAME)**:


              cd $(CURRENT_DIRECTORY)
              C:\Program Files\Java\jdk1.8.0_45\bin\javac $(FILE_NAME)

              C:\Program Files\Java\jdk1.8.0_45\bin\java $(NAME_PART)


              **This assumes Java SDK 1.8.0_45 is installed in the default location at: C:\Program Files\Java\jdk1.8.0_45\bin\ as mentioned in the NOTE ABOUT JAVA at the top of this page.

          5. If you choose, you can create menu shortcuts for compiling and running the command codes (i.e. save yourself even more typing):

            1. Open the Plugin menu

            2. click on menu:  Plugin->NppExec->Advanced Options

            3. check the option: Place to macro submenu

            4. as shown below, do the followng three steps for each of the saved command codes (compileJava, runJava, and compileAndRunJava) from step 4 above:

              1. in the Associated script dropdown any one command code script...for example: compileJava

              2. in the Item name: textbox, type the name of one of the saved command code scripts...for example: compileJava

              3. click on Add/Modify button

            5. So that a new menus are created under macros menu, click might have to re-start NotePad++ for the new menus and macros to appear.

          6. If you choose, you can create shortcut keys, for each of the above menu shortcuts for compiling and running the command codes (i.e. save yourself even more typing):

            1. open the Settings menu

            2. click on Settings -> Shortcut Mapper -> Plugin Commands

            3. scroll down to find your menu shortcuts (compileJava, runJava, and compileAndRunJava) from step 5 above and assign your own shortcut keys.
              (I prefer Ctrl+C for compileJava, Ctrl+R for runJava, Ctrl+Alt+R for compileAndRunJava).


Resource changes for the 2020-21 School Year for all (or almost all) AP Course


Resource changes for the 2019-20 School Year for all (or almost all) AP Course : changes for the 2019-20 School Year for all (or almost all) AP Course


    Course and Exam Descriptions (CEDs) :

      • Unit Guides :

        • suggested : sequencing, pacing, and progression of content (similar to chapters in textbooks)

        • suggested : skills and scaffolding techniques

        • coordinates with new online student and teacher resources

        • teachers may order CED online or CED to be provided at APSIs/Workshops

      • content changes : no number base conversions (binary-decimal), abstract classes, or interfaces, clarified autoboxing/unboxing of Double and Integer classes

      • exam changes : reference sheet is now only 1 page!


    AP Classroom : Assessments : online summative & formative

        • Personal Progress Checks for Students as assigned by Teachers as formative assessments.

        • Progress Dashboard for Teachers to identify student skill competencies

        • Question Bank for Teachers to optionally assign problems to students as summative or formative assessments.


    Timeline (usually for AP Coordinator rather than teachers):

      • Online Registration of Students for AP Course Resources & ordering of Spring AP Exams.

        • October 15 : preferred deadline for online registration, $94/exam

        • November 15 : final deadline for online registration without late fee, $94/exam

        • March 13 : final order changes,$94 + $40 per exam late fee (no late fee for 2nd semester-only courses)

        • $40 fee for unused exams

Explore Workshop Resources - Mark the Text in the CED Binder

Course and Exam Description (CED Binder)

  • Page 22 : Course at a Glance

    • 10 Units + Exam Weightings + Number of Classes (assuming 45min periods)--useful for laying out a year-long schedule!!!!

    • Topic List + Big Ideas + Practices/Skills

    • Number of Multiple Choice Questions in Personal Progress Checks

  • Page 27 : Explanation of the structured of each Unit Guides

    • Unit Openers & Unit at a Glance

    • Sample Instructional Activities

    • Topic Pages within each Unit

  • Page 31 : Unit 1 : Primitive Types

  • Page 43 : Unit 2 : Using Objects

  • Page 63 : Unit 3 : Boolean Expressions and if Statements

  • Page 75 : Unit 4 : Iteration

  • Page 87 : Unit 5 : Writing Classes

  • Page 107 : Unit 6 : Array

  • Page 117 : Unit 7 : ArrayList

  • Page 131 : Unit 8 : 2D Array

  • Page 139 : Unit 9 : Inheritance

  • Page 151 : Unit 10 : Recursion

2020 Fall : Course and Exam Description (CED) - official binder

Download the official AP CSA Course and Exam Description.pdf from AP Central : easier to do an electronic search


  1. AP CSA has 4 Big Ideas (Content Standards)

    1. Modularity (MOD) - breaking problems down into interacting pieces, each with their own purpose, makes writing complex programs easier. Object-oriented programming allows us to break complex programs into individual classes and methods.

    2. Variables (VAR) - Information used as a basis for reasoning, discussion, or calculation is referred to as data. Programs rely on variables to store data and on data structures to organize multiple values when program complexity increases.

    3. Control (CON) - Doing things in order, making decisions, and doing the same process multiple times are represented in code by using control structures and specifying the order in which instructions are executed.

    4. Impact of Computing (IOC) - Computers and computing have revolutionized our lives. To use computing safely and responsibly, we need to be aware of privacy, security, and ethical issues. As programmers, we need to understand how our programs will be used and be responsible for the consequences.

  2. AP CSA has 5 Computational Thinking (Practice Standards)

    Each Practice is broken down into Skills (A, B, C, ...)


    1. Program Design and Algorithm Development - determine required code segments to produce a given output.

      Skills [Tested in the Multiple Choice Questions 30-35% of Exam]

      1. Determine an appropriate program design to solve a problem or accomplish a test. (not assessed)

      2. Determine code that would be used to complete code segments.

      3. Determine code that would be used to interact with completed program code.

    2. Code Logic - determine the output, value , or result of given program code given initial values.

      Skills [Tested in the Multiple Choice Questions 40-45% of Exam]

      1. Apply the meaning of specific operators.

      2. Determine the result or output based on statement execution order in a code segment without method calls (other than output).

      3. Determine the result or output based on statement execution order in a code segment containing method calls.

      4. Determine the number of times a code segment will execute.

    3. Code Implementation - Write and implement program code.

      Skills [Tested in the Free Response Questions]

      1. Write program code to create objects of a class and call methods.

      2. Write program code to define a new type by creating a class.

      3. Write program code to satisfy method specifications using expressions, conditional statements, and iterative statements.

      4. Write program code to create, traverse, and manipulate elements in 1D array or ArrayList objects.

      5. Write program code to create, traverse, and manipulate elements in 2D array objects.

    4. Code Testing - Analyze program code for correctness, equivalence, and errors.

      Skills [Tested in the Multiple Choice Questions 12-18% of Exam]

      1. Use test-cases to find errors or validate results.

      2. Identify errors in program code.

      3. Determine if two or more code segments yield equivalent results.

    5. Documention - Describe the behavior and conditions that produce identified results in a program.

      Skills [Tested in the Multiple Choice Questions 12-18% of Exam]

      1. Describe the behavior of a given sement of program code.

      2. Explain why a codes segment will not compile or work as intended.

      3. Explain how the result of program code changes, given a change to the initial code.

      4. Describe the initial conditions that must be met for a program segment to work as intended or described.

  3. AP CSA has Unit Designs

    Unit Designs (i.e. Chapters) help with sequencing, pacing, topic progression, and assessing students on the Big Ideas & Practices.


    ...also allows teachers & students to plan and use as part of AP Classroom's online Question Bank (for Formative and Summative assessments) & Personal Progress Checks (for Formative assessments only)


    1. Unit 1 : Primitive Types [no number base conversions such as binary-decimal]

    2. Unit 2 : Using Objects [added use of Integer & Double auto-boxing/unboxing]

    3. Unit 3 : Boolean Expressions and if Statements

    4. Unit 4 : Iteration

    5. Unit 5 : Writing Classes

    6. Unit 6 : Array

    7. Unit 7 : ArrayList

    8. Unit 8 : 2D Array

    9. Unit 9 : Inheritance [no Interfaces or Abstract classes]

    10. Unit 10: Recursion

  4. AP CSA has 4 newer Labs while retaining 3 older Exemplar Labs.

    • 20 hours minimum for "hands-on structured-labs."

    • Each student should have access to a computer "at least 3 hours a week" as part of Resource Requirement.

    • May use 3 Exemplar Labs if you so choose but not required. Not aligned to 2020Fall CED

      • Magpie Lab - String manipulation

      • Picture Lab - Image manipulation, 2D arrays

      • Elevens Lab - Object-oriented design

    • May use 4 newer 2020 CED Framework-aligned Labs if you so choose but not required.

      • Consumer Review Lab - aimed at FRQ 1 (Methods & Control Structures) including multiple classes, method calling, String manipulation, control stuctures.

      • Celebrity Lab - aimed at FRQ 2 (Class Design) including inheritance, polymorphism, and using objects.

      • Data Lab - aimed at FRQ 3 (Arrays and ArrayLists) including real-world applications and ethical implications.

      • Steganography Lab - aimed at FRQ 4 (2D Arrays and ArrayLists) including expansion of Picture Lab - encrypt/decrypt data within other data. [options to go beyond new CED...binary conversions]

  5. The Exam

    1. 3 hours, afternoon of Friday, May ?, 2022

    2. Two Parts (equal weight, 50% each):

      • 40 Multiple Choice Questions in 1hr 30 min

      • 4 Free Response Questions on the following topics in 1hr 30 min

        • Question 1 : Methods and Control Structures (9 points)

        • Question 2 : Class (9 points)

        • Question 3 : Array/ArrayList (9 points)

        • Question 4 : 2D Array (9 points)

    3. Updated 2020 : Java API Quick Reference provided to students on Exam.

    4. No Lab-specific questions.

  6. Appendices : Java Language Subset, Student Exam Reference & Algorithms for Teachers

    Language (Java) not expected to change until 2024 at earliest (?)...print out and put in Binder Appendix:

    • A - Java Language Subset - Page 1, Page 2, Page 3, Notes 1, Notes 2

    • B - Java Quick Reference - 1 page only! Available to Students during Exam.

    • C - Sample Search & Sort - sequential search, binary search, selection sort, insertion sort, and merge sort. (NOT available to students during Exam)

2020 : Official Resources

AP Classroom - requires: 1) Course Authorization for you (teacher) then 2) Online Digital Activation for students to gain access to

  • Unit Guides (in CED) - optional. Used to "coordinate" online resources.

  • AP Question Bank - optional. Library of real AP Exam questions indexed and referenced to Unit Guides for teachers to create customized tests (online or paper, formative or summative)

  • Personal Progress Checks - formative AP questions for student feedback--cannot be used for teacher evaluations--optionally assigned by teacher. If not assigned by teacher, students cannot access online questions.

  • Progress Dashboard - optional. Used by teacher to review individual student and class progress to identify students who struggle with content and skills over time.


Enhanced Score Reports - Instructional Planning Reports (IPR) for teachers to assess student content and skills on AP Exams.

Workshop Leader's Insights


  • The 2020 Curricular Framework is a re-organization of the historical (pre 2019) AP CSA topic list.

      • Content removed : Interfaces & Abstract Classes, binary conversions

      • Content clarified : autoboxing/unboxing for Integer and Double classes

  • Understanding by Design (UbD) framework is now used across all College Board AP courses :

      • CONTENT : Big Ideas (BI) -> Enduring Understandings (EU) -> Learning Objectives (LO) -> Essential Knowledge (EK)

      • PRACTICE : Computational Thinking Practices -> Skills


    • The written exam is not changing in structure or content but has more the CED for "Task Verbs" Used in Free-Response Questions in Binder (Exam Info tab, approximately page 190)

    • Exam questions are now mapped to the 2020 Curricular Framework.

    • Registration in the fall for students will be a change for teachers depending on your AP Coordinator and use of the new supports for teachers and student.

    • Digital Exam Options: depends on your AP Coordinator. Requires installation of a "locked down browser" but no smart phones.

WHY? :

  • For new AP CSA teachers, the re-format is an improved and more clear structure that is aligned with the new teacher and student supports including alignment of all of the following:

    • Curriculum Framework follows Understanding by Design principles.

      • CONTENT : BI-> EU -> LO -> EK

      • PRACTICE : Computational Thinking Practices -> Skills

    • 10 Unit Guides with sequencing, pacing, and Exam weightings.

    • AP Question Bank can be selectively assigned by teacher to students as practice, Formative Assessments, or Summative Assessments.

    • Personal Progress Checks for Students.

    • Progress Dashboard for Teachers to monitor their classes.


    For experienced AP CSA teachers, there is no need to immediately change a "successful" course. All the new material is optional (except for fall registration) and does not change the topics or the exam.


  • For new AP CSA teachers :

AP Central : resources for supporting new teachers

AP Central CSA Home Page :

  • Important Updates
  • Essential Course Resources (i.e. Course Description, Exam Info, Teacher Guide, FAQ)
  • Audit
  • Professional Development
      • Classroom Resources
  • Higher Education, Policies, Development Committee


AP Central's CSA classroom Resource Page :

  • Additional Curriculum Modules
  • Teaching Units / Projects
  • Ideas, Strategies, Nifty Assignments, etc. from Colleagues
  • Advanced and Special Focus Topics
  • Textbook, website, and software reviews

Morning Session II : Planning the Course [primitives & objects]

Key Understanding:

  • The course framework defines the scope of the course and specifies what students must know and be able to do on the AP Exam.

  • Sequencing, pacing, and scaffolding are essential for building students' understanding and their ability to transfer and apply knowledge and skills to new contexts.

Unit 1 : Primitive Types

  • 8-10 class periods [45 minute periods, 5 days per week]

  • 2.5-5% AP Exam weight

  • Progress Checks : about 25 Multiple Choice Questions



  1. Why Programming? Why Java?

  2. Variables and Data Types

  3. Expressions and Assignment Statements

  4. Compound Assignment Operators

  5. Casting and Ranges of Variables



CED : Unit 1 : Primitive Types : Read all 4 Sample Activities : Error Analysis, Activating..., Sharing..., Predict...


CED : Unit 1 : Primitive Types : Search Con-1.A.8 and Describe how you will teach ArithmeticException.


Add a question/option on shared Google Drive from CED : Unit 1 : Topic 4 or 5


A. Topics 1.1 : Which of the following are correct syntax for declaring a primitive variable type?


  1. Int  count;    // error,  primitive types all start with a lower case letter

  2. int x;         // correct, x can store an integer value, range ±2 billion

  3. double y;      // correct, y can store a real (decimal) value

  4. boolean found; // correct, can be assigned literal values true or false

  5. String name;   // correct, but String is NOT a is a Class



B. What will be the value calculated and assigned (stored) in the variable for each Java expression?


  1. int x = 5 * 4;        // x = 20

  2. int y = 20 / 5;       // y = 4

  3. int w = 5 / 20;       // w = 0 HINT: integers have no decimal points

  4. int z = 20 % 5;       // z = 0  The ‘%’ modulus operator is a division remainder

  5. double a = 2.0 / 3.0; // a = 0.6666666 (CHALLENGE: almost correct!)

  6. double b = 2 / 3;     // b = 0  HINT: 2 and 3 are integers


C. Have students create their own expressions as above using other arithmetic operators in Java.  Have each check the others on a computer to verify their answers!


Java arithmetic operators are: +, -, *, /, %

Shortcuts include:  ++, --, +=, -=, *=, /=, %=


  1. double c = ( 3 + 4 ) / 6;   <      // c = 1.0 HINT: integer operators

                                       // calculated first then cast to double

  2. int x = (int) ((3.0 + 7 ) / 2.0);  // x = 5

  3. int y = x++  * ++x                 // Multiple assignments is BAD practice!!

Unit 2 : using Objects

  • 13-15 class periods [45 minute periods, 5 days per week]

  • 5-7.5% AP Exam weight

  • Progress Checks : about 25 Multiple Choice Questions



  1. Objects: Instances of Classes

  2. Creating and Storing Objects (Instantiation)

  3. Calling a Void Method

  4. Calling a Void Method with Parameters

  5. Calling a Non-void Method

  6. String Objects: Concatentation, Literals, and More

  7. String Methods

  8. Wrapper Classes: Integer and Double

  9. Using the Math Class



  • CED : Unit 2 : Read 3 Sample Activities with focus on Pedagogy :

    • Manipulatives

    • Marking Text :

      • Identify the CS Terminology in the following Java statement :

        • class, variable/object, assignment, keywords (2), constructor/method

        • declaration, instantiation

      • private PetRock myPet1 = new PetRock();

    • Think-Pair-Share

    • Pedagogical mappings are inthe CED : "Instructional Strategies"


    Modeling Objects:

    • Chef's Recipe - ingredients & instructions

    • Mathematics - numbers and operators (or variables and functions)

    • English Language - nouns & verbs

      • "I want two PetRocks that each have a name, a number of eyes and can eat and sleep."

    • Java - variables & methods

      • // declaring and instantiating a 2nd object
        private PetRock myPet2 = new PetRock();

      •;             // calling a void method on 1st object

      • myPet2.sleep();           // calling a void method on 2nd object

      • myPet2.getName();         // calling a non-void method on 2nd object

      • myPet1.setName("Lassie"); // method call with a literal String parameter

  • Modeling Class Abstractions (i.e. introducing a Challenging Concept)

    • Chef versus cook

    • Writer versus adventurer

    • Type versus instance

    • Class versus object

  • Participant Ideas to add to the shared drive/file for Unit 2

    1. Generate an OOP analogy for your students.

    2. Find a List of Java Reserved Words (and AP CSA subset).

    3. Student Terminology List with explanations and/or categorized [ex: abstraction vs realized]

    4. Add to the "Rules of Three" list

Afternoon Session I : Teaching the Course : [conditionals & iteration]

Key Understanding:

  • Utilizing effective instructional strategies, like debriefing, helps develop the course skills and content knowledge.

Unit 3 : Boolean Expressions and if Statements

  • 11-13 class periods [45 minute periods, 5 days per week]

  • 15-17.5% AP Exam weight

  • Progress Checks : about 20 Multiple Choice + 1 Free-Response Questions



  1. Boolean Expressions

  2. if Statements and Flow Control

  3. if-else Statements

  4. else if Statements

  5. Compound Boolean Expressions

  6. Equivalent Boolean Expressions

  7. Comparing Objects


Activities : Identify Essential Knowledge and Instructional Strategy

  1. Resources :

  2. CED : Unit 3 : Find the meaning of Con-1.E.1 and the != relation operator.

  3. CED : Unit 3 : Read all 5 Sample Activities & Explain Instructional Strategies (lookup "Instructional Strategies" mappings):

    • Code Tracing

    • Pair Programming

    • Diagramming

    • Student Response System

    • Predict and Compare

  4. Add an Idea to shared drive for Unit 3 : Topics 3.6 or 3.7

Scenario 1 : Basic Overtime

In some jobs, if you work more than 40 hours in a week, you get "time-and-a-half." This means your hourly pay rate is 1.5 times your normal pay rate for the hours worked after the first 40 hours in a week. Identify which (if any) of the following code segments would calculate your correct wages for the week. Assume you are normally paid $12/hour and the variable hours specifies the number of hours you worked during the week. (HINT: "if any")


Solution I

Solution II

if (hours < 40)

     pay = 12*hours;


     pay = 1.5*12*hours;

if (hours >= 40)

     pay = 12*hours;


     pay = 480 + 1.5*12*hours;


Solution III


Solution IV

if (hours < 40)

     pay = 12*hours;


     pay = 480 + 1.5*12*hours;

if (hours >= 40)

     pay = 1.5*12*(hours-40);


     pay = 12*hours;


Scenario 2 : Complex Overtime

As in Scenario 1, if you work more than 60 hours in a week, you get "double time." This means your hourly pay rate is 2 times your normal pay rate for the hours worked after the first 60 hours in a week. With a partner, write and test the code to calculate your correct wages for the week. Assume you are normally paid $12/hour and the variable hours specifies the number of hours you worked during the week.

One possible answer

if (hours < 40)

     pay = 12*hours;

else if (pay < 60)

     pay = 12*40 + 1.5*12*(hours-40);


     pay = 12*40 + 1.5*12+20 + 2*12*(hours-60);

Unit 4 : Iteration

  • 14-16 class periods [45 minute periods, 5 days per week]

  • 17.5-22.5% AP Exam weight

  • Progress Checks : about 15 Multiple Choice + 1 Free-Response Questions



  1. while Loops

  2. for Loops

  3. Developing Algorithms Using Strings

  4. Nested Iteration

  5. Informal Code Analysis


Activities : Code Tracing using Memory Maps and Logic Errors

CED : Unit 4 : Read 3 Sample Activities


  1. Identify : initialize LCV, test LCV, update LCV then predict output.

    Loop #1

    for (int i=0; i<5; i++)





    Loop #2

    int x = 1;

    while (x < 5)





  2. Demonstrate Code Tracing and Memory Mapping with Strings.

    Explain why the following will NOT list every character in the String.


    String name = "Abraham Lincoln";

    int count = 1;

    while (count < name.length)






    Write the code to print out each letter & count the letters in the first name.

    • Hint: String.indexOf(String)


    Advanced: Write the code to print out each letter in reverse order for the last name.

  3. Error Analysis : Syntax, Logic, and Infinite Loops

    Loop #1

    for (int i=0; i<5; i++) ;





    Loop #2

    int x = 1;

    while (x < 5)





    Loop #3

    int a = 5;

    while (a<1)







Explore the Chatbot Lab:

  • For each Exemplar Lab, the handbook is organized according to:

    • Teacher Guide

      • learning objectives & Course Description topics addressed

      • required setup & estimated time

      • Student Activities & solutions

      • practice assessment questions (MC & FR) along with answers

      • optional extensions

    • Student Guide - based upon each Student Activity, teachers can assign students:

      • preparation information

      • guided questions

      • explorations

      • exercises

  • Magpie Lab near pages 193 (4 Student Activities, 1 optional)

    • focus on String manipulation & conditionals in a text-based human-computer "discussion"

      • A1 - understanding Magpie-type programs

      • A2 - running Magpie

      • A3 - keyword detection

      • A4 - Student Transformations "I want..." leads to "Do you really want..."

      • A5 - ArrayList option

Afternoon Session II : Teaching the Course [Writing classes]

Key Understanding:

  • Building understanding and teaching for transfer require the application of content in new real-world, authentic contexts and scenarios.

  • Helping students develop mastery of the course skills requires careful planning to sequence skills in a developmentally appropriate way so that students master prerequisite skills before being asked to complete more complex tasks.

  • Students need multiple opportunities to practice skills in order to develop mastery over time.

  • Students should be progressively challenged, just beyond where they are, to apply their knowledge and skills in different contexts to deepen their understanding.

Unit 5 : Writing Classes

  • 12-14 class periods [45 minute periods, 5 days per week]

  • 5-7.5% AP Exam weight

  • Progress Checks : about 20 Multiple Choice + 1 Free-Response Questions



  1. Anatomy of a Class

  2. Constructors

  3. Documentation with Comments

  4. Accessor Methods

  5. Mutator Methods

  6. Writing Methods

  7. Static Variables and Methods

  8. Scope and Access

  9. this Keyword

  10. Ethical and Social Implications of Computing Systems [not tested]



  • CED : Unit 5 : Read all 4 Sample Activities

  • Add to the shared drive/file in Unit 5 your ideas

  • JavaBeans Assignment

    For each sentence, students should :

    1. identify the class (program name)

    2. identify the nouns

    3. declare (write) the field variables & their types

    4. declare (write) the accessor & mutator methods (i.e. "get" & "set" methods)

    JavaBeans Example

    "I want a program that creates a Cake that has a certain amount of sugar and with a specified height as well as a description for the cake and whether it is a chocolate cake or not."


    1. identify class: Cake

    2. identify nouns: sugar, height, description, chocolateCake

    3. declare variables & types:

      • private int      sugar;
        private double   height;
        private String   description;
        private boolean  chocolateCake;

    4. declare accessor & mutator methods (i.e. "get" and "set")

      • /**
        * The getSugar() accessor method return the amount of
        * sugar in this object's Cake.
        public int getSugar()
             return sugar;

        public double getHeight()
             return height;

        public String getDescription()
             return this.description;

        public boolean getChocolateCake()
             return this.chocolateCake;

        * The setSugar() mutator method takes a double parameter
        * to change the amount of sugar in this object's Cake.
        public void setSugar(int s)
             this.sugar = s;

        public void setHeight(double h)
             this.height = h;

        public void setDescription(String d)
             this.description = d;

        public void setChocolateCake(boolean c)
             chocolateCake = c;

    JavaBeans Practice (easier to more challenging):

    1. I want a program that creates a Tree that has a number of branches, leaves and a height as well as whether it is coniferous or not.

    2. I want a program that creates an Animal that has a size, a number of legs, name and whether it is a mammal or not.

    3. I want a program that represents a PlayingCard that has a suit and a value, a face image and a back image (use the ImageIcon class found by> import javax.Swing.*;

    4. I want a program that creates a SuperHero that has a power level, an IQ, a description of abilities, and whether it wears armor or not.

    5. I want a program that creates a mythological creature that has a size, holds 2 objects described by the above 5 (i.e. holds a flower & cake), a description and a name.

    6. I want a program that creates a Tardis that has two SuperHeroes, an Animal and a Mythological creature as well as another Tardis.

  • Create your own Type of Pet by:

      • Draw UML diagram containing the Type of pet including variables so that your pet "HAS" two exclusive boolean variables and a name as well as methods to change the boolean variables.

      • Program your pet using BlueJ (basic), Textpad, (Notepad++), or Eclipse (professional) which will require a main() method.

      • Compile and Test your Pet using BlueJ, Textpad, Notepad++, or Eclipse.

      • Create a PetOwner class--with a main() method--to test several instances (instantiate) of your Pet using Eclipse. [i.e. PetOwner HAS two Pets]

Resources for Demonstrating OOP Programming to Students

  • Using BlueJ (or similar) to:

    • Practice :

      • Write a Cake recipe (Class or Type)

      • Create a CyberPet or PetRock object

    • Focus on basic Class design (& UML) and differentiate objects from Classes

      • field variables : Strings & booleans

      • methods: accessors & mutators

  • - basic text editor for Java if Java SDK is installed first. Follows KISS methodology. Nagware.


  • NotePad++ is a text editor that is extensible and flexible but difficult to configure. Shareware.


Daily Checkout Form for Day 1