Introduction to Programming. The Programming Process Create/Edit Program Compile Program Execute Program Compile Errors?Run-Time Errors? Source Program.

Slides:



Advertisements
Similar presentations
A Programmer's Introduction to Java - from a S/370 user (c) IDMS/SQL News
Advertisements

Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
Introduction to Java Kiyeol Ryu Java Programming Language.
Introduction to Java Programming, 4E
Aalborg Media Lab 18-Jun-15 Introduction Introduction to System Design I Fall 2004.
1 Applets Chapter 1 To understand:  why applets are used to extend the capabilities of Web pages  how an applet is executed and know about the restrictions.
01 Introduction1June Introduction CE : Fundamental Programming Techniques.
For more Lectures and Notes Visit
1. 2 Chapter 1 Introduction to Computers, Programs, and Java.
CSE 1301 J Lecture 2 Intro to Java Programming Richard Gesick.
Sadegh Aliakbary Sharif University of Technology Fall 2011.
Developing User Interfaces (DUI) Chris North cs3724: HCI.
BASIC JAVA PROGRAMMING TUTORIAL. History  James Gosling and Sun Microsystems  Oak  Java, May 20, 1995, Sun World  Hot Java –The first Java-enabled.
Introduction to Java Programming CS 21a: Introduction to Computing I Department of Information Systems and Computer Science Ateneo de Manila University.
Introduction to Java Programming with JBuilder 4
Introduction to Java Programming CS 21a: Introduction to Computing I First Semester,
+ Java vs. Javascript Jessi Style. + Java Compiled Can stand on its own Written once, run anywhere Two-stage debugging Java is an Object Oriented Programming.
S.W. Ma/CIM/LWL41211/2 Prog. IIA Page 1 HKIVE (Lee Wai Lee Campus) Department of CIM Course : Year 2 Module : Programming IIA Textbook : Introduction.
CSE 452: Programming Languages Java and its Evolution.
Java Workshop for Teachers May 6, 2005 A Brief Look at the Java Programming Language.
Sadegh Aliakbary Sharif University of Technology Spring 2011.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Programming Languages Machine.
Java Lecture 16: Dolores Zage. WWW n Was a method for distributing passive information n added forms and image maps n interaction was only a new way to.
Java Introduction Lecture 1. Java Powerful, object-oriented language Free SDK and many resources at
Applets Chapter 17.  Java’s big splash onto the scene came in the mid 90’s. The people at Sun Microsystems had managed to work java programs into Web.
Applets and Frames CS 21a: Introduction to Computing I First Semester,
Introduction to Java Programming. History F James Gosling and Sun Microsystems F Oak F Java, May 20, 1995, Sun World F HotJava –The first Java-enabled.
Sadegh Aliakbary Sharif University of Technology Fall 2012.
Rina System development with Java Instructors: Rina Zviel-Girshin Interdiciplinary Center Herzlia School of the Computer Science Fall:
Introduction to Java and Object-Oriented Programming AJSS Computer Camp Department of Information Systems and Computer Science Ateneo de Manila University.
1 Part I : Chapter 01 Introduction to Java Programming.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
1 Computer Systems -- Introduction  Chapter 1 focuses on:  the structure of a Java application  basic program elements  preparing and executing a program.
1.8History of Java Java –Based on C and C++ –Originally developed in early 1991 for intelligent consumer electronic devices Market did not develop, project.
Java Applets. 2 Introduction to Java Applet Programs  Applications are stand alone programs executed with Java interpreter executed with Java interpreter.
OOP (Java): Simple/ OOP (Java) Objectives – –give some simple examples of Java applications and one applet 2. Simple Java Programs Semester.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to.
Jaeki Song ISQS6337 JAVA Lecture 03 Introduction to Java -The First Java Application-
Java Programming, Second Edition Chapter One Creating Your First Java Program.
Clement Allen, PhD Florida A&M University SUMMER 2006.
1 Programming Fundamentals AITI-GP. 2 Introduction to Programming.
The Joy of Programming (also known as) Introduction to Object-Oriented Programming.
An Introduction to Software Development Java Methods A & AB Object-Oriented Programming and Data Structures Maria Litvin ● Gary Litvin Copyright © 2006.
Introduction to Java Applets Sangeetha Parthasarathy 05/21/2001.
Introduction to Java Programming. Introduction Course Objectives Organization of the Book.
Java Applets. 2 Introduction to Java Applet Programs Applications are ___________________ programs –executed with Java interpreter Applet is a small program.
Lecture 1 Introduction. Instructor Name: Seokwoo Song Office: business 524 Phone: Office Hours: M W 4:30 – 5:30 PM or by appointment
Java and its Evolution. Contents Java Introduction Java Features How Java Differs from other OO languages Java and the World Wide Web Java Environment.
Applets and Frames. Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved L14: GUI Slide 2 Applets Usually.
J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program Design, Second Edition Second Edition D.S. Malik D.S. Malik.
Chapter 1: Introducing JAVA. 2 Introduction Why JAVA Applets and web applications Very rich GUI libraries Portability (machine independence) A real Object.
Lecture 1. Introduction to Programming and Java MIT- AITI 2003.
Java -- A very Hot Object- Oriented Language Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung Institute of.
Introduction Mehdi Einali Advanced Programming in Java 1.
Introduction to Java Programming. 2 Chapter 1 Introduction to Java and Forte F What Is Java? F Getting Started With Java Programming –Create, Compile.
CSI 3125, Preliminaries, page 1 Applet. CSI 3125, Preliminaries, page 2 Applet An applet is a Java program that runs in a Web browser. An applet can be.
Client-Server applications Introduction to Java Applets Client-server architectures Why do Applets exist? What can an Applet do?
Applets. 9/04/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved L12: Applets Slide 2 Applets Usually.
1 Applets Programming. Introduction Java programs are divided into two main categories, applets and applications. An application is an ordinary Java program.
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 15: Java Basics Fundamentals of Web Programming.
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Chapter 1 Introduction to Computers, Programs, and Java
Introduction to.
Java Applets.
Java Evolution Java History. Java Features.
Introducing Java.
Debugging Exercise 00 Try compiling the code samples.
A Brief History January 1996: first official release JDK 1.0
Outcome of the Lecture Upon completion of this lecture you will be able to understand Fundamentals and Characteristics of Java Language Basic Terminology.
Presentation transcript:

