hts.StevenWood.com

Activity 2-4

Home ] Up ] Activity 2-1 ] Activity 2-2 ] Activity 2-3 ] [ Activity 2-4 ] Activity 2-5 ] Activity 2-6 ] Activity 2-7 ][ Last Page ]

Karel 15
Karel 15a
Karel 15b
Karel 15c
Karel 15d
Boolean Logic
CheckList
Rubric

IfBot: Introducing Selection   

Unit 2 Activity 4

Time:  160 minutes

Description  

This activity introduces the selection structure, a basic programming structure. Students will trace programs, recognize problems, and write simple programs which include simple and compound selection statements. Students will be introduced to Boolean logic and the AND, OR, and NOT operators. Students will continue to practice the problem solving process by creating solutions to problems which include selection structures.

Strand(s) & Learning Expectations  

Strand(s): 

A. Programming Concepts and Skills  B. Software Development  C. Computer Environments and Systems  D. Topics in Computer Science

Overall Expectations
A1. demonstrate the ability to use different data types, including one-dimensional arrays, in computer programs;
A2. demonstrate the ability to use control structures and simple algorithms in computer programs;
A3. demonstrate the ability to use subprograms within computer programs;
A4. use proper code maintenance techniques and conventions when creating computer programs.
B1. use a variety of problem-solving strategies to solve different types of problems independently and as part of a team;
B2. design software solutions to meet a variety of challenges;
B3. design algorithms according to specifications;
Specific Expectations
A1.1 use constants and variables, including integers, floating points, strings, and Boolean values, correctly in computer programs;
A1.4 demonstrate the ability to use Boolean operators (e.g., AND, OR, NOT), comparison operators (i.e., equal to, not equal to, greater than, less than, greater than or equal to, less than or equal to), arithmetic operators (e.g., addition, subtraction, multiplication, division, exponentiation, parentheses), and order of operations correctly in computer programs;
A2.1 write programs that incorporate user input, processing, and screen output;
A2.2 use sequence, selection, and repetition control structures to create programming solutions;
A3.1 demonstrate the ability to use existing subprograms (e.g., random number generator, substring, absolute value) within computer programs;
A3.2 write subprograms (e.g., functions, procedures) that use parameter passing and appropriate variable scope (e.g., local, global), to perform tasks within programs.
A4.1 demonstrate the ability to identify and correct syntax, logic, and run-time errors in computer programs;
A4.2 use workplace and professional conventions (e.g., naming, indenting, commenting) correctly to write programs and internal documentation;
A4.3 demonstrate the ability to interpret error messages displayed by programming tools (e.g., compiler, debugging tool), at different times during the software development process (e.g., writing, compilation, testing);
A4.4 use a tracing technique to understand program flow and to identify and correct logic and run-time errors in computer programs;
A4.5 demonstrate the ability to validate a program using a full range of test cases.
B1.1 use various problem-solving strategies (e.g., stepwise refinement, divide and conquer, working backwards, examples, extreme cases, tables and charts, trial and error) when solving different types of problems;
B1.2 demonstrate the ability to solve problems independently and as part of a team;
B1.3 use the input-process-output model to solve problems.
B2.1 design programs from a program template or skeleton (e.g., teacher-supplied skeleton, Help facility code snippet);
B2.2 use appropriate vocabulary and mode of expression (i.e., written, oral, diagrammatic) to describe alternative program designs, and to explain the structure of a program;
B2.3 apply the principle of modularity to design reusable code (e.g., subprograms, classes) in computer programs;
B2.4 represent the structure and components of a program using industry-standard programming tools (e.g., structure chart, flow chart, UML [Unified Modeling Language], data flow diagram, pseudocode);
B3.1 design simple algorithms (e.g., add data to a sorted array, delete a datum from the middle of an array) according to specifications;

Prior Knowledge & Skills  

Students:

  • have used a programming environment;

  • write simple programs which include input, output, and variable manipulation;

  • have been introduced to the problem solving process;

  • understand the difference between the programmer and the user;

Planning Notes  

  • The introduction to the basic structures of repetition and selection may be made in either order. These structures are the building blocks of most programming languages.

  • Nested repetition statements should not be introduced until the final activity in this unit. Compound exiting conditions (i.e. use of AND, OR, and NOT) should be introduced with this activity.

