Lesson Title –Turtle Graphics & Java programming Course – Intro Prog 1 Grade Level – 9-12 Author - Jay Moore School - Grandview Length of Lesson -200 min (3 Blocks) CTE Academic Integration Lesson Planner What do I want students to learn? Standards and Benchmarks Standards and Benchmarks NBEA Standards…or MarkEd Standards… or … ITEA Standards ACT College Readiness Standards ITEA Standards: Students will develop the abilities to apply the design process. Students will develop an understanding of the attributes of design. ACT Readiness Standards Exhibit knowledge of basic angle properties and special sums of angle measures / Math 20 - 23 Solve some routine two-step arithmetic problems / Math 16 - 19 Students will: Students will: •Know: (Content and Vocabulary) •Do: (Skills, Strategies, Processes and Literacy) Students will know basic terms of polygons. Students will know interior angle sum formula. Students will know basic Java class and method design and layout. Students will be able to create methods with or without methods and add them to a class. Students will be able to calculate the sum of the degrees of a polygon, interior angles of regular polygons, and exterior angles of polgons. Students will be able to call a method with and without parameters. Students will be able to design and implement the steps necessary to write a Java method that makes the Turtle draw polygons & other shapes Enduring Understandings (Big Ideas) For example… principles, themes, generalizations or macro-concepts What is good programming? Essential Questions Guiding, driving questions which lead to enduring understandings What are the essential parts of a program? How are the essential parts different for different languages? How am I going to assess student learning? Assessments: Formative assessments and/or Summative assessments Worksheets -- Turtle Question and program -Turtle Graphics - Jay Moore attached on COLE. Lesson Title –Turtle Graphics & Java programming Course – Intro Prog 1 Grade Level – 9-12 Author - Jay Moore School - Grandview Length of Lesson -200 min (3 Blocks) Instructional Plan Prerequisite Skills: Preparation What prior knowledge, skills and understanding do the students need? How will you assess their background knowledge and readiness? Students should have prior knowledge of evaluating expressions with parenthesis and multiple operations. Warm Up: Evaluate each expression using the given value for the variable. 1. 3 ( x - 2 ) when x = 5 3( 5 - 2) = 3 ( 3 ) = 9 2. ( x - 25 ) / 3 when x = 40 ( 40 - 25 ) / 3 = 15 / 3 = 5 3. 4 ( x - 6 ) + 3x when x = -1 4( -1 - 6) + 3 ( -1 ) = 4 ( -7 ) + -3 = -28 + -3 = -31 Instruction and Activities: What procedure (sequence), teaching strategies, and student activities are used in this lesson? State the student roles, teacher roles, and grouping for this lesson. Students will work individually as well as in groups of two depending on the activity or assessment. Materials needed includes: Dr Java – a free editor Pre-written classes in the book classes folder Java is introduced using Dr Java, a simple editor and interaction space. The files pane, definitions pane, and interactions pane are introduced. The history of programming with Turtles from the late 1960’s is introduced. Students open up the Turtle.java and World.java classes in Dr Java. The idea of a class being an instruction book for a group of objects is discussed. Java classes are discussed along with constructors and methods. Students look at the Turtle and World classes. Students are then instructed to create an object of the World class. World myWorld = new World( ); The idea of compiling a program and execution is discussed. Students are then shown how to create a Turtle object— including parameters. Turtle bob = new Turtle( myWorld ); Students are asked to describe what they notice about the turtle that “lands” on the World object. Creating a Turtle object with a specific location is then modeled. Turtle jane = new Turtle( 50, 100, myWorld ); Now that we have a Turtle object we can use its instructions (methods) to make it move. The following code is modeled: bob.forward( 50 ); jane.forward( 25 ); Students are asked to move both the robots forward 10 more pixels. What are the steps to make a robot draw a square? The class walks through the steps and pseudo-code is written. They are then asked to make the Turtles draw a square with length of 50 pixels. (The Turtle starts in the bottom right corner of the square) bob.forward( 50 ); bob.turnLeft( ); bob.forward( 50 ); bob.turnLeft( ); bob.forward( 50 ); bob.turnLeft( ); bob.forward( 50 ); bob.turnLeft( ); Students are led through creating the drawSquare code as a method in the Turtle class and calling the method in the main method. Discussion of implicit parameters and why the “bob.” is dropped off is necessary. Lesson Title –Turtle Graphics & Java programming Course – Intro Prog 1 Grade Level – 9-12 Author - Jay Moore School - Grandview Length of Lesson -200 min (3 Blocks) public void drawSquare( ) { forward( 50 ); turnLeft( ); forward( 50 ); turnLeft( ); forward( 50 ); turnLeft( ); forward( 50 ); turnLeft( ); } … in the main method bob.drawSquare( ); Students are then led through creating the drawSquare code with a parameter for the side length and calling the method from the main method. public void drawSquare( int sideLength ) { forward( sideLength ); turnLeft( ); forward( sideLength ); turnLeft( ); forward(sideLength ); turnLeft( ); forward(sideLength ); turnLeft( ); } … in the main method bob.drawSquare( 200 ); Students are asked how to draw an equilateral triangle. Steps are again written in pseudo-code. Students are then asked to write the method and add it to their Turtle class. Next, students are asked how to draw a hexagon. The pattern of steps from the previous examples is noted as well as the differences. Turn angles are discussed and the angle measure is calculated using the sum of the angles reviewed in the warm up. The formula ((n-2)*180) / n is explained. Students are then asked to find the angle measures for the angles of a regular pentagon and regular octagon. Students are then instructed to look at the Turtle Questions and Programs sheet. The questions are discussed as a class. The students are then asked to begin work on the programs. Each of them should be added to the Turtle class as was done for the square and equilateral triangle methods. A reminder that the Turtle should begin and end at the right corner of the shape with the “base” side horizontal. (Like they appear on the sheet) Also, the Turtle should finish facing the starting direction (if base is horizontal, as required, a turnRight( ) call takes care of this). Teacher will work with students individually as they work through the problems. Class discussion may be necessary for the drawShape ( ) method to help students generalize the steps they have done through the specific shape code. More information will come from the attachment Alice & Java – Turtle Graphics - Jay Moore attached on COLE. Book Class folder with pre-written classes will be attached on COLE. Solutions are in the attached Tutle.java class… BookClassSolutions – Turtle Graphics – Jay Moore Lesson Title –Turtle Graphics & Java programming Course – Intro Prog 1 Grade Level – 9-12 Author - Jay Moore School - Grandview Length of Lesson -200 min (3 Blocks) Academic Integration What core academic topics are integrated? What terminology is common? What terminology is different? Include specific examples to be used to introduce, teach, or review the topics. Core academic topics integrated: Polygon terminology Polygon interior angle sum Terminology: Math terminology includes: Polygon Equilateral Regular Square Rectangle Quadrilateral Pentagon Hexagon Octogon Supplementary angles Exterior angles (for Polygon) Java terminology includes: Classes Methods IDE - Interactive Development Environment parameters variables assignment operator integer String Specific Examples: Find the sum of the interior angles of each polygon Square: 2 triangles * each 180° = ( 2 ) * 180 = 360° interior angle sum In a regular quadrilateral, all angles are equal so each angle is 360 / 4 = 90° α Lesson Title –Turtle Graphics & Java programming Course – Intro Prog 1 Grade Level – 9-12 12 -200 min (3 Blocks) Author - Jay Moore School - Grandview Length of Lesson Pentagon: 3triangles * each 180° = ( 3 ) * 180 = 540° In a regular pentagon, all angles are equal so each angle is 540 / 5 = 108° Hexagon 4 triangles * each 180° = ( 4 ) * 180 = 720° In a regular quadrilateral, all angles are equal so each angle is 720 / 6 = 120° Discuss pattern of the number of triangles being 2 less than the number of sides and develop into the generalization: interior angle sum = ( number of sides – 2 ) * 180° interior angle sum = ( n – 2 ) * 180 Since all the angles are equal, each angle = ( ( n – 2 ) * 180 ) / n Find the exterior angle for each polygon 1 1 The interior and exterior angle form a straight angle. So the sum of the two angles is 180° (they are supplementary). Since the interior angle of an equilateral triangle is 60°, the exterior angle ( 1 ) must be 180 – 60 = 120°. Since the interior angle of a regular pentagon is 108°, the exterior angle ( 1 ) must be 180 – 108 = 72°. Generalizing, and substituting in the above equation for each interior angle, the exterior angle for any regular polygon can be found by: exterior angle = 180 – ( ( n – 2 ) * 180 ) / n It can be shown by example that the sum of all the exterior angles, continuing around the polygon, will always be 360°. Lesson Title –Turtle Graphics & Java programming Course – Intro Prog 1 Grade Level – 9-12 Author - Jay Moore School - Grandview Length of Lesson -200 min (3 Blocks) Specific ACT Readiness Examples: (from The Real ACT Prep Guide) The length L, in meters, of a spring is given by the equation L = (2/3)F + 0.03, where F is the applied force in newtons. What force, in newtons, must be applied for the spring's length to be 0.18 meters? A. 0.13 B. 0.15 C. 0.225 D. 0.255 E. 0.27 In the figure below, ABCD is a trapezoid, E lies on line AD, and angle measures are as marked What is the measure of angle BDC? B C 30° ? 105° 60° A A. D 15° B. 25° E C. 30° D. 35° E. 45° In the figure below, points A, C, E, and G are collinear; B, C, and D are collinear; and D, E, and F are collinear. Angle measured are as marked. What is the measure of angle EFG? F ?° B 140° 45° C A 100° 80° E G D A. 40° B. 45° C. 60° D. 80° E. Cannot be determined with given information Resources What materials and resources are needed for this lesson? Describe the learning environment where this lesson will take place. Math teacher to help with example problems and resources for math content. Materials Needed: Computer Lab Dr. Java IDE Pre-written Classes in the BookClasses folder. Learning Environment: The classroom is a computer lab. Students will be working at the computers individually. Specific Teacher Web Resources: Lesson Title –Turtle Graphics & Java programming Course – Intro Prog 1 Grade Level – 9-12 Author - Jay Moore School - Grandview Length of Lesson -200 min (3 Blocks)