|
Sadly this was described as C+ in the event guide, which almost made me miss it. This is a full unit, showing how to teach conditionals using C# — don’t discount it at all, as C# looks exactly like Java at this level. |
|
|
|
|
This unit, in C#, explains how to use conditionals.
Submitted By:
Teacher: Rita Woodfill
School District: Northside ISD
Email:
rita.woodfill@nisd.net
TEKS
Technology Applications TEKS
- c1A – Demonstrate knowledge and appropriate use of operating systems, software applications, and communication with networking components.
- c1B – Compare, contrast, and appropriately use the various input, processing, output, and primary/secondary storage devices.
- c1G – Demonstrate coding proficiency in a contemporary computer language.
- c2A – Demonstrate proficiency in the use of a variety of input devices, such as keyboard, scanner, voice/sound recorder, mouse, touch screen, or digital video by appropriate incorporating such components into the product..
- c2B – Use digital keyboarding standards for the input of data.
- c3B – Demonstrate proper etiquette and knowledge of acceptable use policies when using networks, especially resources on the Internet and intranet.
- c4A – Use local area networks (LANs) and wide area networks (WANs), including the Internet and intranet, in research and resource sharing.
- c4B – Construct appropriate electronic search strategies in the acquisition of information including keyword and Boolean search strategies.
- c7A – Apply problem-solving strategies such as design specifications, modular top-down design, step-wise refinement, or algorithm development.
- c7C – Develop sequential and iterative algorithm and codes programs in prevailing computer languages to solve practical problems modeled from school and community.
- c7D – Code using various data types.
- c7E – Demonstrate effective use of predefined input and output procedures for lists of computer instructions including procedures to protect from invalid input.
- c7F – Develop coding with correct and efficient use of expressions and assignment statements, including the use of standard/user-defined functions, data structures, operators/proper operator precedence, and sequential/conditional/repetitive control structures.
- c7H – Identify actual and formal parameters and use value and reference parameters.
- c7I – Use control structures such as conditional statements and iterated, pretest, and posttest loops;
- c8B – Demonstrate proficiency in, and appropriate use of, and navigation of LANs and WANs for research and for sharing of resources.
- c9B – Use correct programming style to enhance the readability and functionality of the code such as spacing, descriptive identifiers, comments, or documentation.
- c9C – Seek and respond to advice from peers and professionals in delineating technological tasks;
-
c10A – Annotate coding properly with comments, indentation, and formatting.
Objectives
- Students will be able to:
- Hand compute and code how to find the GCD of 2 numbers
- Correctly code if/else/switch statements
- Analyze code involving if/else/switch statements
- Create code utilizing random numbers
- Predict code output involving if/else/switch/random
-
Convert Boolean statement using DeMorgan’s law
Time Required
2 weeks – 48 minute class periods
Materials Required
Included is text with examples, worksheets, labs and a test. Specifically
- Text
- Boolean Logic
- Boolean Operators
- Comparison of Boolean variables
- Tracing
- Switch Statements
- DeMorgan’s Law
- Short Circuiting
- Radio Buttons and Check Boxes
- Random Number Generators
- Labs
- Finding the area of a circle, rectangle or triangle. (GUI and console)
- Changing letter grade to number on 4.0 scale. (GUI)
- Determining if a student meets requirement for a job.(console)
- Finding money due for a personalized item (GUI)
- Determining the amount due for speeding ticket (GUI and console)
- Finding the price for a personalized pizza(GUI)
- Finding the price for a shopping spree – include tax (GUI)
- High/Low Game.(GUI)
- Determining what day of the week you were born on
- Determining if a triangle is scalene, isosceles, equilateral, or nonexistent
- Worksheets
- GCD, Order of Operations and if Statements
- Output for if statements
- Switch statements
- If Statements
-
Random numbers
Procedure
- Go through the text with students.
- Have students enter in examples and see that they really do achieve the intended results
- Discuss on each section “What if”. For example, what if we entered in a value like -5 for a test grade?
- In general, don’t give new information for more than 15 minutes before switching to hands- on or worksheets.
-
Give labs as soon as you cover enough information to assign the labs. While students are working on labs, monitor constantly
Closure
During the last five minutes, have students tell you what they have learned. If they seem confused, have them write an “exit card” telling what they need help on.
Evaluation
- labs -Check the written code and screen print or output. All programs must run accurately or there is no credit. I also take off 40% if they do not have comments. Poor commenting grading is at the discretion of the teacher.
- worksheets – check for completion, go over in class, then check again for accuracy
-
test – these are up to the individual teacher
Extension Activity
Determining if a triangle is scalene, isosceles, equilateral, or nonexistent
Inserted from <http://www.techappsnetwork.org/index.php?option=com_content&view=article&id=436:conditionals&catid=169:computer-science&directory=84>
Leave a Reply