hts.StevenWood.com

Activity 4-3

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

Exercise 4-3-1
Exercise 4-3-2
Labs
Quiz

Relating Lists

Unit 4 Activity 3

Time:  240 minutes

Description

Students write programs that store, retrieve, and process related lists of information (e.g., a class set of student surnames, first names, and marks) using multiple one-dimensional arrays similar to those used in Activity 2. This expands the scope of problems that students can solve to include problems such as displaying the atomic number, name, and atomic mass of an element when the atomic number is specified. Data is transferred from sequential access data files to the arrays and back to the files.

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.
B2. design software solutions to meet a variety of challenges;
C3. demonstrate an understanding of the software development process.
Specific Expectations
A1.1 use constants and variables, including integers, floating points, strings, and Boolean values, correctly in computer programs;
A1.3 use assignment statements correctly with both arithmetic and string expressions 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;
A1.5 describe the structure of one-dimensional arrays and related concepts, including elements, indexes, and bounds;
A1.6 write programs that declare, initialize, modify, and access one-dimensional arrays.
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.
B2.1 design programs from a program template or skeleton (e.g., teacher-supplied skeleton, Help facility code snippet);
C3.1 demonstrate an understanding of an integrated software development environment and its main components (e.g., source code editor, compiler, debugger);
C3.2 work independently, using support documentation (e.g., IDE Help, tutorials, websites, user manuals), to design and write functioning computer programs;

Prior Knowledge & Skills

Students:

  • store and manipulate data in sequential files;

  • use repetition structures (loops);

  • use selection structures (if-then);

  • use subroutines, functions, and menus.

Planning Notes

  • Select examples of data that are presented in related arrays (e.g., list names of players found on baseball cards, the team they play for, and the value of their card).

  • Prepare models illustrating the use of related arrays (e.g., rows of disposable cups, each row labelled with a name, and each cup in the row with a sequential index).

  • Prepare presentation materials illustrating the declaration and use of related arrays in sample programs.

  • Prepare sample data files for use with the exercise problems.

  • Prepare a quiz.

Teaching/Learning Strategies

The teacher:

  • introduces the rationale for and structure of related arrays;

  • leads discussion with students to develop the steps for creating and storing lists of information in related arrays;

  • demonstrates writing of code based on an example of pseudocode developed by students;

  • assigns programming exercises requiring the application of related arrays.

Students:

  • brainstorm examples of applications for related arrays;

  • in small groups, develop criteria for determining when to use related arrays;

  • working collaboratively in groups, develop pseudocode for a program that requires use of related arrays (e.g., lists of student names and ages), including array declaration;

  • individually complete Exercise 4-3-1 (Appendix 4.3.1), or Exercise 4-3-2 (Appendix 4.3.2), or exercises (Appendix 4.3.3), including:

  1. creating parallel arrays to store lists of related data of similar or mixed data types;

  2. determining the number of elements in each array;

  3. displaying tables showing the information contained in the arrays;

  4. generating and storing data in related arrays;

  5. reading data from a sequential file into parallel arrays;

  6. manipulating and analysing the data contained in the arrays (e.g., finding the name of the youngest or oldest person in the class);

  7. searching for specific information in the arrays (e.g., finding the names of all students of a specific age or finding the age of a specific student).

Assessment & Evaluation of Student Learning

Thinking/Inquiry - Application X Communication - 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

  • Students complete a programming and theory quiz.

  • Programming solutions are evaluated for application of related arrays, solution of the program, programming style, and internal documentation.

Accommodations

The following are ways in which the activity can be adapted to accommodate exceptional students’ needs:

  • selectively pair students to assist with developing and debugging code;

  • provide print copies of code for programs similar to those in the exercises;

  • provide partially developed programs requiring completion.

Resources

  • Kaufman. Problem Solving and Structured Programming Pascal. Don Mills: Addison-Wesley Publishing Co. Inc., 1995. ISBN 0-201-11736-3

Source: Public and Catholic District School Board Writing Partnership Course Profile: Computer and Information Science, Grade 11, University/College Preparation ICS3U, Queen’s Printer for Ontario, 2001, adapted.

Home ] Up ] Activity 4-1 ] Activity 4-2 ] [ Activity 4-3 ][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+