Presentation is loading. Please wait.

Presentation is loading. Please wait.

AP Computer Science Principles Data Abstraction and Procedural Abstraction Curriculum Module.

Similar presentations


Presentation on theme: "AP Computer Science Principles Data Abstraction and Procedural Abstraction Curriculum Module."— Presentation transcript:

1 AP Computer Science Principles Data Abstraction and Procedural Abstraction Curriculum Module

2 What is Abstraction? On an index card, write your name and your definition of abstraction.

3 3 ► The process of simplifying or condensing large amounts of data into manageable chunks. ► A concept, an idea, or a general representation that stands for some complex collection of individual instances. Abstraction

4 4 ► A tall object that is stretching to the sky with rough skin. At the top it has several off shoots that spread out from the center. On the ends of the shoots are many small pieces of green softer skin all of the same or similar shape. Below the ground similar offshoots spread through the ground. ► What is this object? Consider this Description Tree

5 5 ► Data Abstraction ► Data stored in variables ► Bits are a lower level of abstraction ► Procedural Abstraction ► Hiding the details (encapsulation) of a complex task under a name with parameters. Two Different Senses of Abstraction

6 Lesson 1: Number Bases: Binary, Octal, Decimal and Hexadecimal

7 Think Pair Share Why do use binary numbers instead of decimal numbers?

8 Introducing Binary to Students What are some of the ways that you introduce binary numbers to your students?

9 Activity 1 Count the Dots

10 10 ► Use index cards to create the following 5 cards. Counting Dots Activity

11 11 ► Each card represents a place value in binary. Counting Dots Activity 2424 23232 2121 2020

12 12 ► Just like the decimal number place values are 1, 10, 100, 1000… The binary number place values are 1, 2, 4, 8, 16, … Counting Dots Activity 168421

13 13 ► How would we use this to convert the binary number 11111 to decimal? Counting Dots Activity 168421 1 11 1 1

14 14 ► Convert the binary number 01011 to decimal. Counting Dots Activity 168421 0 10 1 1

15 15 What is Digital?

16 Activity 3 Using Binary for Text

17 17 Using Binary for Text Use this subset of the ASCII codes to decode this message. http://www.asciitable.com/ 43 53 20 52 4F 43 4B 53 21

18 Decoding Extensions Brainstorm ideas for how you can extend this activity.

19 Activity 4 Using Binary for Images

20 20 What are the differences between these two pictures?

21 21 Pixels and Color Codes

22 Lesson 2: Procedural Abstraction Using Turtle Primitives

23 Think Pair Share How do you take your students from concrete examples to abstract formulas that use variables to do the work?

24 Activity 2 Drawing a Square

25 25 ► On your graph paper identify the point (0, 0) It really doesn’t matter where you put this, but so we don’t run out of room, put it some where in the center of the paper. ► Commands: ► penDown() puts the pencil down at the starting location ► move() moves 10 units in the direction the turtle is facing ► turn() turns the turtle 90 degrees clockwise ► penUp() lifts the pen off of the paper. ► Start the turtle at (0,0) facing East. Setting up the Graph

26 26 penDown() move() turn() move() turn() move() turn() move() turn() penUp() Graphing Turtle Movements

27 Turn To Your Partner How are we demonstrating the use of abstraction in the code we just explored?

28 Think Pair Share What would your next step be in developing abstraction with your students?

29 Activity 3 drawSquare50x50()

30 30 penDown() move() turn() move() turn() move() turn() move() turn() penUp() Modify to Make a 50x50 Square

31 31 penDown() move() turn() move() turn() Modify to Make a 50x50 Square move() turn() move() turn() penUp()

32 32 drawSquare50x50() { penDown() move() turn() move() turn() Modify to Make a 50x50 Square move() turn() move() turn() penUp() }

33 33 drawSquare50x50() { penDown() move(50) turn() move(50) turn() move(50) turn() move(50) turn() penUp() } Modify to Make a 50x50 Square

34 Activity 5 Student Practice and Homework

35 35 drawSquare50x50() { penDown() move(50) turn() move(50) turn() move(50) turn() move(50) turn() penUp() } Modify to Make a 60x60 Square drawSquare60x60() { penDown() move(60) turn() move(60) turn() move(60) turn() move(60) turn() penUp() }

36 36 drawSquare50x50() { penDown() move(50) turn() move(50) turn() move(50) turn() move(50) turn() penUp() } Making a General drawSquare(x) drawSquare60x60() { penDown() move(60) turn() move(60) turn() move(60) turn() move(60) turn() penUp() } drawSquare(x) { penDown() move(x) turn() move(x) turn() move(x) turn() move(x) turn() penUp() }

37 Activity 7 Draw Triangle Procedure

38 38 Writing drawTriangle(x) ► After modeling creating drawSquare(x), have students try other shapes like drawTriangle(x) ► Use turn(x) to change the amount of turn.

39 Think Pair Share How many degrees should we turn to make a triangle? Try it.

40 40 Turn Amount for Triangle ► Is there a formula that we could use to determine the amount to turn after drawing each leg of the triangle? ► Can we generalize this formula to work for all equilateral polygons?

41 Extension Students can practice using parameters to create all sorts of draw procedures including a general drawPolygon() procedure.

42 Activity 8 makeFace() Procedure

43 43 Writing makeFace() Procedure ► Have students use the procedure that they have written to create a picture, such as a face. ► Some other ideas: flower, arrow, house.

44 Summative Assessment Page 33 of the module. Includes short answer, multiple choice and application questions.


Download ppt "AP Computer Science Principles Data Abstraction and Procedural Abstraction Curriculum Module."

Similar presentations


Ads by Google