Software for Translators Barcelona, January 2002.

Slides:



Advertisements
Similar presentations
Designing a Program & the Java Programming Language
Advertisements

Introduction to programming in java. Input and output to screen with Java program Structure of Java programs Statements Conditional statements.
Your First Java Program: HelloWorld.java
1 Java Basics. 2 Compiling A “compiler” is a program that translates from one language to another Typically from easy-to-read to fast-to-run e.g. from.
CHAPTER 1 INTRODUCTION GOALS  To understand the activity of programming  To learn about the architecture of computers  To learn about machine code and.
Java Intro. A First Java Program //The Hello, World! program in Java public class Hello { public static void main(String[] args) { System.out.println("Hello,
Slide 1 of 40. Lecture A The Java Programming Language Invented 1995 by James Gosling at Sun Microsystems. Based on previous languages: C, C++, Objective-C,
Hello, world! Dissect HelloWorld.java Compile it Run it.
1 Building Java Programs Chapter 1: Introduction to Java Programming These lecture notes are copyright (C) Marty Stepp and Stuart Reges, They may.
IB Computer Science II Paul Bui
Languages and tools. BY SA machine code.
“Introduction to Programming With Java”
Introduction to Python Dr. Bernard Chen Ph.D. University of Central Arkansas July 9 th 2012
Hello AP Computer Science!. What are some of the things that you have used computers for?
Basics Programming Concepts. Basics A computer program is a set of instructions to tell a computer what to do Machine language = circuit level language.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
©Xiaoying Gao, Peter Andreae First Java Program COMP 102 #2 2014T2 Xiaoying Sharon Gao Computer Science Victoria University of Wellington.
Programming in Python Part I Dr. Fatma Cemile Serçe Atılım University
Welcome to the Lecture Series on “Introduction to Programming With Java”
First Java Program COMP 102 #2 2015T2 Xiaoying Sharon Gao Computer Science Victoria University of Wellington.
Programming History. Who was the first programmer?
1.1 Your First Program Introduction to Programming in Java: An Interdisciplinary Approach · Robert Sedgewick and Kevin Wayne · Copyright © 2008 · October.
CS 11 java track: lecture 1 Administrivia need a CS cluster account cgi-bin/sysadmin/account_request.cgi need to know UNIX
© 2012 Pearson Education, Inc. All rights reserved. 1-1 Why Java? Needed program portability – Program written in a language that would run on various.
Java Programming, Second Edition Chapter One Creating Your First Java Program.
Java means Coffee Java Coffee Beans The name “JAVA” was taken from a cup of coffee.
Computer Science 101 Introduction to Programming.
The Joy of Programming (also known as) Introduction to Object-Oriented Programming.
Analysis of Programming Language Vladimir Viies Lembit Jürimägi Tallinna.
Programming Fundamentals 2: Simple/ F II Objectives – –give some simple examples of Java applications and one applet 2. Simple Java.
4-Nov-15 Air Force Institute of Technology Electrical and Computer Engineering Object-Oriented Programming Design Topic 1: The Java Environment Maj Joel.
Mini University July, 2005 A Little Taste of Java (but don’t tell your folks) (they might think there’s caffeine involved)
Pre-Sessional Java Programming Lecture 1a Reyer Zwiggelaar
 Instructor: Dr. Jason Nichols –  Office Hours: – 9:30-10:30 M/W/F or by appointment – Business Building.
