02 | Core Programming Gerry O’Brien | Technical Content Development Manager Paul Pardi | Senior Content Publishing Manager
How Computers Store and Manipulate Information Data Structures Algorithms Decision Making Repetition Program Errors Module Overview
Computer Storage and Processing
Variables, Constants, and Data Types Variable – provides a temporary, named storage location in computer memory Constant – either a named storage location or literal value. Cannot be changed during program execution Data Types – numeric, character, special Data TypeRangeDescription byte0 to 255A single byte (8 bits) charAny Unicode characterCharacters used in most languages in the world short-32,768 to 32,767Signed integer values int-2,147,483,648 to 2,147,483,647Larger signed integer values long9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 Even larger signed integer values float +/- 1.5 x to +/- 3.4 x10 38 Floating point signed values Double+/- 5.0e -324 to +/- 1.7e308Large floating point signed values StringString of charactersWords, sentences, phrases, etc. BooleanTrue or FalseUsed to represent true or false, 1 or 0
Data Structures Arrays Stacks Queues Dictionaries
Arrays A collection of similar data types accessed by index IndexValue 0Item1 1Item2 2Item3 3Item4 4Item5 5Item6 6Item7 7Item8 8Item9 9Item10
Stack A collection of objects, accessed by pop and push
Queue A collection of objects, accessed by queuing and dequeuing. Similar to a line at the motor vehicle license branch EnqueueDequeue
Dictionary A collection of objects that are accessed by using a key KeyValue Key1First Item Key2Second Item Key3Third Item Key4Fourth Item Key5Fifth Item
Demo Data Structures
Algorithms
Decision Making if, if-else, if-else-if switch or Select Case
Demo Decision Structures
Repetition for loops while loops do-while loops recursion
Demo Repetition
Program Errors Syntax errors Logic errors Exceptions Structured Exception Handling Using the debugger
Demo Errors and Debugging
©2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Office, Azure, System Center, Dynamics and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.