Programming Languages

Size: px
Start display at page:

Download "Programming Languages"

Transcription

1 Programming Languages In the beginning To use a computer, you needed to know how to program it. Today People no longer need to know how to program in order to use the computer. To see how this was accomplished, lets investigate how programming languages evolved. First Generation - Machine Language (code) Second Generation - Assembly Language Third Generation - People-Oriented Programming Languages Fourth Generation - Non-Procedural Languages Fifth Generation - Natural Languages

2 Assembled, Compiled, or Interpreted Languages All programs must be translated before their instructions can be executed. Computer languages can be grouped according to which translation process is used to convert the instructions into binary code: Assemblers Interpreters Compilers

3 Assembled, Compiled, or Interpreted Languages Assembled languages: Assembler: a program used to translate Assembly language programs. Produces one line of binary code per original program statement. The entire program is assembled before the program is sent to the computer for execution.

4 Assembled, Compiled, or Interpreted Interpreted Languages: Languages Interpreter: A program used to translate high-level programs. Translates one line of the program into binary code at a time: An instruction is fetched from the original source code. The Interpreter checks the single instruction for errors. (If an error is found, translation and execution ceases. Otherwise ) The instruction is translated into binary code. The binary coded instruction is executed. The fetch and execute process repeats for the entire program.

5 Interpreters Read input program interpret the operations Program input... c = a * a; b = c + b;. Source code Interpreter Abstract machine Run time Program output

6 Assembled, Compiled, or Interpreted Compiled languages: Languages Compiler: a program used to translate high-level programs. Translates the entire program into binary code before anything is sent to the CPU for execution. The translation process for a compiled program: First, the Compiler checks the entire program for syntax errors in the original source code. Next, it translates all of the instructions into binary code.» Two versions of the same program exist: the original source code version, and the binary code version (object code). Last, the CPU attempts execution only after the programmer requests that the program be executed.

7 Compilers Read C/C++/Java program optimization translate into machine code Program input... c = a * a; b = c + b;. Source code Compiler Target code Program output Translation (compile) time Run time

8 Compilers Anatomy of a Computer Program written in a Programming Languages Compiler Assembly Language Translation

9 Anatomy of a Computer Lexical Analyzer (Scanner) Program (character stream) Token Stream Divides the string of input characters into single elements, tokens, based on strict computer punctuation

10 Lexical Analyzer (Scanner) * ( ) Num(234) mul_op lpar_op Num(11) add_op Num(-22) rpar_op

11 Lexical Analyzer (Scanner) * ( ) Num(234) mul_op lpar_op Num(11) add_op Num(-22) rpar_op val#ue Not a number Variable names cannot have # character

12 Anatomy of a Computer Lexical Analyzer (Scanner) Syntax Analyzer (Parser) Program (character stream) Token Stream Parse Tree Checks for errors in grammar rules

13 Syntax Analyzer (Parser) num * ( num + num ) <expr> <expr> <op> <expr> num * <expr> ( ) <expr> <op> <expr> num + num

14 Syntax Analyzer (Parser) int * foo(i, j, k)) int i; int j; { for(i=0; i j) { fi(i>j) return j; } Not a keyword Not an expression Extra parentheses Missing increment

15 Anatomy of a Computer Lexical Analyzer (Scanner) Syntax Analyzer (Parser) Semantic Analyzer Program (character stream) Token Stream Parse Tree Intermediate Representation Determines the meaning of the string

16 Semantic Analyzer int * foo(i, j, k) int i; int j; { int x; x = x + j + N; return j; } Type not declared Mismatched return type Uninitialized variable used Undeclared variable

17 Anatomy of a Computer Lexical Analyzer (Scanner) Syntax Analyzer (Parser) Semantic Analyzer Code Optimizer Program (character stream) Token Stream Parse Tree Intermediate Representation Optimized Intermediate Representation

18 Optimizer int sumcalc(int a, int b, int N) { int i; int x, y; x = 0; y = 0; for(i = 0; i <= N; i++) { x = x+4*a/b*i+(i+1)*(i+1); x = x + b*y; } return x; } int sumcalc(int a, int b, int N) { int i; int x, t, u, v; x = 0; u = ((a<<2)/b); v = 0; for(i = 0; i <= N; i++) { t = i+1; x = x + v + t*t; v = v + u; } return x; }

19 Anatomy of a Computer Lexical Analyzer (Scanner) Syntax Analyzer (Parser) Semantic Analyzer Code Optimizer Code Generator Program (character stream) Token Stream Parse Tree Intermediate Representation Optimized Intermediate Representation Assembly code

20 Code Generator int sumcalc(int a, int b, int N) { int i; int x, t, u, v; x = 0; u = ((a<<2)/b); v = 0; for(i = 0; i <= N; i++) { t = i+1; x = x + v + t*t; v = v + u; } return x; } sumcalc: xorl %r8d, %r8d xorl %ecx, %ecx movl %edx, %r9d cmpl %edx, %r8d jg.l7 sall $2, %edi.l5: movl %edi, %eax cltd idivl %esi leal 1(%rcx), %edx movl %eax, %r10d imull %ecx, %r10d movl %edx, %ecx imull %edx, %ecx leal (%r10,%rcx), %eax movl %edx, %ecx addl %eax, %r8d cmpl %r9d, %edx jle.l5.l7: movl %r8d, %eax ret

21 Programming for Everyone Several ways to control what your computer does or the way it accomplishes a particular task: Using Macros Using HTML to create Web Pages Scripting Each allows customization of current applications.

22 Building a Program Whatever type of problem needs to be solved, a careful thought out plan of attack, called an algorithm, is needed before a computer solution can be determined. 1) Developing the algorithm. 2) Writing the program. 3) Documenting the program. 4) Testing and debugging the program.

