Test 2 Review. General Info. All tests are comprehensive. You are still responsible for the material covered prior to the first exam. You will be tested.

Slides:



Advertisements
Similar presentations
AP Computer Science Anthony Keen. Computer 101 What happens when you turn a computer on? –BIOS tries to start a system loader –A system loader tries to.
Advertisements

Introduction to Macromedia Director 8.5 – Lingo
Getting Input in Python Assumes assignment statement, typecasts.
C Language.
Game with US Beginner Tutorial. Welcome!! Who I am What is Processing? Basic Coding Input Methods Images Classes Arrays.
One Dimensional Arrays
Introduction to Programming Lecture 39. Copy Constructor.
Data: Programming Design and Modularization IS 101Y/CMSC 101 Computational Thinking and Design Thursday, September 26, 2013 Marie desJardins University.
Processing Processing is a simple programming environment that was created to make it easier to develop visually oriented applications with an emphasis.
ICM Week 2. Structure - statements and blocks of code Any single statement ends with semicolon ; When we want to bunch a few statements together we use.
Multiple-Subscripted Array
PHYS 2020 Making Choices; Arrays. Arrays  An array is very much like a matrix.  In the C language, an array is a collection of variables, all of the.
Lecture 3 IAT 800. Sept 15, Fall 2006IAT 8002 Suggestions on learning to program  Spend a lot of time fiddling around with code –Programming is something.
PROCESSING Animation. Objectives Be able to create Processing animations Be able to create interactive Processing programs.
Review Blocks of code {.. A bunch of ‘statements’; } Structured programming Learning Processing: Slides by Don Smith 1.
Introduction to Object Oriented Design. Topics Designing Your Own Classes Attributes and Behaviors Class Diagrams.
Programming for Artists ART 315 Dr. J. R. Parker Art/Digital Media Lab Lec 10 Fall 2010.
A Level Computing#BristolMet Session Objectives U2#S6 MUST identify different data types used in programming aka variable types SHOULD describe each data.
Java Class Syntax CSIS 3701: Advanced Object Oriented Programming.
By Nicholas Policelli An Introduction to Java. Basic Program Structure public class ClassName { public static void main(String[] args) { program statements.
Visual Basic .NET BASICS
Programming Examples to Accompany Structure Topic Please use speaker notes for additional information!
Continuous February 16, Test Review What expression represents the zip car eligibility rules of at least 18 years old and no incidents?
FLTK Help Session By Richard Yu Gu CS 638 -Graphics Fall, 1999.
Keyboard and Events. What about the keyboard? Keyboard inputs can be used in many ways---not just for text The boolean variable keyPressed is true if.
Processing Lecture.2 Mouse and Keyboard
______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS + TECHNOLOGY [SIAT] |
Introduction to Windows Programming
Fundamentals of GUI Programming. Objectives: At the end of the session, you should be able to: describe the guidelines that are used for creating user-friendly.
Lecture 2: Introduction to C Programming. OBJECTIVES In this lecture you will learn:  To use simple input and output statements.  The fundamental data.
NA2204.1jcmt CSE 1320 Intermediate Programming C Program Basics Structure of a program and a function type name (parameters) { /* declarations */ statement;
Applications Development
Introduction to Processing. 2 What is processing? A simple programming environment that was created to make it easier to develop visually oriented applications.
B. RAMAMURTHY Simulating Motion and Implementing Animation.
Chapter 13 – C++ String Class. String objects u Do not need to specify size of string object –C++ keeps track of size of text –C++ expands memory region.
CIS 3.5 Lecture 2.2 More programming with "Processing"
Variables Art &Technology, 3rd Semester Aalborg University Programming David Meredith
Mouse Inputs in Processing. Interacting with the Mouse mouseX and mouseY: pg mouseXmouseY –The position of the mouse in the canvas pmouseX and.
C++ Basics. Compilation What does compilation do? g++ hello.cpp g++ -o hello.cpp hello.
Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004 More details and explanation …
Pointers *, &, array similarities, functions, sizeof.
Programming Games Logic. Slide show. Range input. Storage. Datatypes. Binary numbers. Homework: Catch up. This includes uploading projects to your server.
Computer Science I Classes and objects Classwork/Homework: Examine and modify my examples. Make your own.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 4: Events Programming with Alice and Java First Edition by John Lewis.
______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS + TECHNOLOGY [SIAT] |
Computer Science I Recap: variables & functions. Images. Pseudo-random processing.
Computer Science I Looping. User input. Classwork/Homework: Incorporate looping & user input into a sketch.
G RAPHICS & I NTERACTIVE P ROGRAMMING Lecture 2 More Programming with Processing.
Continuous. Flow of Control Programs can broadly be classified as being –Procedural Programs are executed once in the order specified by the code varied.
Python Lesson 1 1. Starter Create the following Excel spreadsheet and complete the calculations using formulae: 2 Add A1 and B1 A2 minus B2 A3 times B3.
Introduction to Programming
Data: Programming Design and Modularization IS 101Y/CMSC 101 Computational Thinking and Design Thursday, September 25, 2014 Carolyn Seaman Susan Martin.
Arrays. Topics to be Covered... Arrays ◦ Declaration ◦ Assigning values ◦ Array manipulation using loops Multi-dimensional arrays ◦ 2D arrays ◦ Declaration.
Review Expressions and operators Iteration – while-loop – for-loop.
Test Review. General Info. All tests will be comprehensive. You will be tested more on your understanding of code as opposed to your ability to write.
Gator Engineering Google Code Jam 2015 Copyright © 2008 W. W. Norton & Company. All rights reserved. 1.
David Streader Computer Science Victoria University of Wellington Copyright: David Streader, Victoria University of Wellington Java Programing Basics COMP.
Variables. Something to mention… void setup(){ size(200, 200); background(255); smooth(); } void draw() { stroke(0); strokeWeight(abs(mouseX-pmouseX));
Collision Theory and Logic
Topics Graphical User Interfaces Using the tkinter Module
Collision Theory and Logic
Basic Input and Output CSE 120 Winter 2018
Lesson 17: Building an App: Canvas Painter
More programming with "Processing"
Announcements How’s it going? My internet/power supply?
Python Basics with Jupyter Notebook
Java: Variables, Input and Arrays
Input, Variables, and Mathematical Expressions
Presentation transcript:

Test 2 Review

General Info. All tests are comprehensive. You are still responsible for the material covered prior to the first exam. You will be tested more on your ability to understanding code than on your ability to write code. There will be multiple choice and true/false questions. Studying this review is not enough; you are responsible for all material covered in the lecture notes.

Topics covered since last exam Writing and calling functions Manipulating images and text on the canvas Creating Interactive programs –Mouse and keyboard event handler functions –Mouse and keyboard built-in variables Using the functions:loop(), noLoop(), and reDraw() Using arrays Creating object orientated programs using classes and objects

Writing and calling functions Questions 7-9 from exam 1. Study the program targets.pde and answer the questions below.targets.pde What will be drawn by this program? How many parameters does the function drawTarget() have? Is there anything wrong with calling the function drawTarget() as shown below. drawTarget(100, 100, 100); What does the word void mean in the function definition : void drawTarget(int xloc, int yloc, int outerDia, int numCircles)

Manipulating images and text If the color depth of an image format is 8 bits, how many distinct colors can be represented? Name one image format that provides lossless compression and one that provides lossy compression. Does this command cause an image (that is stored in the sketch data folder) to appear on the canvas? PImage img=loadImage(“cartoonFace.gif"); Describe the difference between the data type String and the data type char. Is this a legal statement in Processing: ‘5’ + 5 ; What is printed by this statement: println(boolean(5)) ; Does this command cause text to appear on the canvas: PFont f = loadFont("Albany-48.vlw“, 40);

Creating Interactive programs Compare and contrast the programs mousey.pde and mousePressed.pde, and answer the questions below. mousey.pdemousePressed.pde –Which program contains an event handler? –Do the programs respond to user inputs differently? Explain the differences; be specific. –How is the function mousePressed() called? –What values are stored in the variables mouseX, mouseY ?

Functions: loop(), noLoop(), and reDraw() Study the program loopNoLoop.pde and answer the questions below.loopNoLoop.pde –Does the program contain any event handlers, and if so how many? –Explain exactly what the program does when it’s running and the user interacts with the program by: (1) pressing a key on the keyboard, or (2) pressing a mouse button.

Arrays Declare an array large enough to hold 100 float variables. Declare an array of 10 integers and store the value 1 in each element in the array. Explain what happens when the following segment of code is run. float[] coswave = new float[100]; for (int i = 0; i < 100; i++) { coswave[i] = i; }

Classes and Objects Explain the relationship between an object and a class. Study the Spot class and the program ExplodingSpots that uses that class. Answer the questions below.Spot ExplodingSpots –Identify the Spot class constructor. –Identify a line of code in which that constructor is called. –Identify a line of code in which a Spot object is created. –How many data members does the Spot class have?