LCC 6310 Computation as an Expressive Medium

Slides:



Advertisements
Similar presentations
INTRODUCTION Chapter 1 1. Java CPSC 1100 University of Tennessee at Chattanooga 2  Difference between Visual Logic & Java  Lots  Visual Logic Flowcharts.
Advertisements

 2005 Pearson Education, Inc. All rights reserved Introduction.
Introduction to Object-Oriented Programming CS 21a: Introduction to Computing I First Semester,
Client Side Programming Using Java Applet Outcomes: You will be expected to know: – Java Applets and HTML file; –bytecode and platform independent programs;
IAT 800 Foundations of Computational Art and Design Lecture 2.
Slides prepared by Rose Williams, Binghamton University Chapter 1 Getting Started 1.1 Introduction to Java.
Objects and Classes First Programming Concepts. 14/10/2004Lecture 1a: Introduction 2 Fundamental Concepts object class method parameter data type.
Embedded Systems Programming Introduction to cross development techniques.
Aalborg Media Lab 21-Jun-15 Software Design Lecture 1 “ Introduction to Java and OOP”
 2003 Prentice Hall, Inc. All rights reserved. Customized by Sana Odeh for the use of this class. 1 Introduction to Computers and Programming in JAVA.
Introduction to Java CS 331. Introduction Present the syntax of Java Introduce the Java API Demonstrate how to build –stand-alone Java programs –Java.
CS 225 Java Review. Java Applications A java application consists of one or more classes –Each class is in a separate file –Use the main class to start.
COMP 14: Primitive Data and Objects May 24, 2000 Nick Vallidis.
1. 2 Chapter 1 Introduction to Computers, Programs, and Java.
Lecture 1: Overview of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++ Designed.
Hello AP Computer Science!. What are some of the things that you have used computers for?
Introduction to Java Appendix A. Appendix A: Introduction to Java2 Chapter Objectives To understand the essentials of object-oriented programming in Java.
Peter Andreae Computer Science Victoria University of Wellington Copyright: Peter Andreae, Victoria University of Wellington Summary and Exam COMP 102.
Introduction to Java and Object-Oriented Programming AJSS Computer Camp Department of Information Systems and Computer Science Ateneo de Manila University.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
The Java Programming Language
CS 11 java track: lecture 1 Administrivia need a CS cluster account cgi-bin/sysadmin/account_request.cgi need to know UNIX
Lecture 2: Classes and Objects, using Scanner and String.
Geoff Holmes and Bernhard Pfahringer COMP206-08S General Programming 2.
Basics of Java IMPORTANT: Read Chap 1-6 of How to think like a… Lecture 3.
Netprog: Java Intro1 Crash Course in Java. Netprog: Java Intro2 Why Java? Network Programming in Java is very different than in C/C++ –much more language.
CHAPTER 3 GC Java Fundamentals. 2 BASICS OF JAVA ENVIRONMENT  The environment  The language  Java applications programming Interface API  Various.
Chapter 2: Java Fundamentals
Using Data Within a Program Chapter 2.  Classes  Methods  Statements  Modifiers  Identifiers.
Jeliot – A powerful Java tutor for beginners Boro Jakimovski Institute of Informatics Faculty of Natural Sciences and Mathematics University “Ss Cyril.
Mixing integer and floating point numbers in an arithmetic operation.
1 Chapter 3 Syntax, Errors, and Debugging Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
College Board A.P. Computer Science A Topics Program Design - Read and understand a problem's description, purpose, and goals. Procedural Constructs -
BEGINNING PROGRAMMING.  Literally – giving instructions to a computer so that it does what you want  Practically – using a programming language (such.
22-July-2002cse142-13B-Development © 2002 University of Washington1 Development Tools CSE 142, Summer 2002 Computer Programming 1
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
Working With Objects Tonga Institute of Higher Education.
LCC 6310 Computation as an Expressive Medium Lecture 2.
By Mr. Muhammad Pervez Akhtar
Spring 2009 Programming Fundamentals I Java Programming XuanTung Hoang Lecture No. 8.
1.1: Objects and Classes msklug.weebly.com. Agenda: Attendance Let’s get started What is Java? Work Time.
Computer Science A 1. Course plan Introduction to programming Basic concepts of typical programming languages. Tools: compiler, editor, integrated editor,
ITP 109 Week 2 Trina Gregory Introduction to Java.
Programming for Interactivity Professor Bill Tomlinson Tuesday & Wednesday 6:00-7:50pm Fall 2005.
Execution ways of program References: www. en.wikipedia.org/wiki/Integrated_development_environment  You can execute or run a simple java program with.
Intro to Programming STARS College of Communication and Information Florida State University Written by: Hannah Brock Alissa Ovalle Nicolaus Lopez Martin.
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
Java Fundamentals MIS 3023 Business Programming Concepts II The University of Tulsa Professor: Akhilesh Bajaj All slides in this presentation ©Akhilesh.
Introduction to Algorithm. What is Algorithm? an algorithm is any well-defined computational procedure that takes some value, or set of values, as input.
Variable Scope & Lifetime
Fundamentals of Programming I Overview of Programming
Lecture 2 D&D Chapter 2 & Intro to Eclipse IDE Date.
Chapter No. : 1 Introduction to Java.
Introduction to Computer Science / Procedural – 67130
Data types and variables
Lecture Note Set 1 Thursday 12-May-05
Programming Language Concepts (CIS 635)
String Output ICS 111: Introduction to Computer Science I
CS-0401 INTERMEDIATE PROGRAMMING USING JAVA
Introduction to Java part 2
Introduction to Algorithm Design
Object Oriented Programming
Sridhar Narayan Java Basics Sridhar Narayan
Chap 1 Chap 2 Chap 3 Chap 5 Surprise Me
Anatomy of a Java Program
In this class, we will cover:
Java’s Central Casting
Computer Programming-1 CSC 111
LCC 6310 Computation as an Expressive Medium
LCC 6310 Computation as an Expressive Medium
Presentation transcript:

LCC 6310 Computation as an Expressive Medium Lecture 2

Administrivia Status of books? Enrollment Lab times

Overview Discuss readings Java programming with BlueJ Two classic examples of textual interaction Eliza Adventure

What do you think of this? “Which means that those computer scientists who invented these technologies … are the important artists of our time, maybe the only artists who are truly important and who will be remembered from this historical period.” Lev Manovich

NMR Introductions Relationship between art and CS Should new media artists program? Why? What about collaboration? Computation as a medium

Personal Dynamic Media – Kay & Goldberg The vision of the contemporary laptop computer “If the ‘medium is the message’, then the message of low- bandwidth timesharing is ‘blah.’ But, moves beyond contemporary environments in supporting end-user tool creation “The total range of possible users is so great that any attempt to specifically anticipate their needs in the design of the Dynabook would end in a disastrous feature- laden hodgepodge which would not be suitable for anyone.”

Introduction to BlueJ Graphical environment for creating and editing classes Classes are associated with projects, where a project is a collection of related classes Each project is in it’s own directory Automatically creates templates for new classes Demo

Comments Comments are non-program text you put in the file to describe to others (and yourself) what you’re doing Important for being able to look back at your code and understand it Single-line comments begin with // Multi-line comments begin with /* and end with */

Editing and compiling classes Demo with Greeter class Greeter { String greeting; public Greeter(String newGreeting) { greeting = newGreeting; } public void greet(String name) { System.out.println(greeting + ", " + name);

Creating objects and running methods BlueJ gives you a Java interpreter Interpreters let you evaluate expressions on the fly You can use the interpreter to create instances (objects) from classes You can look at the fields and methods of an object You can even invoke methods on an object (without a public static void main) Demo

Creating a second class Demo with Driver class Driver { public static void main(String args[]) { Greeter g1 = new Greeter("Hello"); Greeter g2; g2 = new Greeter("Good morning"); g1.greet("Bob"); g2.greet("Mary"); g1.greet("Sam"); g2.greet("Joan"); }

Debugger BlueJ provides a graphical debugger Debuggers help you to see what your code is doing Debugger concepts Breaking Stepping Continuing Call stack Variables Demo

Miscellaneous BlueJ problems BlueJ has some bugs (gasp) Creating bug-free software is virtually impossible Some problems to look for Selecting the top of the call stack Resetting the virtual machine

Types A type is a restriction on the value of a field or variable The compiler checks types for consistency A truth of debugging: Errors are much harder to find when you run your program (runtime), than when you compile your program (compile time) Types allow the compiler to catch errors before you run your program Classes are types!!!! Demo

Things that have types Fields Variables Arguments (a special kind of variable) Return values

Java API documents There are a lot of classes in the Java class library The description of each class includes links to related classes Parents Children Return values Arguments Related classes

Class System The System class provides access to console IO as well as several utility methods out is a field of type PrintStream Use it to print to the console in is a field of type InputStream Use it to read from the console

Class PrintStream Makes it easy to create output Generic – I could potentially use a PrintStream to output to the console, the network, a file, … System.out is an instantiated PrintStream (an object created from PrintStream) that is bound to (writes to) the console

The mysterious System.out.println System is a class Normally we can only refer to fields or methods on objects, but sometimes we refer specifically to the class A period - . – provides field access A period - . – also provides method access So… System.out refers to the static field out on the class System out.println(…) refers to the method println on the PrintStream object held in the field out

Class String The innocent String is actually a class! Any String object provides a lot of methods and has structure Demo

Primitive types As a concession to efficiency, there are a few types that aren’t classes You don’t use new You can’t call methods Some primitives int, float, double, long, byte, char, boolean Demo

Computation as a medium Text input and output – fundamental interaction Language The conversational metaphor Ergodics (thanks Espen)

Text – persona Take the conversational metaphor literally The first chatterbot – Eliza Expectation – scripting the interaction

Text – place and object Take action with a represented space Command language Segment experience into places and objects Descriptive language The first adventure game (interactive space) - Adventure