Strand: Computer Science and Programming LEVEL 1 Unit title: Planning and Programming using Visual C#.Net Year 2013 Version 3 Introduction This unit plan is designed for a Year 11 class, and aims to cover efficiently planning and constructing a basic computer program for a specified task. The software used is Visual C#.Net (2010 Express version freely available from Microsoft). Digital Technologies NZ Curriculum Technological Context Knowledge and Skills – Objectives Key Competencies o o Demonstrate ability to design the structure of a basic software program Demonstrate ability to construct a basic software program Curriculum Level 6 Students can: Students can: o specify variables and their data types o independently construct a flexible and robust plan o specify a procedural structure that combines well-chosen actions, Thinking skills – actively seek, use and create Using language, symbols and text – representing and Managing self – setting goals, manage projects, communicating information and ideas using a high level language (e.g. Visual CSharp.Net) working independently Relating to others – students interact with others in Participating and contributing – students participate conditions and control structures that constitutes a well-structured logical solution to the task o knowledge the classroom (teacher and students) making informed decisions using feedback from teacher and/or peers fully in each lesson, sharing knowledge and creating learning opportunities for others specify a comprehensive set of test cases with expected, boundary and invalid input for testing the program. o independently implement a plan for a basic program in a suitable programming language that uses a procedural structure with wellchosen actions, conditions and control structures that ensures the program is flexible and robust o set out a program's code concisely, and document the program with variable names and succinct comments that accurately explain and justify code function and behaviour o comprehensively test and debug the program in an organised time effective way to ensure that it works on expected, boundary and invalid inputs o Assessment opportunities Internally Assessed: AS91076 Digital Technologies 1.46 AS91075 Digital Technologies 1.45 Construct a basic computer program for a specified Construct a plan for a basic computer program for a specified task task Student prior knowledge None Resources required A computer with overhead projector and sound for teaching use. Internet access to website http://www.homeandlearn.co.uk/ Visual C#.Net programming page 1 Computers with programming language installed e.g. Visual C#2010 Express. Resources supplied This document, Programming tutorials and notes: How to create graphics for drawing.docx ,Programming a dodge type game (student workbook), Assessment and assessment schedule Learning experiences Resources/special notes (Year 11 course) Introduction to C# programming http://www.homeandlearn.co.uk/ Visual C#.Net programming or csharp_net.pdf Console application Saving work Program Class main Method Using the intellisense menu running programs (debugging) using toolbox to add controls to a form properties code messageboxes C#.Net Getting Started Start with demonstrating console application (Don’t do the cmd line section as our students are locked out of this) Students save work to My Documents\Visual Studio 2010\Projects and back this up to their Home drive later. First line of code How to Run a C# program First C# windows form Adding controls to a form properties of a control adding code to a button C# message boxes More about C# message boxes Variables strings, concatenation; comments; numbers variables: integer, Float and Double; addition, subtraction, operators, getting numbers from text boxes. Students work through: C#.Net variables section Conditional Logic if; if .. else; else ..if; switch, conditional operators Students work through: C#.Net variables section Loops for, list boxes, Do loops, C# loops from string variables to 18 the equals button This section includes developing a simple calculator) Do Exercises A, B C and the other non lettered exercises Exercise D, E, F Exercise G, H Add Menus Using menus C# add Menus to your forms do 1. Add Menus … 3. menu shortcuts debugging Design-time errors, Run-Time errors, Logical errors, breakpoints, the locals window C# Debugging Design-time errors, Run-Time errors, Logical errors, breakpoints, the locals window Exercise I C# Methods C# Methods understanding methods, passing values, returning values. String Manipulation Do sections 1, 8, 9 Events Do sections 1 - 5 page 2 Graphics in C# use resource How to create graphics for drawing.docx Designing a Visual C#.Net program (or any program) The steps we will look at are: 1. Investigate and understand the problem 2. Plan/Design the algorithm (we will use pseudocode) 3. Implement the solution. 4. Debugging and testing the solution. Demonstrate the steps First on a simple problem. (Use resource …Level 1_Catch the Alien.docx) Then on a Dodge type game. (use resource … Level 1_CSharp Dodge.docx) This is the Programming Process. It is iterative, we keep coming back to the steps. It could be 3 and 4 repeated or we might need to revise our plan then implement and test again. Assessment 2013_AS91075_AS91076_V2_Assessment Resource page 3