Announcements Survey feedback: summary Quiz: HW 7: Purpose HW 7: Sorry about Ethics Essay … 7/13/2019 Kelvin Sung (Use/modify with permission from © 2010 Larry Snyder, CSE)
What We’ve Learned So Far We’ve ripped right along, and learned a lot! What We’ve Learned So Far Kelvin Sung University of Washington, Bothell (* Use/Modification with permission based on Larry Snyder’s CSE120 from Winter 2011) © Lawrence Snyder 2004
Mid-Term … The Midterm is Wednesday – Open everything EXCEPT … No use of calculator No use of computer: except reading of pdf/powerpoint lecture notes, textbook, everything else is ok. Pencil or Pan, will be on papers. Source code: no color highlight!! 7/13/2019 Kelvin Sung (Use/modify with permission from © 2010 Larry Snyder, CSE)
Properties of Computation Composed of commands or instructions Presented in sequence; executed in sequence Commands direct an agent Keeping track of the “current instruction” in the sequence: yellow box in Lightbot; program counter for computers 7/13/2019 Kelvin Sung (Use/modify with permission from © 2010 Larry Snyder, CSE)
Properties of Computation (cont.) The execution sequence can be interrupted to execute a function – suspend current sequence, go to function definition, run – so that when complete, return is to point of suspension Conditional commands (If-statements) skip instructions; looping repeats instructions 7/13/2019 Kelvin Sung (Use/modify with permission from © 2010 Larry Snyder, CSE)
LightBot and Abstraction Command Sequence Program Counter Functional Abstraction Def Func(), Calling Func() Inerations 7:(instructions) Applying concepts in solving problems Given a bot problem, how would you solve it If you have to use a specific function 7/13/2019 Kelvin Sung (Use/modify with permission from © 2010 Larry Snyder, CSE)
Abstraction Functional abstraction: find a sequence of operations that perform a “meaningful” operation: package them w/name, and precise specification Hw 1: Lightbot 2.0; std name, no params, 8 insts. Hw 2: Symbolic Lightbot: name, no params, n insts. Hw 3: Symbolic Lightbot: function, params, n insts. When functionally abstracting you create a concept – a new idea (w/ name & meaning) to use without “worrying about the details” 7/13/2019 Kelvin Sung (Use/modify with permission from © 2010 Larry Snyder, CSE)
From LightBot to XNA Programming Environment Concepts: IDE: Development Environment Project and source code Compile/Run Programming Concepts: Declare, Create, and Change {} and () InitializeWorld() and UpdateWorld() 7/13/2019 Kelvin Sung (Use/modify with permission from © 2010 Larry Snyder, CSE)
Variables Naming rules Assignments Operators Types of Variables X = 3; X = 3 + Y X += 4 Types of Variables int, float, Circle, Rectangle 7/13/2019 Kelvin Sung (Use/modify with permission from © 2010 Larry Snyder, CSE)
Circles and Rectangles CenterX/Y, Radius, Width, Height, Texture, Color, Label, LabelColor What happens when you change these How to change these to accomplish what you want Given a few lines of code: Describe what will you see Describe the behavior you expect Given a behavior, how will you code? Change the ball size by ThumbStick.Left.X? 7/13/2019 Kelvin Sung (Use/modify with permission from © 2010 Larry Snyder, CSE)
Parameters Parameters, arguments, and values Parameters for creating circles/rectangles Define parameters to represent speed Exercise-5: speedX/Y are used to control ball centerX/Y Player controls speedX/Y by providing values through thumbStick.Right 7/13/2019 Kelvin Sung (Use/modify with permission from © 2010 Larry Snyder, CSE)
Conditions (if) if (something) { doFirst doSecond } How to read this? What would happen? 7/13/2019 Kelvin Sung (Use/modify with permission from © 2010 Larry Snyder, CSE)
Privacy & Social Use of I’net Privacy – right of people to decide the extent they reveal information about themselves Discussion: Revealing other people’s information Guidelines for public discourse on I’net: Offensen… guidelines for posting on social network Ethics – What does it mean? Ten commandments of computer ethics 7/13/2019 Kelvin Sung (Use/modify with permission from © 2010 Larry Snyder, CSE)
Topic: Representing Information Information is physically represented by the presence or absence of some phenomenon at a specific place or time – Properties: discrete, be able to set it / detect it Give examples of these properties Direct use of properties: winking; dog barking; Other examples … abstract all as binary Numbers represented in binary Count, add, covert to/from decimal Difference between 0011 0111 and 0000 0111? Float and integer presentation of color 7/13/2019 Kelvin Sung (Use/modify with permission from © 2010 Larry Snyder, CSE)
Binary The number 77 can be written in binary … what is it? The binary number 0010 0010 0100 is what decimal number? Given binary 0101, 0101 what is their sum 7/13/2019 Kelvin Sung (Use/modify with permission from © 2010 Larry Snyder, CSE)
Game Changers … Many technological advances have come since WWII, but only a few are ‘game changers’ … what are examples? The invention of Integrated Circuits was a game changer because to properties, which were? http is a language computers speak to each other that enables what? 7/13/2019 Kelvin Sung (Use/modify with permission from © 2010 Larry Snyder, CSE)
Summary I have taught a LOT of capabilities and information – and you have worked hard to learn it! Good going!! What questions remain? 7/13/2019 Kelvin Sung (Use/modify with permission from © 2010 Larry Snyder, CSE)