23 Introduction to Java technology

24 Introduction to Java technology Java technology is both: - a programming language and - a platform.

25 Introduction to Java technology The Java programming language is a high-level language that can be characterized by all of the following buzzwords: Simple Object oriented Distributed Multithreaded Dynamic Architecture neutral Portable High performance (JIT) Robust (memory) Secure (several layers of defense discuss )

26 Introduction to Java technology The Java programming language is a high-level language that can be characterized by all of the following buzzwords: Simple: - The fundamental concepts of Java technology are grasped quickly; programmers can be productive from the very beginning. - Java design team examined many aspects of the "modern" C and C++ languages to determine features that could be eliminated in the context of modern object-oriented programming. No More Typedefs, Defines, or Preprocessor No More Structures or Unions No Enums No More Functions No More Multiple Inheritance No More Goto Statements No More Operator Overloading No More Automatic Coercions. You must do so explicitly by using a cast. No More Pointers

27 Introduction to Java technology The Java programming language is a high-level language that can be characterized by all of the following buzzwords: Object oriented: To be truly considered "object oriented", a programming language should support at a minimum four characteristics: - Encapsulation--implements information hiding and modularity (abstraction) - Polymorphism--the same message sent to different objects results in behavior that's dependent on the nature of the object receiving the message - Inheritance--you define new classes and behavior based on existing classes to obtain code re-use and code organization - Dynamic binding--objects could come from anywhere, possibly across the network. You need to be able to send messages to objects without having to know their specific type at the time you write your code. Dynamic binding provides maximum flexibility while a program is executing

28 Introduction to Java technology The Java programming language is a high-level language that can be characterized by all of the following buzzwords: Multithreaded: Built-in support for threads provides Java programmers with a powerful tool to improve interactive performance of graphical applications. If your application needs to run animations and play music while scrolling the page and downloading a text file from a server, multithreading is the way to obtain fast, lightweight concurrency within a single process space. Threads are sometimes also called lightweight processes or execution contexts.

29 Interpreted and Dynamic: Introduction to Java technology The Java programming language is a high-level language that can be characterized by all of the following buzzwords: Java source code is stored as text in a.java file. The.java file is compiled into.class files (with the same name). A.class file contains Java bytecodes (instructions). The bytecodes are interpreted at run time. The Java.class file is the executable code. Compile (javac) JVM (java) Movie.java Movie.class Running program

30 Introduction to Java technology The Java programming language is a high-level language that can be characterized by all of the following buzzwords: Interpreted and Dynamic:

31 Introduction to Java technology How Does JVM Work? The class loader loads (in JVM) all required classes. JVM uses a CLASSPATH setting to locate class files. The classpath can be added in run time by using the java -cp or - classpath option. JVM Verifier checks for illegal bytecodes. This validation ensures that there are no memory access violations or other illegal actions performed. JVM Verifier executes bytecodes. JVM may invoke a Just-In-Time (JIT) compiler. Memory Manager releases memory used by the dereferenced object back to the OS. JVM handles Garbage collection.

32 Introduction to Java technology Benefits of Just-In-Time (JIT) Compilers JIT compilers: - Improve performance - Are useful if the same bytecodes are executed repeatedly - Translate bytecodes to native instruction - Optimize repetitive code, such as loops - Use Java HotSpot VM for better performance and reliability

33 Introduction to Java technology The Java programming language is a high-level language that can be characterized by all of the following buzzwords: Architecture neutral: The solution that the Java system adopts to solve the binary-distribution problem is a "binary code format" that's independent of hardware architectures, operating system interfaces, and window systems. The format of this system-independent binary code is architecture neutral. If the Java run-time platform is made available for a given hardware and software environment, an application written in Java can then execute in that environment without the need to perform any special porting work for that application.

34 Introduction to Java technology The Java programming language is a high-level language that can be characterized by all of the following buzzwords: Portable: The primary benefit of the interpreted byte code approach is that compiled Java language programs are portable to any system on which the Java interpreter and run-time system have been implemented. Java specifies the sizes of all its primitive data types and the behavior of arithmetic on them. Here are the data types:

35 Introduction to Java technology The Java platform : A platform is the hardware or software environment in which a program runs. Most platforms can be described as a combination of the operating system and underlying hardware. The Java platform differs from most other platforms in that it's a software-only platform that runs on top of other hardware-based platforms.

36 Using Java with Enterprise Internet Computing Client Web server Application server Data Presentation Business logic Servlets JavaServer Pages (JSPs) Enterprise JavaBeans (EJB) CORBA

37 Using the Java Virtual Machine Operating system JVM Application Running Java Applications All Java applications run within a Java Virtual Machine (JVM). JVM is invoked differently depending on whether the Java program is an application or an applet.

38 Java Software Development Kit Sun Java J2SE (known as JDK and Java SDK) provides: Compiler (javac) Core class library classes.zip rt.jar Debugger (jdb) Bytecode interpreter: The JVM (java) Documentation generator (javadoc) Java Archive utility (jar) Others J2SE

