Object-oriented programming - a job

Teaching plan

First, the issue

Other control statements of learning C ++.

Second, the purpose of teaching

Consolidate break, continue and meaning of the goto statement, correctly and flexibly use these statements in the algorithm.

Third, the class type

The course is part of the new medium, to remind students to seriously take notes

Four hours

A lesson

Fifth, teaching points

Proper use of the statement mentioned in this lesson

Sixth, teaching difficult

Understand the role of each statement, and can skillfully done correctly distinguish related topics

Seven, the purpose of teaching

(1), into new courses

1, spent three minutes, ask students to understand the extent of these three statements
2, cut from the English statement further explained the meaning of the statement keyword terms the role of
3, to explain the meaning, using examples to consolidate the role of student to master

(2), teach new courses

1, for different content three statements were to explain

2, ask questions to inspire and induce

①break can be doing? break out of the cycle layers?
② execution continue after the implementation of which part of the statement
③goto only understand

(3), the consolidation exercise

1, with a slide show topics for the students to answer

2, classmates point specific step of solving the blackboard

Example a, (break statement)


Q: At the end of the program m, respectively, the value of n is the number?
Options: A, m = 11, n = 3; B, m = 8, n = 0; C, m = 7, n = 3; D, m = 5, n = 4
Answer:

Example Two, (continue statement)


Q: The value of i and n after the end of the program were how many?
Options: A, i = 1, n = 11; B, i = 3, n = 5; C, i = -1, n = 11; D, i = 3, n = 5.
Answer:

Example Three: (goto statements) (understand only)


operation result:

(4), induction Summary

1, point students to self induction;

2, finishing arrangements for five minutes, one minute narrative;

Eight, writing on the blackboard design

break:braek语句用来结束当前正在执行的循环(for;while;do…while)结构或多路分支(switch)结构,转而执行这些结构后的语句,break语句只能跳出一个循环,既break所在的最内层循环,若要跳出多重循环,需要使用goto语句,在switch语句中,break直接跳出switch,执行switch结构后的语句。
Continue:只能应用在循环结构中,其作用是跳过循环体中尚未执行的部分,接着进行下一次循环条件的判断,直到循环条件不成立时才跳出循环。
Goto:允许把控制无条件转移到同一函数内的被标记的语句。

Guess you like

Origin www.cnblogs.com/YuShiqicodelife/p/11516699.html