Teaching/Learning Strategies  

  • use powerpoint for IfBot to demonstrate the need for a selection construct.

  • Students will document possible paths in a selection construct.

  • Demonstrate the flowchart and syntax for a simple selection statement (if, if/else).

  • Introduce the concept of Boolean logic.

  • Investigate the truth tables (Appendix 2.4.3) for the Boolean operators AND, OR, and NOT.

  • Use Karel 15 (Appendix 2.4.1) for students to practice the commands.

  • Demonstrate the syntax for compound selection statements (else if).

  • Students will trace programs involving compound selection statements.

  • Students will recognize and identify solutions for problems which require the use of selection statements.

  • Use Karel 15a (Appendix 2.4.2) for students to practice the commands.

Assessment & Evaluation of Student Learning

Thinking/Inquiry X Application X Communication X Knowledge X

As Learning

Students will be given time to:

  • reflect on their progress/ understanding/areas of concern based on teacher/student/peer suggestions (e.g. after test take up)
  • journalize their reflections
  • reflect on the work of others

For Learning

The teacher will

  • observe student progress/performance
  • ask questions based on student work
  • check homework correctness/completion when appropriate
  • review formative quiz results

Of Learning

The teacher and students gather assessment information based on specific expectations outlined for this activity including:

  • a formative assessment of the assigned work in the form of roving conferences,

  • a formative assessment of the students’ work, using a checklist of criteria created by the teacher,

  • a summative assessment in the form of a small programming project, and

  • a summative assessment in the form of a quiz.

Accommodations  

The following are ways in which the activity can be modified to accommodate students' individual needs:

  • provide pseudocode for some problems;

  • use pair programming techniques while students are writing their initial programs (see Resources);

  • restricting use of case/switch statements;

  • restricting complexity of compound conditions;

  • extending investigation of Boolean logic: for example NAND, NOR, XOR, and DeMorgan’s Law;

  • investigate syntax of other programming languages.

Resources

  • ColorBot move method and tester program

  • Installed help files and/or manuals for the programming language in use.

  • Any introduction to programming text will include a section on repetition structures.

  •  Williams, Laurie and Kessler, Robert R., All I Really Need to Know about Pair Programming I Learned In Kindergarten, Communications of the ACM, May 2000. http://collaboration.csc.ncsu.edu/laurie/Papers/Kindergarten.PDF

  • Hume, J.N. Patterson and Stephenson, Christine. Introduction to Programming in Java. Toronto, Ontario, Canada. Holt Software Associates Inc. 2000.
    ISBN 0-921598-39-4
  • Lambert, Kenneth A. and Osborne, Martin. Java Complete Course in Programming & Problem Solving. Cincinnati, Ohio, USA. South-Western Educational Publishing. 2000.
    ISBN 0-538-68707-X
  • Arnow, David M. and Weiss, Gerald. |Introduction to Programming Using Java: An Object Oriented Approach. Don Mills, Ontario. Addison-Wesley. 2000.
    ISBN 0-201-61272-0
  • Deitel, H.M. and Deitel P.J. Java: How to Program. 3rd ed. Upper Saddle River, New Jersey. Prentice Hall.1999.
    ISBN 0-13-012507-5
  • Eckel Bruce. Thinking in Java. 2nd ed. Upper Saddle River, New Jersey, USA. Prentice-Hall. 2000.
    ISBN 0-13-027363-5 available for download from http://www.mindview.net/Books/TIJ/ in various formats
  • Eck,  David J. Introduction to Programming Using Java 3.1 ed.  2001. Open Publication License. 2000. <http://math.hws.edu/javanotes>
  • Stein, Lynn Andrea. Interactive Programming in Java. Morgan Kaufmann Publishers. 1999. 
    ISBN 1-55860-557-6 Available for download from http://www.mkp.com/ipij/

Source: Roy Paterno. Association of Computer Science Educators. Grade 11 Resources - Draft Version. http://www.acse.net/Grade11/ICS3U.doc. August 10, 2001. Adapted.

Home ] Up ] Activity 2-1 ] Activity 2-2 ] Activity 2-3 ] [ Activity 2-4 ] Activity 2-5 ] Activity 2-6 ] Activity 2-7 ][Last Page]
All material on this site is copyright © 1997- by Steven Wood or as credited. All right reserved. Use of this site indicates you agreement with the  terms of use.
Send comments or questions to about this page.
Every attempt has been made to credit work under copyright. If there are any claims that copyright has been missed please contact the .
+SDG+