39 Typical Java Development Environment Integrated development environments (IDEs) Provide tools that support the software-development process, including editors for writing and editing programs and debuggers for locating logic errors errors that cause programs to execute incorrectly. Popular IDEs Eclipse ( NetBeans ( JBuilder ( JCreator ( BlueJ ( jgrasp (

40 Using the Appropriate Development Kit Java2 comes in three sizes: J2ME (Micro Edition): geared toward developing applications for small, memory-constrained devices, such as cell phones, pagers and PDAs. J2SE (Standard Edition): Complete ground-up development environment for the Internet J2EE (Enterprise Edition): Everything in the J2SE plus, geared toward developing large-scale, distributed networking applications and web-based applications.

41 lolo.java package ex4d; // collection of classes of similar functionality import java.util.* ; // import for date class Interface Monster { void menace(); } interface DangerousMonster extends Monster { void destroy(); } public class lolo { static void w (Lethal l) { l.kill(); } public static void main (String[] args) { DangerousMonster barney = new DragonZilla(); w(vlad); } }

Language Processing Systems

Language Processing Systems Language Processing Systems Evaluation Active sheets 10 % Exercise reports 30 % Midterm Exam 20 % Final Exam 40 % Contact Send e-mail to hamada@u-aizu.ac.jp Course materials at www.u-aizu.ac.jp/~hamada/education.html

More information

CS 209 Programming in Java #1

CS 209 Programming in Java #1 CS 209 Programming in Java #1 Introduction Spring, 2006 Instructor: J.G. Neal 1 Topics CS 209 Target Audience CS 209 Course Goals CS 209 Syllabus - See handout Java Features, History, Environment Java

More information

Characteristics of Java (Optional) Y. Daniel Liang Supplement for Introduction to Java Programming

Characteristics of Java (Optional) Y. Daniel Liang Supplement for Introduction to Java Programming Characteristics of Java (Optional) Y. Daniel Liang Supplement for Introduction to Java Programming Java has become enormously popular. Java s rapid rise and wide acceptance can be traced to its design

More information

1. Overview of the Java Language

1. Overview of the Java Language 1. Overview of the Java Language What Is the Java Technology? Java technology is: A programming language A development environment An application environment A deployment environment It is similar in syntax

More information

How to make the computer understand? Lecture 15: Putting it all together. Example (Output assembly code) Example (input program) Anatomy of a Computer

How to make the computer understand? Lecture 15: Putting it all together. Example (Output assembly code) Example (input program) Anatomy of a Computer How to make the computer understand? Fall 2005 Lecture 15: Putting it all together From parsing to code generation Write a program using a programming language Microprocessors talk in assembly language

More information

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives Introduction to Programming and Algorithms Module 1 CS 146 Sam Houston State University Dr. Tim McGuire Module Objectives To understand: the necessity of programming, differences between hardware and software,

More information

An Overview of Java. overview-1

An Overview of Java. overview-1 An Overview of Java overview-1 Contents What is Java Major Java features Java virtual machine Java programming language Java class libraries (API) GUI Support in Java Networking and Threads in Java overview-2

More information

INTRODUCTION TO JAVA PROGRAMMING LANGUAGE

INTRODUCTION TO JAVA PROGRAMMING LANGUAGE INTRODUCTION TO JAVA PROGRAMMING LANGUAGE Today Java programming language is one of the most popular programming language which is used in critical applications like stock market trading system on BSE,

More information

1/20/2016 INTRODUCTION

1/20/2016 INTRODUCTION INTRODUCTION 1 Programming languages have common concepts that are seen in all languages This course will discuss and illustrate these common concepts: Syntax Names Types Semantics Memory Management We

More information

CSE 452: Programming Languages. Acknowledgements. Contents. Java and its Evolution

CSE 452: Programming Languages. Acknowledgements. Contents. Java and its Evolution CSE 452: Programming Languages Java and its Evolution Acknowledgements Rajkumar Buyya 2 Contents Java Introduction Java Features How Java Differs from other OO languages Java and the World Wide Web Java

More information

Contents. Java - An Introduction. Java Milestones. Java and its Evolution

Contents. Java - An Introduction. Java Milestones. Java and its Evolution Contents Java and its Evolution Rajkumar Buyya Grid Computing and Distributed Systems Lab Dept. of Computer Science and Software Engineering The University of Melbourne http:// www.buyya.com Java Introduction

More information

Mobile Application Languages XML, Java, J2ME and JavaCard Lesson 04 Java

Mobile Application Languages XML, Java, J2ME and JavaCard Lesson 04 Java Mobile Application Languages XML, Java, J2ME and JavaCard Lesson 04 Java Oxford University Press 2007. All rights reserved. 1 C and C++ C and C++ with in-line-assembly, Visual Basic, and Visual C++ the

More information

12/22/11. } Android. 1992-2012 by Pearson Education, Inc. All Rights Reserved. 1992-2012 by Pearson Education, Inc. All Rights Reserved.

12/22/11. } Android. 1992-2012 by Pearson Education, Inc. All Rights Reserved. 1992-2012 by Pearson Education, Inc. All Rights Reserved. The name is derived from Linus and UNIX an operating system developed by Bell Labs in 1969. Favorable response led to the creation of a community that has continued to develop and support Linux. Developers

More information

Language Evaluation Criteria. Evaluation Criteria: Readability. Evaluation Criteria: Writability. ICOM 4036 Programming Languages

Language Evaluation Criteria. Evaluation Criteria: Readability. Evaluation Criteria: Writability. ICOM 4036 Programming Languages ICOM 4036 Programming Languages Preliminaries Dr. Amirhossein Chinaei Dept. of Electrical & Computer Engineering UPRM Spring 2010 Language Evaluation Criteria Readability: the ease with which programs

More information

Fundamentals of Java Programming

Fundamentals of Java Programming Fundamentals of Java Programming This document is exclusive property of Cisco Systems, Inc. Permission is granted to print and copy this document for non-commercial distribution and exclusive use by instructors

More information

Java CPD (I) Frans Coenen Department of Computer Science

Java CPD (I) Frans Coenen Department of Computer Science Java CPD (I) Frans Coenen Department of Computer Science Content Session 1, 12:45-14:30 (First Java Programme, Inheritance, Arithmetic) Session 2, 14:45-16:45 (Input and Programme Constructs) Materials

More information

Chapter 1 Introduction to Computers, Programs, and Java

Chapter 1 Introduction to Computers, Programs, and Java Chapter 1 Introduction to Computers, Programs, and Java 1.1 Introduction The central theme of this book is to learn how to solve problems by writing a program. This book teaches you how to create programs

More information

Introduction. Compiler Design CSE 504. Overview. Programming problems are easier to solve in high-level languages

Introduction. Compiler Design CSE 504. Overview. Programming problems are easier to solve in high-level languages Introduction Compiler esign CSE 504 1 Overview 2 3 Phases of Translation ast modifled: Mon Jan 28 2013 at 17:19:57 EST Version: 1.5 23:45:54 2013/01/28 Compiled at 11:48 on 2015/01/28 Compiler esign Introduction

More information

Chapter 1. Dr. Chris Irwin Davis Email: cid021000@utdallas.edu Phone: (972) 883-3574 Office: ECSS 4.705. CS-4337 Organization of Programming Languages

Chapter 1. Dr. Chris Irwin Davis Email: cid021000@utdallas.edu Phone: (972) 883-3574 Office: ECSS 4.705. CS-4337 Organization of Programming Languages Chapter 1 CS-4337 Organization of Programming Languages Dr. Chris Irwin Davis Email: cid021000@utdallas.edu Phone: (972) 883-3574 Office: ECSS 4.705 Chapter 1 Topics Reasons for Studying Concepts of Programming

More information

Online Recruitment System 1. INTRODUCTION

Online Recruitment System 1. INTRODUCTION 1. INTRODUCTION This project Online Recruitment System is an online website in which jobseekers can register themselves online and apply for job and attend the exam. Online Recruitment System provides

More information

CSCI 3136 Principles of Programming Languages

CSCI 3136 Principles of Programming Languages CSCI 3136 Principles of Programming Languages Faculty of Computer Science Dalhousie University Winter 2013 CSCI 3136 Principles of Programming Languages Faculty of Computer Science Dalhousie University

More information

Chapter 1. Introduction to Computers, Programs, and Java

Chapter 1. Introduction to Computers, Programs, and Java Chapter 1 Introduction to Computers, Programs, and Java 1.1 Introduction Java is the Internet program language Why Java? The answer is that Java enables user to deploy applications on the Internet for

More information

Handout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.

Handout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner. Handout 1 CS603 Object-Oriented Programming Fall 15 Page 1 of 11 Handout 1 Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner. Java

More information

2 Introduction to Java. Introduction to Programming 1 1

2 Introduction to Java. Introduction to Programming 1 1 2 Introduction to Java Introduction to Programming 1 1 Objectives At the end of the lesson, the student should be able to: Describe the features of Java technology such as the Java virtual machine, garbage

More information

System Structures. Services Interface Structure

System Structures. Services Interface Structure System Structures Services Interface Structure Operating system services (1) Operating system services (2) Functions that are helpful to the user User interface Command line interpreter Batch interface

More information

The Java Series. Java Essentials I What is Java? Basic Language Constructs. Java Essentials I. What is Java?. Basic Language Constructs Slide 1

The Java Series. Java Essentials I What is Java? Basic Language Constructs. Java Essentials I. What is Java?. Basic Language Constructs Slide 1 The Java Series Java Essentials I What is Java? Basic Language Constructs Slide 1 What is Java? A general purpose Object Oriented programming language. Created by Sun Microsystems. It s a general purpose

More information

02 B The Java Virtual Machine

02 B The Java Virtual Machine 02 B The Java Virtual Machine CS1102S: Data Structures and Algorithms Martin Henz January 22, 2010 Generated on Friday 22 nd January, 2010, 09:46 CS1102S: Data Structures and Algorithms 02 B The Java Virtual

More information

The Sun Certified Associate for the Java Platform, Standard Edition, Exam Version 1.0

The Sun Certified Associate for the Java Platform, Standard Edition, Exam Version 1.0 The following applies to all exams: Once exam vouchers are purchased you have up to one year from the date of purchase to use it. Each voucher is valid for one exam and may only be used at an Authorized

More information

Introduction to programming

Introduction to programming Unit 1 Introduction to programming Summary Architecture of a computer Programming languages Program = objects + operations First Java program Writing, compiling, and executing a program Program errors

More information

CSC 551: Web Programming. Spring 2004

CSC 551: Web Programming. Spring 2004 CSC 551: Web Programming Spring 2004 Java Overview Design goals & features platform independence, portable, secure, simple, object-oriented, Programming models applications vs. applets vs. servlets intro

More information

C Compiler Targeting the Java Virtual Machine

C Compiler Targeting the Java Virtual Machine C Compiler Targeting the Java Virtual Machine Jack Pien Senior Honors Thesis (Advisor: Javed A. Aslam) Dartmouth College Computer Science Technical Report PCS-TR98-334 May 30, 1998 Abstract One of the

More information

Interpreters and virtual machines. Interpreters. Interpreters. Why interpreters? Tree-based interpreters. Text-based interpreters

Interpreters and virtual machines. Interpreters. Interpreters. Why interpreters? Tree-based interpreters. Text-based interpreters Interpreters and virtual machines Michel Schinz 2007 03 23 Interpreters Interpreters Why interpreters? An interpreter is a program that executes another program, represented as some kind of data-structure.

More information

Section 1.4. Java s Magic: Bytecode, Java Virtual Machine, JIT,

Section 1.4. Java s Magic: Bytecode, Java Virtual Machine, JIT, J A V A T U T O R I A L S : Section 1.4. Java s Magic: Bytecode, Java Virtual Machine, JIT, JRE and JDK This section clearly explains the Java s revolutionary features in the programming world. Java basic

More information

Compilers. Introduction to Compilers. Lecture 1. Spring term. Mick O Donnell: michael.odonnell@uam.es Alfonso Ortega: alfonso.ortega@uam.

Compilers. Introduction to Compilers. Lecture 1. Spring term. Mick O Donnell: michael.odonnell@uam.es Alfonso Ortega: alfonso.ortega@uam. Compilers Spring term Mick O Donnell: michael.odonnell@uam.es Alfonso Ortega: alfonso.ortega@uam.es Lecture 1 to Compilers 1 Topic 1: What is a Compiler? 3 What is a Compiler? A compiler is a computer

More information

Jonathan Worthington Scarborough Linux User Group

Jonathan Worthington Scarborough Linux User Group Jonathan Worthington Scarborough Linux User Group Introduction What does a Virtual Machine do? Hides away the details of the hardware platform and operating system. Defines a common set of instructions.

More information

Advanced compiler construction. General course information. Teacher & assistant. Course goals. Evaluation. Grading scheme. Michel Schinz 2007 03 16

Advanced compiler construction. General course information. Teacher & assistant. Course goals. Evaluation. Grading scheme. Michel Schinz 2007 03 16 Advanced compiler construction Michel Schinz 2007 03 16 General course information Teacher & assistant Course goals Teacher: Michel Schinz Michel.Schinz@epfl.ch Assistant: Iulian Dragos INR 321, 368 64

More information

Java (12 Weeks) Introduction to Java Programming Language

Java (12 Weeks) Introduction to Java Programming Language Java (12 Weeks) Topic Lecture No. Introduction to Java Programming Language 1 An Introduction to Java o Java as a Programming Platform, The Java "White Paper" Buzzwords, Java and the Internet, A Short

More information

General Introduction

General Introduction Managed Runtime Technology: General Introduction Xiao-Feng Li (xiaofeng.li@gmail.com) 2012-10-10 Agenda Virtual machines Managed runtime systems EE and MM (JIT and GC) Summary 10/10/2012 Managed Runtime

More information

Java and Real Time Storage Applications

Java and Real Time Storage Applications Java and Real Time Storage Applications Gary Mueller Janet Borzuchowski 1 Flavors of Java for Embedded Systems Software Java Virtual Machine(JVM) Compiled Java Hardware Java Virtual Machine Java Virtual

More information

Introduction to Java

Introduction to Java Introduction to Java The HelloWorld program Primitive data types Assignment and arithmetic operations User input Conditional statements Looping Arrays CSA0011 Matthew Xuereb 2008 1 Java Overview A high

More information

Chapter 13 Computer Programs and Programming Languages. Discovering Computers 2012. Your Interactive Guide to the Digital World

Chapter 13 Computer Programs and Programming Languages. Discovering Computers 2012. Your Interactive Guide to the Digital World Chapter 13 Computer Programs and Programming Languages Discovering Computers 2012 Your Interactive Guide to the Digital World Objectives Overview Differentiate between machine and assembly languages Identify

More information

Java Platform, Micro Edition (Java ME) Mokoena F.R. The 7046 Team

Java Platform, Micro Edition (Java ME) Mokoena F.R. The 7046 Team Java Platform, Micro Edition (Java ME) Mokoena F.R The 7046 Team 1. Introduction Java Platform, Micro Edition (Java ME) technology is one of the popular mobile application runtime. It provides developers

More information

Lecture 1 Introduction to Android

Lecture 1 Introduction to Android These slides are by Dr. Jaerock Kwon at. The original URL is http://kettering.jrkwon.com/sites/default/files/2011-2/ce-491/lecture/alecture-01.pdf so please use that instead of pointing to this local copy

More information

Developing Web Services with Eclipse and Open Source. Claire Rogers Developer Resources and Partner Enablement, HP February, 2004

Developing Web Services with Eclipse and Open Source. Claire Rogers Developer Resources and Partner Enablement, HP February, 2004 Developing Web Services with Eclipse and Open Source Claire Rogers Developer Resources and Partner Enablement, HP February, 2004 Introduction! Many companies investigating the use of web services! Cost

More information

Crash Course in Java

Crash Course in Java Crash Course in Java Based on notes from D. Hollinger Based in part on notes from J.J. Johns also: Java in a Nutshell Java Network Programming and Distributed Computing Netprog 2002 Java Intro 1 What is

More information

Tutorial 5: Developing Java applications

Tutorial 5: Developing Java applications Tutorial 5: Developing Java applications p. 1 Tutorial 5: Developing Java applications Georgios Gousios gousiosg@aueb.gr Department of Management Science and Technology Athens University of Economics and

More information

Compiler and Language Processing Tools

Compiler and Language Processing Tools Compiler and Language Processing Tools Summer Term 2011 Prof. Dr. Arnd Poetzsch-Heffter Software Technology Group TU Kaiserslautern Prof. Dr. Arnd Poetzsch-Heffter Compilers 1 Outline 1. Language Processing

More information

What Perl Programmers Should Know About Java

What Perl Programmers Should Know About Java Beth Linker, blinker@panix.com Abstract The Java platform is by no means a replacement for Perl, but it can be a useful complement. Even if you do not need to or want to use Java, you should know a bit

More information

Java Programming Fundamentals

Java Programming Fundamentals Lecture 1 Part I Java Programming Fundamentals Topics in Quantitative Finance: Numerical Solutions of Partial Differential Equations Instructor: Iraj Kani Introduction to Java We start by making a few

More information

Habanero Extreme Scale Software Research Project

Habanero Extreme Scale Software Research Project Habanero Extreme Scale Software Research Project Comp215: Evolution of Java Zoran Budimlić (Rice University) The Beginnings Sun Microsystems 1990 - Create a language for delivering programs on small electronic

More information

Developing Embedded Software in Java Part 1: Technology and Architecture

Developing Embedded Software in Java Part 1: Technology and Architecture Developing Embedded Software in Java Part 1: Technology and Architecture by Michael Barr Embedded Systems Conference Europe The Netherlands November 16-18, 1999 Course #300 Sun s introduction of the Java

More information

Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program

Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program Free Java textbook available online "Thinking in Java" by Bruce Eckel, 4th edition, 2006, ISBN 0131872486, Pearson Education Introduction to the Java programming language CS 4354 Summer II 2015 The third

More information

COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing

COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing The scanner (or lexical analyzer) of a compiler processes the source program, recognizing

More information

Fachbereich Informatik und Elektrotechnik SunSPOT. Ubiquitous Computing. Ubiquitous Computing, Helmut Dispert

Fachbereich Informatik und Elektrotechnik SunSPOT. Ubiquitous Computing. Ubiquitous Computing, Helmut Dispert Ubiquitous Computing Ubiquitous Computing The Sensor Network System Sun SPOT: The Sun Small Programmable Object Technology Technology-Based Wireless Sensor Networks a Java Platform for Developing Applications

More information

Effective Java Programming. efficient software development

Effective Java Programming. efficient software development Effective Java Programming efficient software development Structure efficient software development what is efficiency? development process profiling during development what determines the performance of

More information

Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program

Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program Free Java textbook available online "Thinking in Java" by Bruce Eckel, 4th edition, 2006, ISBN 0131872486, Pearson Education Introduction to the Java programming language CS 4354 Summer II 2014 Jill Seaman

More information

Semester Review. CSC 301, Fall 2015

Semester Review. CSC 301, Fall 2015 Semester Review CSC 301, Fall 2015 Programming Language Classes There are many different programming language classes, but four classes or paradigms stand out:! Imperative Languages! assignment and iteration!

More information

Glossary of Object Oriented Terms

Glossary of Object Oriented Terms Appendix E Glossary of Object Oriented Terms abstract class: A class primarily intended to define an instance, but can not be instantiated without additional methods. abstract data type: An abstraction

More information

What is a programming language?

What is a programming language? Overview Introduction Motivation Why study programming languages? Some key concepts What is a programming language? Artificial language" Computers" Programs" Syntax" Semantics" What is a programming language?...there

More information

Enterprise Java. Where, How, When (and When Not) to Apply Java in Client/Server Business Environments. Jeffrey Savit Sean Wilcox Bhuvana Jayaraman

Enterprise Java. Where, How, When (and When Not) to Apply Java in Client/Server Business Environments. Jeffrey Savit Sean Wilcox Bhuvana Jayaraman Enterprise Java Where, How, When (and When Not) to Apply Java in Client/Server Business Environments Jeffrey Savit Sean Wilcox Bhuvana Jayaraman McGraw-Hill j New York San Francisco Washington, D.C. Auckland

More information

n Introduction n Art of programming language design n Programming language spectrum n Why study programming languages? n Overview of compilation

n Introduction n Art of programming language design n Programming language spectrum n Why study programming languages? n Overview of compilation Lecture Outline Programming Languages CSCI-4430 & CSCI-6430, Spring 2016 www.cs.rpi.edu/~milanova/csci4430/ Ana Milanova Lally Hall 314, 518 276-6887 milanova@cs.rpi.edu Office hours: Wednesdays Noon-2pm

More information

Semantic Analysis: Types and Type Checking

Semantic Analysis: Types and Type Checking Semantic Analysis Semantic Analysis: Types and Type Checking CS 471 October 10, 2007 Source code Lexical Analysis tokens Syntactic Analysis AST Semantic Analysis AST Intermediate Code Gen lexical errors

More information

Java Programming. Binnur Kurt binnur.kurt@ieee.org. Istanbul Technical University Computer Engineering Department. Java Programming. Version 0.0.

Java Programming. Binnur Kurt binnur.kurt@ieee.org. Istanbul Technical University Computer Engineering Department. Java Programming. Version 0.0. Java Programming Binnur Kurt binnur.kurt@ieee.org Istanbul Technical University Computer Engineering Department Java Programming 1 Version 0.0.4 About the Lecturer BSc İTÜ, Computer Engineering Department,

More information

core. Volume I - Fundamentals Seventh Edition Sun Microsystems Press A Prentice Hall Title ULB Darmstadt

core. Volume I - Fundamentals Seventh Edition Sun Microsystems Press A Prentice Hall Title ULB Darmstadt core. 2008 AGI-Information Management Consultants May be used for personal purporses only or by libraries associated to dandelon.com network. Volume I - Fundamentals Seventh Edition CAY S. HORSTMANN GARY

More information

Evolution of the Major Programming Languages

Evolution of the Major Programming Languages 142 Evolution of the Major Programming Languages Object Oriented Programming: Smalltalk Object-Oriented: It s fundamental characteristics are: Data abstraction, Inheritance and Dynamic Binding. The essence

More information

Java Application Developer Certificate Program Competencies

Java Application Developer Certificate Program Competencies Java Application Developer Certificate Program Competencies After completing the following units, you will be able to: Basic Programming Logic Explain the steps involved in the program development cycle

More information

DIABLO VALLEY COLLEGE CATALOG 2014-2015

DIABLO VALLEY COLLEGE CATALOG 2014-2015 COMPUTER SCIENCE COMSC The computer science department offers courses in three general areas, each targeted to serve students with specific needs: 1. General education students seeking a computer literacy

More information

Java in Education. Choosing appropriate tool for creating multimedia is the first step in multimedia design

Java in Education. Choosing appropriate tool for creating multimedia is the first step in multimedia design Java in Education Introduction Choosing appropriate tool for creating multimedia is the first step in multimedia design and production. Various tools that are used by educators, designers and programmers

More information

The C Programming Language course syllabus associate level

The C Programming Language course syllabus associate level TECHNOLOGIES The C Programming Language course syllabus associate level Course description The course fully covers the basics of programming in the C programming language and demonstrates fundamental programming

More information

Chapter 1 Java Program Design and Development

Chapter 1 Java Program Design and Development presentation slides for JAVA, JAVA, JAVA Object-Oriented Problem Solving Third Edition Ralph Morelli Ralph Walde Trinity College Hartford, CT published by Prentice Hall Java, Java, Java Object Oriented

More information

CSE 373: Data Structure & Algorithms Lecture 25: Programming Languages. Nicki Dell Spring 2014

CSE 373: Data Structure & Algorithms Lecture 25: Programming Languages. Nicki Dell Spring 2014 CSE 373: Data Structure & Algorithms Lecture 25: Programming Languages Nicki Dell Spring 2014 What is a Programming Language? A set of symbols and associated tools that translate (if necessary) collections

More information

McGraw-Hill The McGraw-Hill Companies, Inc., 20 1. 01 0

McGraw-Hill The McGraw-Hill Companies, Inc., 20 1. 01 0 1.1 McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Objectives: To describe the evolution of programming languages from machine language to high-level languages. To understand how a program in a high-level

More information

Chapter 13: Program Development and Programming Languages

Chapter 13: Program Development and Programming Languages Understanding Computers Today and Tomorrow 12 th Edition Chapter 13: Program Development and Programming Languages Learning Objectives Understand the differences between structured programming, object-oriented

More information

www.virtualians.pk CS506 Web Design and Development Solved Online Quiz No. 01 www.virtualians.pk

www.virtualians.pk CS506 Web Design and Development Solved Online Quiz No. 01 www.virtualians.pk CS506 Web Design and Development Solved Online Quiz No. 01 Which of the following is a general purpose container? JFrame Dialog JPanel JApplet Which of the following package needs to be import while handling

More information

Chapter 13: Program Development and Programming Languages

Chapter 13: Program Development and Programming Languages 15 th Edition Understanding Computers Today and Tomorrow Comprehensive Chapter 13: Program Development and Programming Languages Deborah Morley Charles S. Parker Copyright 2015 Cengage Learning Learning

More information

ATSBA: Advanced Technologies Supporting Business Areas. Programming with Java. 1 Overview and Introduction

ATSBA: Advanced Technologies Supporting Business Areas. Programming with Java. 1 Overview and Introduction ATSBA: Advanced Technologies Supporting Business Areas Programming with Java 1 Overview and Introduction 1 1 Overview and Introduction 1 Overview and Introduction 1.1 Programming and Programming Languages

More information

TYLER JUNIOR COLLEGE School of Continuing Studies 1530 SSW Loop 323 Tyler, TX 75701 1.800.298.5226 www.tjc.edu/continuingstudies/mycaa

TYLER JUNIOR COLLEGE School of Continuing Studies 1530 SSW Loop 323 Tyler, TX 75701 1.800.298.5226 www.tjc.edu/continuingstudies/mycaa TYLER JUNIOR COLLEGE School of Continuing Studies 1530 SSW Loop 323 Tyler, TX 75701 1.800.298.5226 www.tjc.edu/continuingstudies/mycaa Education & Training Plan Java Programming Specialist Program Student

More information

Syllabus for CS 134 Java Programming

Syllabus for CS 134 Java Programming - Java Programming Syllabus Page 1 Syllabus for CS 134 Java Programming Computer Science Course Catalog 2000-2001: This course is an introduction to objectoriented programming using the Java language.

More information

The Java Virtual Machine and Mobile Devices. John Buford, Ph.D. buford@alum.mit.edu Oct 2003 Presented to Gordon College CS 311

The Java Virtual Machine and Mobile Devices. John Buford, Ph.D. buford@alum.mit.edu Oct 2003 Presented to Gordon College CS 311 The Java Virtual Machine and Mobile Devices John Buford, Ph.D. buford@alum.mit.edu Oct 2003 Presented to Gordon College CS 311 Objectives Review virtual machine concept Introduce stack machine architecture

More information

C# and Other Languages

C# and Other Languages C# and Other Languages Rob Miles Department of Computer Science Why do we have lots of Programming Languages? Different developer audiences Different application areas/target platforms Graphics, AI, List

More information

picojava TM : A Hardware Implementation of the Java Virtual Machine

picojava TM : A Hardware Implementation of the Java Virtual Machine picojava TM : A Hardware Implementation of the Java Virtual Machine Marc Tremblay and Michael O Connor Sun Microelectronics Slide 1 The Java picojava Synergy Java s origins lie in improving the consumer

More information

Glassfish, JAVA EE, Servlets, JSP, EJB

Glassfish, JAVA EE, Servlets, JSP, EJB Glassfish, JAVA EE, Servlets, JSP, EJB Java platform A Java platform comprises the JVM together with supporting class libraries. Java 2 Standard Edition (J2SE) (1999) provides core libraries for data structures,

More information

Scoping (Readings 7.1,7.4,7.6) Parameter passing methods (7.5) Building symbol tables (7.6)

Scoping (Readings 7.1,7.4,7.6) Parameter passing methods (7.5) Building symbol tables (7.6) Semantic Analysis Scoping (Readings 7.1,7.4,7.6) Static Dynamic Parameter passing methods (7.5) Building symbol tables (7.6) How to use them to find multiply-declared and undeclared variables Type checking

More information

Language Based Virtual Machines... or why speed matters. by Lars Bak, Google Inc

Language Based Virtual Machines... or why speed matters. by Lars Bak, Google Inc Language Based Virtual Machines... or why speed matters by Lars Bak, Google Inc Agenda Motivation for virtual machines HotSpot V8 Dart What I ve learned Background 25+ years optimizing implementations

More information

Computer Programming I

Computer Programming I Computer Programming I COP 2210 Syllabus Spring Semester 2012 Instructor: Greg Shaw Office: ECS 313 (Engineering and Computer Science Bldg) Office Hours: Tuesday: 2:50 4:50, 7:45 8:30 Thursday: 2:50 4:50,

More information

Java programming for C/C++ developers

Java programming for C/C++ developers Skill Level: Introductory Scott Stricker (sstricke@us.ibm.com) Developer IBM 28 May 2002 This tutorial uses working code examples to introduce the Java language to C and C++ programmers. Section 1. Getting

More information

CSCI E 98: Managed Environments for the Execution of Programs

CSCI E 98: Managed Environments for the Execution of Programs CSCI E 98: Managed Environments for the Execution of Programs Draft Syllabus Instructor Phil McGachey, PhD Class Time: Mondays beginning Sept. 8, 5:30-7:30 pm Location: 1 Story Street, Room 304. Office

More information

Moving from CS 61A Scheme to CS 61B Java

Moving from CS 61A Scheme to CS 61B Java Moving from CS 61A Scheme to CS 61B Java Introduction Java is an object-oriented language. This document describes some of the differences between object-oriented programming in Scheme (which we hope you

More information

Extreme Java G22.3033-006. Session 3 Main Theme Java Core Technologies (Part I) Dr. Jean-Claude Franchitti

Extreme Java G22.3033-006. Session 3 Main Theme Java Core Technologies (Part I) Dr. Jean-Claude Franchitti Extreme Java G22.3033-006 Session 3 Main Theme Java Core Technologies (Part I) Dr. Jean-Claude Franchitti New York University Computer Science Department Courant Institute of Mathematical Sciences Agenda

More information

Programming Languages

Programming Languages Programming Languages Programming languages bridge the gap between people and machines; for that matter, they also bridge the gap among people who would like to share algorithms in a way that immediately

More information

Installing Java. Table of contents

Installing Java. Table of contents Table of contents 1 Jargon...3 2 Introduction...4 3 How to install the JDK...4 3.1 Microsoft Windows 95... 4 3.1.1 Installing the JDK... 4 3.1.2 Setting the Path Variable...5 3.2 Microsoft Windows 98...

More information

Agent Languages. Overview. Requirements. Java. Tcl/Tk. Telescript. Evaluation. Artificial Intelligence Intelligent Agents

Agent Languages. Overview. Requirements. Java. Tcl/Tk. Telescript. Evaluation. Artificial Intelligence Intelligent Agents Agent Languages Requirements Overview Java Tcl/Tk Telescript Evaluation Franz J. Kurfess, Cal Poly SLO 211 Requirements for agent Languages distributed programming large-scale (tens of thousands of computers)

More information

Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation

Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science updated 03/08/2012 Unit 1: JKarel 8 weeks http://www.fcps.edu/is/pos/documents/hs/compsci.htm

More information

1 Introduction. 2 An Interpreter. 2.1 Handling Source Code

1 Introduction. 2 An Interpreter. 2.1 Handling Source Code 1 Introduction The purpose of this assignment is to write an interpreter for a small subset of the Lisp programming language. The interpreter should be able to perform simple arithmetic and comparisons

More information

qwertyuiopasdfghjklzxcvbnmqwerty uiopasdfghjklzxcvbnmqwertyuiopasd fghjklzxcvbnmqwertyuiopasdfghjklzx cvbnmqwertyuiopasdfghjklzxcvbnmq

qwertyuiopasdfghjklzxcvbnmqwerty uiopasdfghjklzxcvbnmqwertyuiopasd fghjklzxcvbnmqwertyuiopasdfghjklzx cvbnmqwertyuiopasdfghjklzxcvbnmq qwertyuiopasdfghjklzxcvbnmqwerty uiopasdfghjklzxcvbnmqwertyuiopasd fghjklzxcvbnmqwertyuiopasdfghjklzx cvbnmqwertyuiopasdfghjklzxcvbnmq Introduction to Programming using Java wertyuiopasdfghjklzxcvbnmqwertyui

More information

Virtual Credit Card Processing System

Virtual Credit Card Processing System The ITB Journal Volume 3 Issue 2 Article 2 2002 Virtual Credit Card Processing System Geraldine Gray Karen Church Tony Ayres Follow this and additional works at: http://arrow.dit.ie/itbj Part of the E-Commerce

More information

language 1 (source) compiler language 2 (target) Figure 1: Compiling a program

language 1 (source) compiler language 2 (target) Figure 1: Compiling a program CS 2112 Lecture 27 Interpreters, compilers, and the Java Virtual Machine 1 May 2012 Lecturer: Andrew Myers 1 Interpreters vs. compilers There are two strategies for obtaining runnable code from a program

More information

Chapter 2: Elements of Java

Chapter 2: Elements of Java Chapter 2: Elements of Java Basic components of a Java program Primitive data types Arithmetic expressions Type casting. The String type (introduction) Basic I/O statements Importing packages. 1 Introduction

More information

9/11/15. What is Programming? CSCI 209: Software Development. Discussion: What Is Good Software? Characteristics of Good Software?

9/11/15. What is Programming? CSCI 209: Software Development. Discussion: What Is Good Software? Characteristics of Good Software? What is Programming? CSCI 209: Software Development Sara Sprenkle sprenkles@wlu.edu "If you don't think carefully, you might think that programming is just typing statements in a programming language."

More information