300 likes | 616 Views
Didactics of Introduction to Computer Science in High School. M. Armoni 1 , T. Benaya 2 , D. Ginat 3 , E. Zur 2 1 Weizmann Institute of Science 2 The Open University of Israel 3 Tel-Aviv University. High School CS Curriculum.
E N D
Didactics of Introduction to Computer Science in High School M. Armoni1, T. Benaya2, D. Ginat3, E. Zur2 1Weizmann Institute of Science 2The Open University of Israel 3Tel-Aviv University
High School CS Curriculum • Every CS student will learn and understand the nature of the field and the place of CS in the modern world. • Interleaving of theoretical principles with application skills. • The curriculum has been updated – shifting from procedural languages (Pascal and C) to Object Oriented languages (Java and C#).
Israeli High School CS Curriculum • CS should be taught as a scientific field; • The study materials should concentrate on its key concepts and foundations; • Conceptual and implementation issues should be interwoven throughout the taught materials.
Israeli High School CS Curriculum 3-unit level: • Foundations of Computer Science 1; • Foundations of Computer Science 2; • Practical lab-unit. 5-unit level: • Software design; • An advanced unit.
Foundations of CS (FCS) textbooks • Development approach: • “Zipper approach”; • “Object second”; • Algorithmic patterns and problem solving notion. • Didactical principles: • Motivating examples; • Gradual design process.
Foundations of CS 1 • Chapter 1 – Introduction; • Chapter 2 – Algorithmic Problem Solving; • Chapter 3 – Basic Computation Model; • Chapter 4 – Algorithm Design Stages; • Chapter 5 – Conditional Execution; • Chapter 6 – Correctness of Algorithms; • Chapter 7 – Repetitive Execution; • Chapter 8 – Efficiency of Algorithms.
Foundations of CS 2 • Chapter 9 – The String Class; • Chapter 10 – Arrays; • Chapter 11 – Classes and Objects; • Chapter 12 – Algorithmic Patterns (counting, searching, sorting); • Chapter 13 – Problem Solving.
Motivating Examples • The presentation of every new notion or computational element is motivated by several algorithmic problems, each emphasizing a different element of the topic; • Each algorithmic problem is preceded by a motivating verbal introduction followed by the problem description.
Gradual Design Process • Analyzing representative input values and discussing the relationship between input and output; • Dividing the problem into sub-problems; • Selecting appropriate data-structures; • Writing the algorithm in pseudo-code; • Translating the algorithm into code; • Walking through the code.;
1Motivational Problem Problem goal: Motivating the alternation statement of if-then-else. Problem statement: Develop an algorithm, for which the input is a three-digit positive integer and the output is a message indicating whether the integer is a palindrome.
Motivational Problem 1 (cont.) Analyzing input-output relationship: • Examples of three-digit positive integers which are palindromes are: 787, 424 and 777; • Examples of three-digit positive integers which are not palindromes are: 778, 234 and 192; • The examples demonstrate that the computation needs to distinguish between two cases : • The units digit and the hundreds digit are equal. • The units digit and the hundreds digit are not equal.
Motivational Problem 1 (cont.) Dividing the problem into sub-problems: • Input a three-digit positive integer; • Extract the unit's digit; • Extract the hundred's digit; • Compare the digits; if they are equal: - Output a message indicating that the input integer is a palindrome. - Otherwise – output a message indicating that the input integer is not a palindrome.
Motivational Problem 1 (cont.) Selecting variables (roles, names, data types): • num– an integer variable for storing the input; • units– an integer variable for storing the units digit; • hundreds– an integer variable for storing the hundreds digit;
Writing the algorithm in pseudo-code: • Read the input integer into num. • Assign to units the remainder of num divided by 10. • Assign to hundreds the integer result of num divided by 100. • If the value of units equals the value of hundreds 4.1Output the message: num "is a palindrome" • else 5.1 Output the message: num "is not a palindrome"
Translating the algorithm into code: importjava.util.Scanner; public class Palindrome { public static void main (String [] args) { Scanner in = new Scanner(System.in); intnum; // three-digit positive number intunits; // unit's digit inthundreds // hundred's digit 1. System.out.print("Enter a 3 digit number: "); 2. num = in.nextInt(); 3. units = num % 10; 4. hundreds = num / 100; 5. if (units == hundreds) //the number is a palindrome 5.1 System.out.println(num+" is a palindrome"); 6. else 6.1 System.out.println(num+" is not a palindrome"); } }
2Motivational Problem Problem goal: Motivating the concept of algorithm efficiency. Problem statement: Develop an algorithm for which the input is a positive integer greater than 1 and the output is the divisors of the number.
3Motivational Problem Problem goal: Motivating the notion and utilization of a one-dimensional array. Problem statement: Develop an algorithm for which the input is the running times (in seconds) of fifteen contestants in a race. The output is the number of contestants whose running times are lower than the average time.
422 410 360 350 206 190 185 174 4Motivational Problem Problem goal: Presenting a variation on the maximum/minimum pattern. Problem statement: Develop an algorithm for which the input is a list of altitudes of N points on a ridge and the output is the size of the maximal difference between two (not necessarily adjacent) points such that the higher one appears before the lower one.
Motivational Problem 4 (cont.) Analyzing input-output relationship: • For example, for the input: 5 21 22 12 7 17 3 • the output should be 19 (22-3). • This input may lead to the following solution: • - calculate the max point on the ridge, • find the lowest point that appears after the max. • This solution is true only if the max drop appears after the appearance of the highest point.
Motivational Problem 4 (cont.) Analyzing input-output relationship: • For example, for the input: 5 21122 12 7 17 3 • the output should be 20 (21-1). • This input shows that the max drop may appear before the highest point of the ridge. • Therefore the correct solution would involve finding and saving the maximal difference.
Teachers’ Use and Attitudes towards the Didactic Approach Tools: • We designed a nine-question questionnaire that was aimed at examining teachers' implementation of the textbooks' didactic approach. • Population: • The questionnaire was sent to 24 high-school teachers • who taught FCS1 and FCS2 for at least two years. • 12 teachers responded to the questionnaire.
Results and Discussion -text books’ use • All teachers use the text books, some more extensively and some less extensively; • Some teachers supplement the text books with their own materials, or more attractive graphical materials.
Results and Discussion - Didactic approach • The vast majority is fond of our didactical approach. They display in class some, or many of the motivating examples, or send their students to read them at home. • The majority of the teachers teach the textbooks topics in the order presented, of "Objects Second", while possibly elaborating earlier on static methods.
Results and Discussion – Study material • More than half of the teachers indicated that there is a good variety of colourful and interesting problems. The others would like to have additional problems. • Some teachers are very fond of the textbooks problems, and some see certain problems as too simple for the better students, but valuable for the less competent students.
Results and Discussion -self study • Most of the teachers thought that the textbooks are only partially suitable for self study. They refer their students to learn some sub-topics on their own, for preparing a new topic to be presented in class, or for deepening their understanding of a just-presented topic.
Results and Discussion -Gradual design process • Most teachers display and require algorithm design in steps, which correspond to the six steps, displayed in the textbooks materials. • Some teachers see parts of the text and the six code-design steps as cumbersome. • Most of the teachers lean towards our approach, and appreciate the detailed and gradual design presentations.
Summary • All in all, the conducted study reveals that this approach seems beneficial and appealing to teachers. • In a further study, it may be relevant to examine teachers' use and attitudes of algorithmic patterns, and their pros and cons of the "Objects Second" approach in high school.