Curriculum Map. Discipline: Computer Science Course: C++

Size: px
Start display at page:

Download "Curriculum Map. Discipline: Computer Science Course: C++"

Transcription

1 Curriculum Map Discipline: Computer Science Course: C++ August/September: How can computer programs make problem solving easier and more efficient? In what order does a computer execute the lines of code in a computer program? How can that order be manipulated, and can steps be repeated? How can a program be written so that the user of program can interact with it (by providing it with information) while it is running? Introduction to loops: for, while, do while Incorporating selections structures and other features into loops: if, else if, switch, counters, running totals, etc. Creating pseudocode/flowcharts to map problem-solving strategy before coding begins Nested loops Students will outline their thinking on paper in the form of pseudocode in order to break down a complex problem into less complex, component parts that can eventually be transformed into actual code. Students will write and debug programs that test an arbitrarily amount of user input via a loop and determine which of the inputs satisfies certain criteria. Students will become proficient in writing nested loop in their programs. October: Quiz programs written in class with time constraints How can a programmer use loops, if statements, and counters to solve problems in programming?

2 What is a function, and how does it differ in a programming context than in a traditional mathematical setting? How can a programmer use simulations to solve real-world problems? Using counters, storing values and running totals in loops Creating functions, writing function prototypes, and making function calls Random number generation and computer simulations Function calls within loops Task management via functions Global vs. local variables Students will use counters and loops to keep track of high, low, and average value of data as a user them. Students will write function prototypes, headers, and bodies and make function calls from the main. Students will create computer simulations using random numbers, loops, and function calls to solve problems too difficult to solve analytically. Students will write programs that are as concise and organized as possible by making use of functions. Students will differentiate between local and global variables. Quiz programs written in class with time constraint November: Standards: CRISS: Think, pair, share What is the value of a function calling another function and how is this accomplished? What is recursion and how does it allow one to formulate solutions to problems more quickly? What are the disadvantages of recursion?

3 What is an array, how do they relate to sequences, and how are they useful in programming? Functions calling other functions Recursive vs. iterative problem solving methods Static variables One dimensional arrays; initializing arrays via loops; accessing array elements; testing array elements via if statements in loops. Students will write programs that allow the user to enter data such as a list of grades. The data will be stored in an array. Data will be checked for inappropriate values and averaged and the low score is dropped. Students will solve problems (such as finding the factorial of a number) both recursively and with more traditional methods (such as via loops). Quiz programs written in class with time constraint December: Standards: CRISS: Think, pair, share How are arrays sorted? Why are some sort algorithms more efficient than others? What are some practical applications of sorting? What is the relationship between two-dimensional arrays and matrices? Bubble sorts Passing arrays to functions Two-dimensional arrays Students will write code to sort a list of data in ascending or descending order. They will first pass an array of data to a function that is set up to do the sorting.

4 Students will create a "chess tutorial" in order to demonstrate knowledge of two-dimensional arrays and function calls. Quiz programs written in class with time constraint January: Standards: CRISS: Think, pair, share What is a pointer and what is its relationship to data and memory? How are strings, arrays, and pointers connected to one another conceptually? What is the usefulness of pointers and strings? Intro to strings and pointers Manipulating strings as character arrays Using pointers to access values and change the values of identifier Sending strings to functions and using pointers within functions Students will articulate the difference between an identifier's name, its value, and its address in memory. Students will apply the appropriate syntax when using pointers in programs. Students will create and manipulate strings in their programs via built-in and homemade functions. February: What is a class and how does a class facilitate programming?

5 What are some practical examples of classes? How does a programmer set up a class in a program? Introduction to object-oriented programming: real-world examples of classes and purpose for their use How to create a class: syntax; conventions; private data members How to instantiate objects of a class in the main How to create a constructor and member functions to work with class objects Students will write code to create simple classes. Students will create constructors, private data members, and member functions for their classes. Students will implement object-oriented programming to solve programming problems in a concise, systematic way. March: What roles do member functions, private data members, and constructors play in a program containing classes? What member functions does a class need in order to be useful? How do member functions modify contained in an object? What is the point of creating a class within a class (composition)? Creating classes with public member functions, private data members, constructors, destructors, and friend functions; composition of classes; static and constant data members. Creating references to objects, using functions to instantiate new objects, making functions that return objects, making arrays as private data members for classes. Students will make design programs with multiple classes in which one class is a component of another (composition).

6 Students will write functions that accept, create (instantiate), and return objects. Students will write code for arrays of objects of the same class. April: What is inheritance and how does it differ from composition of classes? What is operator overloading and how does it make computer code easier to write and read? Inheritance of classes, inheritance vs. composition of classes. Operator overloading: iostream operators: cout<<, cin>>; overloading other operators such as +, -, *, /. Simplifying array notation by overloading the [] operator. The "this" operator and cascading. Students will learn to program more efficiently by making use of classes that they have already written in new programs via inheritance. Students will streamline their programming via operator overloading. They will redefine operators so that their intuitive meanings will apply to objects of a class rather than just to the types of data for which the C++ language originally intended. May/June: What is memory allocation and when does it become an issue? How can templates facilitate programming? What are the advantages and difficulties of working on a large project with a group of others?

7 Why is it important to plan out a large project before individual programmers begin working on individual pieces of it? new and delete key words (memory allocation and retrieval). Function templates. Focus on project design. Students will allocate memory and free it up via the keywords "new" and "delete." Students will create a program (as a class project) which incorporates many of the key concepts learned this semester.