Introduction to Programming

The Programming Process Create/Edit Program Compile Program Execute Program Compile Errors?Run-Time Errors? Source Program Object Program

Programming No matter what kind of computer you have, it works by following specific steps These steps are called the computer’s program A large part (but not all) of CS 21a is about how to write programs

Object-Oriented Programming Several years ago, Ateneo was the first school in the Philippines (and one of the first in the world) to teach Java as the first programming language for CS and MIS majors Now Java is a well-accepted teaching language, and very highly in-demand in industry Among others … one advantage of Java is that it makes learning Object-Oriented Programming (OOP) easier than with other languages

What is Object-oriented Programming? Programs are written as systems of interacting objects Objects are “things” that can have state and properties and can “do” certain actions Began in the 1960’s with Simula, a language for writing simulations Popularized in the 80’s by Smalltalk, then C++ in the late 80’s, and then Java in the late-90’s Allows you to write very complex and large systems, as well as maximize reuse and flexibility

Object-oriented Programming Object-oriented design makes it easy to understand and define the program Makes writing big, complex programs easier Little pieces compose complex systems Just like in real life (e.g., cells make up living things)

Introduction to Java

Java 1991 Sun Microsystems develops a language (based on C) for consumer electronic devices 1993 WWW explodes in popularity increased need for “dynamic” Web pages 1995 Sun formally announces Java for web use

What is Java? Java is a general purpose programming language that is: object-oriented interpreted, architecture-neutral, portable distributed (network-aware), secure simple, robust multi-threaded high-performance (?)

Two types of Java programs: Applications general-purpose programs standalone executed through the operating system Applets programs meant for the WWW embedded in a Web page normally executed through a browser

Simple Java Application File: Hello.java // Hello World application public class Hello { public static void main( String args[] ) { System.out.println( “Hello world” ); }

Creation, Compilation, and Execution Create Java program C:\> edit Hello.java Hello.java file is created Compile using javac (compiler) C:\> javac Hello.java Hello.class file is produced Execute using java (interpreter) C:\>java Hello requires a Hello.class file

Simple Java Applet File: HelloAgain.java import javax.swing.*; import java.awt.*; public class HelloAgain extends JApplet { public void paint( Graphics g ) { g.drawString( “Hello”, 50, 50 ); }

Executing Applets After compiling the java program: Embed an “applet tag” in an.html document that references the.class file Open the.html document using a browser or the appletviewer

Sample.html Document File: HA.html My Sample Applet

What is HTML? Hypertext Markup Language Underlying language of Web pages A means of providing formatting instructions for presenting content Text-based.html documents: collection of content and controls (tags)

Java Program Structure Java Program (optional) import declarations class declaration Class class name should match its file name may extend an existing class (such as JApplet) contains method/function declarations