Beruflich Dokumente
Kultur Dokumente
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.