|
InitArray.java InitArray1.java InitArray2.java SumArray.java SumArray1.java SumArray2.java Exercise 4-2-1 Exercise 4-2-2 Exercise 4-2-3 Labs Rubric
| |
Data in Lists
| Unit 4 |
Activity 2 |
Time:
240
minutes
|
Description
Students
write programs to store, process, and output lists of string or numeric data,
using a one-dimensional array to solve problems, such as managing a class set of
marks, the names of the elements, or members of a school team, and applying the
concepts examined in Activity 1. They move data between an array and a
sequential file and use a linear search to locate matching information in the
array. They also apply tracing techniques to error-check and debug programs.
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; |
| 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. |
| 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:
-
have
stored and manipulated data in sequential files;
-
can
apply repetition structures (loops);
-
can
apply selection structures (if-then);
-
are
able to incorporate subroutines, functions, and menus;
-
have
used tracing and debugging techniques.
Planning Notes
-
Review
sequential file structure and manipulation.
-
Choose
appropriate examples and models illustrating the use of arrays and files.
-
Review
data types.
-
Prepare
sample data files for use with the exercise problems.
Teaching/Learning
Strategies
The teacher:
-
facilitates
a discussion on the steps for using one-dimensional arrays in creating and
storing lists of information;
-
illustrates,
using a program example, the step-by-step logical process for reading a list
of information into an array and determining the number of elements in the
list;
-
solicits
responses from students to develop pseudocode for a program using a list
(e.g., a list of integers), including array declaration;
-
assists
students in applying developed tracing and debugging techniques to array
problems;
-
assigns
programming exercises requiring use of arrays.
Students:
-
creating
a variable array to store a list of a specific data type;
-
determining
the number of elements in an array;
-
displaying
information contained in an array;
-
reading
data from a sequential file into an array;
-
writing
data stored in an array to a sequential file;
-
manipulating
and analysing the data contained in an array (e.g., finding total, mean,
smallest, and largest values in an array.);
-
searching
for specific elements in an array.
Assessment & Evaluation of Student Learning
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 LearningStudents
complete and submit their solution to a selected problem from
Exercise 4-2-2
(Appendix 4.2.10).
Evidence of students’ achievement of the application of one-dimensional
variable array structures in the solution of the problem is assessed using a
rubric (Appendix 4.2.11). The rubric is distributed to students at the outset of
the activity.
Accommodations
The
following are ways in which the activity can be adapted to accommodate
exceptional students’ needs:
-
provide
print copies of subroutines and vocabulary new to students;
-
selectively
pair students to assist with developing and debugging code;
-
provide
a “scaffolded” program, with subroutine heading, etc. included, to help
struggling students.
Resources
-
Stephenson,
Chris. Turing Stuff: A Collection of
Teacher-Created Exercises, Projects & Quizzes. Toronto: Holt
Software Associates Inc., 1998. ISBN 0-921598-18-1
-
Introduction
to Visual Basic – Project 12 (Variable Arrays) – http://www.moorpark.cc.ca.us/~gcampbell/begVB12.htm
-
Arrays
in C++ - http://www.cee.hw.ac.uk/~pjbk/pathways/cpp1/node176.html
-
Pascal
Tutorial 5C One-dimensional Arrays – http://www.taoyue.com/tutorials/pascal/pas5c.html
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.
|