A Look at Java. Categorize Java Which paradigm? Which paradigm? Scripting? Scripting? Declarative or procedural? Declarative or procedural? Which generation?
CS101: Introduction to Computer Science Slides adapted from Sedgewick and Wayne Copyright © Your First Java.
12/8/2015\course\cpeg323-07Fs\Topic2b-323.ppt1 Topic 2b High-Level languages and System Software (Languages) Introduction to Computer Systems Engineering.
Hello Computer Science!. Below is an example of a Hello World program in JAVA. While it is only three lines of code, there are many things that are happening.
Ch 1. A Python Q&A Session. Why do people use Python? Software Quality Developer productivity Program portability Support Libraries Component integration.
CSc 201 Introduction to Java George Wells Room 007, Hamilton Building
© 2012 Pearson Education, Inc. All rights reserved types of Java programs Application – Stand-alone program (run without a web browser) – Relaxed.
Java FilesOops - Mistake Java lingoSyntax
CHAPTER 1 INTRODUCTION. CHAPTER GOALS To understand the activity of programming To learn about the architecture of computers To learn about machine code.
3/5/2002e-business and Information Systems1 Java Java Java Virtual Machine (JVM) Java Application Program Interface (API) HW Kernel API Application Programs.
Methods.
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.
Execution ways of program References: www. en.wikipedia.org/wiki/Integrated_development_environment  You can execute or run a simple java program with.
UFCFY5-30-1Multimedia Studio Coding for Interactive Media Fundamental Concepts.
Pseudocode FORTRAN (original) INPUT number
Introduction to programming in java
Computer Programming Your First Java Program: HelloWorld.java.
Introduction of Java Fikri Fadlillah, S.T.
The eclipse IDE IDE = “Integrated Development Environment”
Problem Solving Using C: Orientation & Lecture 1
CompSci 230 Software Construction
Intro to Java.
Programming In Any Language With “Hello, World!” Examples
Introduction to Java Dept. Business Computing University of Winnipeg
Introduction to Computers and Python
Problem Solving.
Problem Solving Using C: Orientation & Lecture 1
Java Intro.
COM-152: Computer Programming Types, Variables, Operators Part 1 of 2
Problem Solving Using C: Orientation & Lecture 1
A Java Application public class Hello { public static void main(String [] args) { System.out.println("Hello, World!"); } } public class.
A Java Application public class Hello { public static void main(String [] args) { System.out.println("Hello, World!"); } } public class.
IB Computer Science II Paul Bui
F II 2. Simple Java Programs Objectives
Presentation transcript:

Software for Translators Barcelona, January 2002

Content  Programming and Languages  Origins  4 Languages  The Programming Cylcle  Edit  Compile  Execute  Exercises: Java Programming  Language Elements

Programming and Languages

The ancient days (1950)

Punched Paper A C B D EF „Registers“ ld A, 1 1 A ld B, 2 2 B add A,B 3 A

The old days (1970)

Computer Memory A C B D EF „Registers“ Program Counter B ld A, 1 01 PC 1 A ld B, 202 PC 2 B add A,B 03 PC 3 A

Basic (1980)

10set a = 1; 20set b = 2; 30set a = a + b; 40print a; => 3 A C B D EF 2 B3 A

Basic (1980)  print 1+2; => 3 A C B D EF 2 B3 A

Programming Languages Historic  PL/1  Cobol  Fortran  Basic Object Oriented  Smalltalk  C  C++  Java  Python Exotic  Prolog  Lisp Scripting  Shell  Perl  TCL Database  SQL  dBase

4 Languages  Basic  Visual Basic  Java  HTML

Basic Example 10 rem Just print Hello World. 20 print ´Hello World´ => Hello World

Visual Basic Example '############################################### '# # # # '# # This program places a text into a # # '# # a text box for viewing. # # '# # # # '############################################### Dim i As Integer Private Sub Command1_Click() On Error Resume Next CommonDialog1.ShowOpen i = FreeFile Open CommonDialog1.filename For Input As #i Text1.Text = Input(LOF(i), i) Close #i End Sub

Java Example // This example is from Java in a Nutshell. // Copyright (c) 1997 by David Flanagan public class Hello { public static void main(String[] args) { System.out.println("Hello World!"); } => Hello World

HTML Example Hello World! Text Editor: HTML Internet Explorer

The Programming Cycle

EditExecute Compile javac HelloWorld.java java HelloWorld

Edit

Compile javac HelloWorld.java

Execute java HelloWorld

Language Elements

 Comments  // Comment  /* Comment */  % Comment  Keywords:  FOR  NEXT  WHILE  DO  I F  Strings:  “Hello World”  ´Hello World´  ‘Hello World’  Identifiers:  ClassName  x, y, z  Parenthesis:  (foo bar)  [foo bar]  {foo bar}

Comments // This example is from Java in a Nutshell. // Copyright (c) 1997 by David Flanagan public class Hello { public static void main(String[] args) { System.out.println("Hello World!"); }

Keywords // This example is from Java in a Nutshell. // Copyright (c) 1997 by David Flanagan public class Hello { public static void main(String[] args) { System.out.println("Hello World!"); }

Strings // This example is from Java in a Nutshell. // Copyright (c) 1997 by David Flanagan public class Hello { public static void main(String[] args) { System.out.println("Hello World!"); }

Identifiers // This example is from Java in a Nutshell. // Copyright (c) 1997 by David Flanagan public class Hello { public static void main(String[] args) { System.out.println("Hello World!"); }