FUNDAMENTALS OF PROGRAMMING SM1204 Semester A 2010/2011.
-
date post
19-Dec-2015 -
Category
Documents
-
view
230 -
download
2
Transcript of FUNDAMENTALS OF PROGRAMMING SM1204 Semester A 2010/2011.
![Page 1: FUNDAMENTALS OF PROGRAMMING SM1204 Semester A 2010/2011.](https://reader036.fdocuments.in/reader036/viewer/2022081508/56649d2d5503460f94a03661/html5/thumbnails/1.jpg)
FUNDAMENTALS OF PROGRAMMING
SM1204 Semester A 2010/2011
![Page 2: FUNDAMENTALS OF PROGRAMMING SM1204 Semester A 2010/2011.](https://reader036.fdocuments.in/reader036/viewer/2022081508/56649d2d5503460f94a03661/html5/thumbnails/2.jpg)
Self-Introduction
• Oscar Au
• Tel: (852) 3442 5725Fax: (852) 3586 1484E-mail: [email protected]: ICSCM14 (Inno Center 5th floor)
• http://sweb.cityu.edu.hk/kincau/
![Page 3: FUNDAMENTALS OF PROGRAMMING SM1204 Semester A 2010/2011.](https://reader036.fdocuments.in/reader036/viewer/2022081508/56649d2d5503460f94a03661/html5/thumbnails/3.jpg)
Tentative Topics
o Programming fundamentalso General problem solving skillso 2D algorithmic graphicso Motion and animationo User interaction (keyboard & mouse)o Interactivity with image, video and soundo Basic object oriented programmingo (optional) Basic 3D programmingo And more …
![Page 4: FUNDAMENTALS OF PROGRAMMING SM1204 Semester A 2010/2011.](https://reader036.fdocuments.in/reader036/viewer/2022081508/56649d2d5503460f94a03661/html5/thumbnails/4.jpg)
Programming
o What is programming?
o Designing, writing, testing, debugging, troubleshooting, maintaining code and program…
o Is an art? a craft? An engineering discipline? A science?
![Page 5: FUNDAMENTALS OF PROGRAMMING SM1204 Semester A 2010/2011.](https://reader036.fdocuments.in/reader036/viewer/2022081508/56649d2d5503460f94a03661/html5/thumbnails/5.jpg)
Programming
Separation of programming layers
Data
Logic Presentation
![Page 6: FUNDAMENTALS OF PROGRAMMING SM1204 Semester A 2010/2011.](https://reader036.fdocuments.in/reader036/viewer/2022081508/56649d2d5503460f94a03661/html5/thumbnails/6.jpg)
Programming
o Where are these fields of software belongs to?o Database, AI, networking, operating
system, business software, games
o What are we focusing?
![Page 7: FUNDAMENTALS OF PROGRAMMING SM1204 Semester A 2010/2011.](https://reader036.fdocuments.in/reader036/viewer/2022081508/56649d2d5503460f94a03661/html5/thumbnails/7.jpg)
Programming
We learn programming because there are something we want to present!
Data
Logic PresentationHere we are!
![Page 8: FUNDAMENTALS OF PROGRAMMING SM1204 Semester A 2010/2011.](https://reader036.fdocuments.in/reader036/viewer/2022081508/56649d2d5503460f94a03661/html5/thumbnails/8.jpg)
Possibilities
What could we do with our own programs?
Visualization Check! www.visualcomplexity.com
![Page 9: FUNDAMENTALS OF PROGRAMMING SM1204 Semester A 2010/2011.](https://reader036.fdocuments.in/reader036/viewer/2022081508/56649d2d5503460f94a03661/html5/thumbnails/9.jpg)
Possibilities
What could we do with our own programs?
Interactions
![Page 10: FUNDAMENTALS OF PROGRAMMING SM1204 Semester A 2010/2011.](https://reader036.fdocuments.in/reader036/viewer/2022081508/56649d2d5503460f94a03661/html5/thumbnails/10.jpg)
Possibilities
What could we do with our own programs?
Arts
![Page 11: FUNDAMENTALS OF PROGRAMMING SM1204 Semester A 2010/2011.](https://reader036.fdocuments.in/reader036/viewer/2022081508/56649d2d5503460f94a03661/html5/thumbnails/11.jpg)
Processing
o Development platform: Processing 1.2
o Open source programming language & environment
o Based on Javao Designed for visual context and arts –
including images, animations, and interactions
![Page 12: FUNDAMENTALS OF PROGRAMMING SM1204 Semester A 2010/2011.](https://reader036.fdocuments.in/reader036/viewer/2022081508/56649d2d5503460f94a03661/html5/thumbnails/12.jpg)
Installation
o To install Processing in your computer …o Download from processing.org
http://processing.org/download/
o Windows & Linux performso Unzip and run processing.exe / processing
o Mac OS X performo Drag dmg file to Applications folder
![Page 13: FUNDAMENTALS OF PROGRAMMING SM1204 Semester A 2010/2011.](https://reader036.fdocuments.in/reader036/viewer/2022081508/56649d2d5503460f94a03661/html5/thumbnails/13.jpg)
Introduction of UI
Display window
ToolbarMenu bar
Tabs
Text editor
Message area
console
![Page 14: FUNDAMENTALS OF PROGRAMMING SM1204 Semester A 2010/2011.](https://reader036.fdocuments.in/reader036/viewer/2022081508/56649d2d5503460f94a03661/html5/thumbnails/14.jpg)
Introduction of UI
o Let make your first program!o Type “ellipse(50, 50, 80, 80);” in the text
editoro Press RUN button to execute your
programo Press STOP button to stop
Output
![Page 15: FUNDAMENTALS OF PROGRAMMING SM1204 Semester A 2010/2011.](https://reader036.fdocuments.in/reader036/viewer/2022081508/56649d2d5503460f94a03661/html5/thumbnails/15.jpg)
Introduction of UI
o To save your program, press SAVE button
o Each processing program is called sketcho ! Each sketch has to be placed in a folder
with same name in order to run correctly
o Press LOAD button to load a saved sketcho To create a new sketch, press NEW button
![Page 16: FUNDAMENTALS OF PROGRAMMING SM1204 Semester A 2010/2011.](https://reader036.fdocuments.in/reader036/viewer/2022081508/56649d2d5503460f94a03661/html5/thumbnails/16.jpg)
Introduction of UI
o You can share you work by exporting your program to java applet
o Press EXPORT button and select a folder to export
o Open html file in browser to check the results
Exported files
Applet in browser
![Page 17: FUNDAMENTALS OF PROGRAMMING SM1204 Semester A 2010/2011.](https://reader036.fdocuments.in/reader036/viewer/2022081508/56649d2d5503460f94a03661/html5/thumbnails/17.jpg)
Demo
![Page 18: FUNDAMENTALS OF PROGRAMMING SM1204 Semester A 2010/2011.](https://reader036.fdocuments.in/reader036/viewer/2022081508/56649d2d5503460f94a03661/html5/thumbnails/18.jpg)
Assessment
o In-class exercises and discussion: 30%
o 3 Assignments: 70% (20% + 20% + 30%)
o Curved grading: A+, A, A-, B+, ….