Time to upload Virtual something.

Slides:



Advertisements
Similar presentations
Introducing JavaScript
Advertisements

Introducing Java CSC1401. Course Goals Teaching programming concepts In a “real” language.
INTRODUCTION Chapter 1 1. Java CPSC 1100 University of Tennessee at Chattanooga 2  Difference between Visual Logic & Java  Lots  Visual Logic Flowcharts.
Georgia Institute of Technology DrJava Appendix A Barb Ericson Georgia Institute of Technology May 2006.
HTML and Web Page Design Presented by Frank H. Osborne, Ph. D. © 2005 ID 2950 Technology and the Young Child.
CS 330 Programming Languages 10 / 16 / 2008 Instructor: Michael Eckmann.
Programming Introduction November 9 Unit 7. What is Programming? Besides being a huge industry? Programming is the process used to write computer programs.
Compilers and Interpreters. Translation to machine language Every high level language needs to be translated to machine code There are different ways.
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
Programming Games Computer science big ideas. Computer Science jargon. Show virtual dog Homework: [Catch up: dice game, credit card or other form.] Plan.
1 Software John Sum Institute of Technology Management National Chung Hsing University.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)
A First Program Using C#
Programming games Flash drawing trick(s). Rock paper scissors. Classwork: Complete rock paper scissors.
CS413: Java Programming language Applications Applets
Hello World 2 What does all that mean?.
Introduction to Programming Peggy Batchelor.
Programming Games Show your simple video. More video examples. Audio. Classwork/Homework: Produce more complex video program.
Geometers Sketch pad. Step 1: Open Sketch pad Use this to select items Use this to draw a point Use this to draw a circle Use this to draw a line Use.
Chapter 10 Fireworks: Part II The Web Warrior Guide to Web Design Technologies.
CPSC1301 Computer Science 1 Overview of Dr. Java.
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
Applets Yong Choi School of Business CSU, Bakersfield.
1 Programming Environment and Tools VS.Net 2012 First project MSDN Library.
Programming games Problems. Schedule Various examples. Homework: rps, bo (don't go back to do this), cannonball, Video or Audio should be complete. Now.
Lesson 3: Arrays and Loops. Arrays Arrays are like collections of variables Picture mailboxes all lined up in a row, or storage holes in a shelf – You.
Programming games Context of what we are doing. Drawing on canvas. Homework: [Complete coin toss examples.] Do your own drawings. Upload files to website.
Compilers and Interpreters. HARDWARE Machine LanguageAssembly Language High Level Language C++ Visual Basic JAVA Humans.
Computer Science I Classes and objects Classwork/Homework: Examine and modify my examples. Make your own.
1 Printing in Python Every program needs to do some output This is usually to the screen (shell window) Later we’ll see graphics windows and external files.
Computer Science I Programming in Java (programming using Processing IN Java, using IntelliJ IDE) Classwork/Homework: copy your Processing projects over.
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.
Introduction to OOP CPS235: Introduction.
Computer Science I Share plans for virtual something. Text. Show my virtual dog. Classwork: Plans for your virtual something. Homework: start implementation.
JavaScript 101 Introduction to Programming. Topics What is programming? The common elements found in most programming languages Introduction to JavaScript.
Computer Science I Variables. Methods. Classwork/Homework: Re-do or do new drawing using variables & function(s). Zip folder and upload to Moodle dropbox.
JavaScript Introduction and Background. 2 Web languages Three formal languages HTML JavaScript CSS Three different tasks Document description Client-side.
Beginning JavaScript 4 th Edition. Chapter 1 Introduction to JavaScript and the Web.
Computer Science I Animations. Bouncing ball. The if statement. Classwork/homework: bouncing something. Compress and upload work to Moodle.
Computer Science I Go over midterm. Reprise on curves. Table examples. The map function. Testing Strings. Fonts. Classwork/Homework: Complete midterm project.
Computer Science I More class examples. Paths. Jigsaw. Tolerance. Classwork/homework: Your class project. Post proposal for midterm project.
© Peter Andreae Java Programs COMP 102 # T1 Peter Andreae Computer Science Victoria University of Wellington.
Computer Science I Slingshot example. ProcessingJS example. Review for midterm quiz. Classwork/Homework: study for midterm. Work on midterm project.
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
Creating User Interfaces VoiceXML. Examples. Classwork/Homework: Make proposal and start work on your VoiceXML project.
Computer Science I Libraries. Sound. Saving frames as images. Classwork/Homework: Make sketch using sound. Add saving frames.
Software Design and Development Languages and Environments Computing Science.
Creating User Interfaces Reprise on guest speaker. Usability checklists. Reprise on user- centered. Semantic tags. Responsive design. Classwork/homework:
OCR A Level F453: The function and purpose of translators Translators a. describe the need for, and use of, translators to convert source code.
Programming 2 Intro to Java Machine code Assembly languages Fortran Basic Pascal Scheme CC++ Java LISP Smalltalk Smalltalk-80.
Java Programming Fifth Edition Chapter 1 Creating Your First Java Classes.
Web Programming Java Script-Introduction. What is Javascript? JavaScript is a scripting language using for the Web. JavaScript is a programming language.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Why don’t programmers have to program in machine code?
High or Low Level Programming Language? Justify your decision.
Appendix A Barb Ericson Georgia Institute of Technology May 2006
Classwork: Examine and enhance falling drop(s) or make your own.
Computer Science I Variables. Methods.
Eclipse Navigation & Usage.
Learning Java with Alice 3.0 Game Design Kathy Bierscheid
Programming Games Computer science big ideas and Computer Science jargon: review of things we have used in examples. Show virtual dog Homework: [Catch.
Unit 1: Introduction Lesson 1: PArts of a java program
Computer Science I Fonts. Building on one jigsaw to make another.
The C Programming Language
Programming games Classes and objects (used for Jigsaw, Bouncing stuff, other projects) Homework: Complete cannonball. Video or Audio. Your own project.
Running a Java Program using Blue Jay.
IS 135 Business Programming
Intro to Programming (in JavaScript)
Presentation transcript:

Time to upload Virtual something. Computer Science I Time to upload Virtual something. Compilation. Compile versus interpret. Strong typing. Family Collage. Libraries. Classwork/Homework: Finish and upload Virtual something. Explore libraries.

[step back] The Processing Development Environment (PDE) Editor for code Compile (translate) sketch code. This will find certain errors (syntactic errors) and give hints. Only continue if no errors Link together that code and anything built-in or in imported libraries May discover errors Run (Execute) the result. May discover errors

Syntactic errors vs semantic errors Finding errors is good! Let PDE ("the computer") do that work. Finding semantic errors is difficult.

Compile versus Interpret Some programming languages are interpreted. JavaScript (used with HTML) is translated one statement at a time, during execution. Positive features of interpreted languages (JavaScript): Source code visible. Flexibility in typing. With HTML JavaScript, you may see the result each time. Can use Web Console for some hints on errors. Positive features of compiled languages (Processing): More complete and better checking and hints. Executable (product of compilation) fast.

Libraries All programming languages have ways to add features. It is often called Libraries. The processing.core Library was what we added to Java. In Processing, to add Library, need to Sketch/Import Library … find the Library. Select. In your code: import ….

Processing … will make hint that you need to import library. Recall comments on import processing.core.*; Note: sometimes error is that programmer made typo in method name.

Family collage example Objective: build program that shows items on the screen rectangle, picture, video clip Let user drag item, duplicate item, remove item. These operations indicated by certain keys. Plan: define Item class, subclasses MovieItem and ImageItem Need to import movie library. TWO STEPS. Enjoy sharing of code for 3 types of items.

Videos in Processing The fact that Processing is built on (in) Java becomes visible. In next statement, this is a reference to the Papplet that contains all the code. myMovie = new Movie(this,"pantsoyoyoy.mov"); Need to define and include a movieEvent function. This is called a callback. // Called every time //a new frame is available to read void movieEvent(Movie m) { m.read(); }

Video in my Collage sketch Import the video library, it is part of Processing, but not the core: Use Sketch/Import Library … In code, at top: import processing.video.*; My sketch has a Movie object and a MovieItem object: MovieItem is a class I made. Global variables, code in setup, code in class definition.

Function, class, method Functions: Classes: setup, draw, mouseClicked, mousePressed, mouseDragged,mouseReleased,keyPressed,movieEvent overWhich, swapThem, removeFromItemsArray Classes: Item, methods: Item, isOver, removeIt, display, move, duplicate, restart (this is empty in Item) MovieItem, methods: MovieItem, removeIt, duplicate, display, restart ImageItem, methods: ImageItem, duplicate, display

Note (and appreciate) The isOver and move methods did not need to be done for the subclasses. The thinking through the design helped even when the subclass required a new method. Making such a list is standard part of planning AND documentation. Alternate is calling and called by table.

Examine code Use list Think about how to add other item types.

Classwork / Homework Finish and post your virtual something. Extra credit: research and make posting on compile versus interpreted languages. Don't just copy. Make sure you understand it.