Search Header Logo
2.8 Procedures Lesson

2.8 Procedures Lesson

Assessment

Presentation

Computers

9th - 12th Grade

Easy

Created by

Amy Austin

Used 3+ times

FREE Resource

13 Slides • 1 Question

1

2.8 Procedures Lesson

Slide image

2

Abstraction

the process of reducing complexity by focusing on the main idea

3

Imagine that you are sitting in a chair in your home when someone knocks at the door. What do you do? How do you react to this event?


4

Common answers to this scenario apply a great amount of abstraction—“removing—or obscuring—detail”:

  • Open the door leaves out how you get to the door

  • Adding walk to the door doesn’t explain how to actually walk

  • Replace walk to the door with a repeated series of take a step doesn’t describe how steps are taken

  • Lift your foot leaves out which muscles you use to bend your leg

5

Open Ended

What is one level of abstraction that is applied to the event answering a text message?

6

Procedural Abstraction

 Allows us to provide a name to a process and then allows us to perform that process without necessarily know how it does the process, but just by knowing what it does

7

Modularity

the subdivision of a computer program into separate subprograms

8

Wouldn’t it be nice to define walking—with all of the necessary details—once and then just call it walk?


9

Procedure

a named collection of steps in an algorithm (or group of programming instructions) that can be reused anytime it is needed A procedure may have parameters and return values

10

Procedures = abstraction


11

Parameter

A special type of variable used within a procedure.

12

PROCEDURE walk

1. Lift left leg.

2. Move left leg forward.

3. Set left leg down.

4. Lift right leg.

5. Move right leg forward.

6. Set right leg down.


13

walk -> take n steps

14

PROCEDURE take n steps

REPEAT n times

1. Lift left leg.

2. Move left leg forward.

3. Set left leg down.

4. Lift right leg.

5. Move right leg forward.

6. Set right leg down.

2.8 Procedures Lesson

Slide image

Show answer

Auto Play

Slide 1 / 14

SLIDE