Sie sind auf Seite 1von 4

Lesson Plans 2: Week of Friday, April 13, 2012 Todd Ollendyke

AP Programming Languages - Independent Study


Monday: Meet with students to set up meeting times. Students will be in different periods and need to get the agenda, login, etc. Tuesday: Student will demonstrate use of use Java primitives. Students will use existing classes in the Java framework. Students will use the Java API to find methods and class definitions. Intro to Eclipse Have the class login and go over some of the functionality of eclipse. Students will list similarities between Java and C++ Students will write their first java program. Students will describe the need for a main class in all java programs. Sample program development and exploration of the eclipse environment including auto-complete and new class creation. Make sure that students know the auto-completion tools and how to organize imports. Introduce the primitives in Java and the API. Students should be familiar with how to search the API for methods in pre-existing classes in Java. They should bookmark the API I their browsers. Wednesday - Thursday: Students define their own classes. Work days on the assignment. Monitor and correct/explain as they work on the BankAccount class. Make sure that students look at correct forms of program for weekly assignments their programs should have similarities in style and function. Friday: Students will explain the purpose and syntax for casting datatypes. Students will enumerate and use a list of static math functions. Students will explain what happens in memory when one abject is assigned to another object and explain how it is different from primitive assignments. Students will create classes to model given conditions and properties. Go over the examples of creating BankAccounts and assigning one to another. Look at what happens in memory for each. Students can then continue working on the programs for the week.

Programming Languages 1
Monday: Algorithms and programming http://xkcd.com/627/ Show the flowchart and discuss its meaning to the students. What is an algorithm? How does it relate to programming? How is this an algorithm? Have students list some other algorithms for non-technology things. Assuming that you drive, whats the algorithm for parallel parking your car? Any things have a certain order? Any things ever get repeated? Are there decisions made in driving? Assuming youve ever cooked, how do you make a scrambled egg? Any things have a certain order? Any things ever get repeated? Are there decisions made in making an egg? These things will be the focus of our first nine semester and the big question in programming. How do I solve this problem? - What steps are needed to solve it? What parts are done in order? What parts require the program to make decisions? What parts can be repeated to make the task easier? Show the BlendedSchools page that students will use as a reference. Tomorrow we will start with the computer work. You will need to pick a computer that you will use EVERYDAY. Your work will reside partially on that computer and partially on your network space. Tuesday: Start with C++ Students will start the C++ environment and will begin a project. Students will code simple output in their program. Students will explain the header lines in a standard C++ program. Get students logged in to the computers and launch Visual Studio Express. Go over the steps in creating a project and a first program. Give them code for the Hello World program. Have them run the program, fix any errors that ensue, save it and then make changes to the program.

Quit and launch C++ again. Open the project and create a NEW C++ file to print some information. Save, compile and run.

Wednesday:

Information on working with numeric data and arithmetic operators. After this topic students will:

Output numeric values with and without decimal places Identify and perform calculations with the arithmetic operators +, -, *, /, and % Write programs to solve simple problems in a linear fashion.

Go over the use of numeric data in cout << expressions. cout << 1 << 2<< 3 cout << 1+2 cout<<1/2 cout<<1.1*2.2 Look at MANY examples of modulus arithmetic with integers. Students will need to know how mod (%) works with two integers.
Thursday: Workday: Students will work on programs. The teacher will circulate, troubleshooting, looking for proper style and all elements of the program. Friday:

Introduction of data types, creating and assigning variables and use of variables in programs. After this topic students will:

Define the term variable. Define the primitive data types of int, char, bool, and double. Declare single variables of each type and multiple variables of the same type. Assign variables in the declaration line and as a separate statement. Use variables in calculations and store the results in new variables. Distinguish between equals and gets.

Cover this material on the board with examples and student interaction. Let some of them play variables they have a name, they can store something of a specific type, they can tell me what they store and we can change what they store. int x = 5; cout << x << endl; cout << x+2 <<endl; int y=x; x=15; cout <<x << y<< endl; x = x+4; cout <<x << y<< endl;

Go over the rules for naming variables. Any remaining time can be for the students to continue working on programming assignments.

Das könnte Ihnen auch gefallen