Programming Concept Chapter I Introduction to Java Programming.

Slides:



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

Foundations of Programming and Problem Solving Introduction.
Programming Methodology (1). MODULE TEAM Dr Aaron Kans Dr Sin Wee Lee.
INTRODUCTION Chapter 1 1. Java CPSC 1100 University of Tennessee at Chattanooga 2  Difference between Visual Logic & Java  Lots  Visual Logic Flowcharts.
Programming Basic Concepts © Juhani Välimäki 2003.
Copyright © 2002 W. A. Tucker1 Chapter 1 Lecture Notes Bill Tucker Austin Community College COSC 1315.
JAVA BASICS SYNTAX, ERRORS, AND DEBUGGING. OBJECTIVES FOR THIS UNIT Upon completion of this unit, you should be able to: Explain the Java virtual machine.
Chapter 1: Introduction
Software. What Is Software? software –Also called Computer programs –Are a list of instructions –Instructions are called code –CPU performs the instructions.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
1 Fall 2008ACS-1903 Chapter 1 Topics Java History Java Programs Why Program? Computer Systems: Hardware and Software Programming Languages What Is a Program.
How do we make our HelloTester.java program do something? The java in our HelloTester.java file won’t do anything by itself. We need to tell the computer.
CHAPTER 1 INTRODUCTION GOALS  To understand the activity of programming  To learn about the architecture of computers  To learn about machine code and.
1 Programming & Programming Languages Overview l Machine operations and machine language. l Example of machine language. l Different types of processor.
Programming Software Applications Week 1 Dr. Xiaohong Gao Trent Park – B107, ext. 2252
1. 2 Chapter 1 Introduction to Computers, Programs, and Java.
1 SD1042: Introduction to Software Development SD1042 Introduction to Software Development SCHOOL OF COMPUTING AND TECHNOLOGY Getting Started MODULE TEAM.
1 Building Java Programs Chapter 1: Introduction to Java Programming These lecture notes are copyright (C) Marty Stepp and Stuart Reges, They may.
Unit 2: Java Introduction to Programming 2.1 Initial Example.
CSE 131 Computer Science 1 Module 1: (basics of Java)
“Introduction to Programming With Java”
Lecture 1 Introduction to Java MIT- AITI 2004 What is a Computer Program? For a computer to be able to do anything (multiply, play a song, run a word.
Introduction to Python Dr. Bernard Chen Ph.D. University of Central Arkansas July 9 th 2012
Introduction to Java Programming with JBuilder 4
© The McGraw-Hill Companies, 2006 Chapter 1 The first step.
Basics Programming Concepts. Basics A computer program is a set of instructions to tell a computer what to do Machine language = circuit level language.
UNIVERSITI TENAGA NASIONAL “Generates Professionals” CHAPTER 4 : Part 2 INTRODUCTION TO SOFTWARE DEVELOPMENT: PROGRAMMING & LANGUAGES.
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.
Algorithm development. The invention of the computer  Programming language developments: 1. Machine code 2. Assembler  easier to write, debug, and update.
Week 1 Introduction to Computer Science and Object-Oriented Programming COMP 111 George Basham.
Welcome to the Lecture Series on “Introduction to Programming With Java”
Introduction to Computers and Java Chapter 1.3. A Sip of Java: Outline History of the Java Language Applets A First Java Program Compiling a Java Program.
Session One Introduction. Personal Introduction Role of programmers Robot Examination HUD & HID Uploading Code.
Lecture 1 Introduction to Java MIT-AITI Ethiopia 2004.
Jaeki Song ISQS6337 JAVA Lecture 03 Introduction to Java -The First Java Application-
© 2012 Pearson Education, Inc. All rights reserved. 1-1 Why Java? Needed program portability – Program written in a language that would run on various.
POS 406 Java Technology And Beginning Java Code
Week 1 - Friday.  What did we talk about last time?  Our first Java program.
How to Run a Java Program CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
How to Run a Java Program CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Fall 2006Slides adapted from Java Concepts companion slides1 Introduction Advanced Programming ICOM 4015 Lecture 1 Reading: Java Concepts Chapter 1.
Output in Java Hello World!. Structure of a Java Program  All Java files in ICS3U1 have the following structure: class HelloWorld { }  Notice the open.
BUILDING JAVA PROGRAMS CHAPTER 1 ERRORS. 22 OBJECTIVES Recognize different errors that Java uses and how to fix them.
Jens Dalsgaard Nielsen Jan Dimon Bendtsen Dept. of Electronic Systems Basic Programming INS-basis GF, PDP and HST.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
4-Nov-15 Air Force Institute of Technology Electrical and Computer Engineering Object-Oriented Programming Design Topic 1: The Java Environment Maj Joel.
Lecture.1: Getting Started With Java Jiang (Jen) ZHENG May 9 th, 2005.
 Instructor: Dr. Jason Nichols –  Office Hours: – 9:30-10:30 M/W/F or by appointment – Business Building.
22-July-2002cse142-13B-Development © 2002 University of Washington1 Development Tools CSE 142, Summer 2002 Computer Programming 1
Application Architecture Using Java Hong Li. Introduction Developed by a team led by James Gosling at Sun Microsystem. Originally called Oak, designed.
© 2012 Pearson Education, Inc. All rights reserved types of Java programs Application – Stand-alone program (run without a web browser) – Relaxed.
CHAPTER 1 INTRODUCTION. CHAPTER GOALS To understand the activity of programming To learn about the architecture of computers To learn about machine code.
Computer Science Reaching Wider Summer School 2012.
Lecture1 Instructor: Amal Hussain ALshardy. Introduce students to the basics of writing software programs including variables, types, arrays, control.
Invent Your Own Computer Games with Python
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.
Computer Science I Lab 1 ISMAIL ABUMUHFOUZ | CS 180.
Programming Languages Concepts Chapter 1: Programming Languages Concepts Lecture # 4.
Introduction to 1. What is Java ? Sun Microsystems Java is a programming language and computing platform first released by Sun Microsystems in The.
UFCFY5-30-1Multimedia Studio Coding for Interactive Media Fundamental Concepts.
CS 201 Lecture 1 (b) Using an IDE Tarik Booker CS 201: Introduction to Programming California State University, Los Angeles.
CS210 Intermediate Computing with Data Structures (Java)
Introduction to.
Assembler, Compiler, Interpreter
Assembler, Compiler, Interpreter
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.
Developing Java Applications with NetBeans
Developing Java Applications with NetBeans
Presentation transcript:

Programming Concept Chapter I Introduction to Java Programming

By the end of this lecture you should be able to: explain how the module is structured; prepare adequately for lectures, tutorials and practicals; explain how the module is assessed; explain the meaning of the word software; explain how Java programs are compiled and run; use an integrated development environment (IDE) to write, compile and run programs.

Unit Lectures : Ematchandirane Vasu St-Patrick’s college, London

MODULE FORMAT

2.5 HOUR LECTURE 1 HOUR TUTORIAL 1.5 HOURS COMPUTER LAB

Preparing for your lectures, tutorials and practicals

ASSESSMENT

Assignment (Coursework)-week 12 Portfolio 1-Week 4 Portfolio 2-Week 7 Portfolio 3-Week 10

public class Game { Car f1; f1.spin(); } The set of instructions that tells a computer what to do is called a program

public class Game { Car f1; f1.spin(); } Software is the name given to a single program or a set of programs.

Application software is the name given to useful programs that a user might need.

System software is the name given to special programs that help the computer to do its job.

public class Game { Car f1; f1.spin(); } Programming is the task of writing instructions for the computer

public class Game { Car f1; f1.spin(); } These instructions have to be written in a special programming language.

public class Game { Car f1; f1.spin(); } Examples include: C++, Visual Basic, Pascal, Java.

public class Game { Car f1; f1.spin(); } Examples include: C++, Visual Basic, Pascal, Java.

Compiling Programs

COMPILER if (words > MAX) { System.out.print(); } program (source) code machine code Programmer Program user

Java Programming

JAVA COMPILER if (words > MAX) {System.out.print(); } program code JVM Java byte code Java Programmer

Java Applications

A console application

A graphical application

A Java Applet running in a browser

A Java application running on a mobile phone

A Java application running on a smart phone

Your first program

public class Hello { public static void main(String[ ] args) { System.out.println("Hello world"); } }

public class Hello { public static void main(String[] args) { System.out.println("Hello world"); } Hello World

public class Hello { public static void main(String[] args) { System.out.println("Hello world"); } Hello World public class Hello { } public static void main(String[ ] args) { } System.out.println("Hello world");

public class Hello { public static void main(String[] args) { System.out.println("Hello world"); } Hello World public class Hello { } public Static void main(String[ ] args) { System.out.println("Hello world");

public class Hello { public static void main(String[] args) { System.out.println("Hello world"); } Hello World public class Hello { } public Static void main(String[ ] args) { System.out.println("Hello world");

public class Hello { public static void main(String[] args) { System.out.println("Hello world"); } Hello World public class Hello { } public Static void main(String[ ] args) { System.out.println("Hello world");

public class Hello { public static void main(String[] args) { System.out.println("Hello world"); } Hello World public class Hello { } public static void main(String[ ] args) { System.out.println("Hello world");

public class Hello { public static void main(String[] args) { System.out.println("Hello world"); } Hello World public class Hello { } public static void main(String[ ] args) { System.out.println("Hello world");

public class Hello { public static void main(String[] args) { System.out.println("Hello world"); } Hello World public class Hello { } public static void main(String[ ] args) { } System.out.println("Hello world");

public class Hello { public static void main(String[] args) { System.out.println("Hello world"); } Hello World public class Hello { } public static void main(String[ ] args) { } System.out.println("Hello world");

Integrated development environment (IDE)

Type your programs here

Use these icons to compile and run you program

Compiler errors reported here

Your files shown here

Compiling and Running Java from TextPad 46 TextPad Optional

Compiling and Running Java from JBuilder 47 JBuilder Optional

Compiling and Running Java from NetBeans 48 NetBean s Optional

A Programming Puzzle

CREATE data

DISPLAY data

CREATE data PUT value IN data DISPLAY data

CREATE data PUT value IN data DISPLAY data ADD value TO data

CREATE data PUT value IN data DISPLAY data ADD value TO data 3 x 6 = ?

CREATE data PUT value IN data DISPLAY data CREATE data ADD value TO data

CREATE data PUT value IN data DISPLAY data CREATE total ADD value TO data

CREATE data PUT value IN data DISPLAY data CREATE total ADD value TO data total

CREATE data PUT value IN data DISPLAY data CREATE total ADD value TO data total PUT value IN data

CREATE data PUT value IN data DISPLAY data CREATE total ADD value TO data total PUT 6 IN total

CREATE data PUT value IN data DISPLAY data CREATE total ADD value TO data PUT 6 IN total 6 total

CREATE data PUT value IN data DISPLAY data CREATE total ADD value TO data PUT 6 IN total 6 total ADD value TO data

CREATE data PUT value IN data DISPLAY data CREATE total ADD value TO data PUT 6 IN total 6 total ADD 6 TO total

CREATE data PUT value IN data DISPLAY data CREATE total ADD value TO data PUT 6 IN total 12 total ADD 6 TO total

CREATE data PUT value IN data DISPLAY data CREATE total ADD value TO data PUT 6 IN total 12 total ADD 6 TO total ADD value TO data

CREATE data PUT value IN data DISPLAY data CREATE total ADD value TO data PUT 6 IN total 12 total ADD 6 TO total

CREATE data PUT value IN data DISPLAY data CREATE total ADD value TO data PUT 6 IN total 18 total ADD 6 TO total

CREATE data PUT value IN data DISPLAY data CREATE total ADD value TO data PUT 6 IN total 18 total ADD 6 TO total DISPLAY data

CREATE data PUT value IN data DISPLAY data CREATE total ADD value TO data PUT 6 IN total 18 total ADD 6 TO total DISPLAY total

CREATE data PUT value IN data DISPLAY data CREATE total ADD value TO data PUT 6 IN total 18 total ADD 6 TO total DISPLAY total 18

CREATE total PUT 6 IN total ADD 6 TO total DISPLAY total

CREATE total PUT 6 IN total ADD 6 TO total DISPLAY total Create data

CREATE total PUT 6 IN total ADD 6 TO total DISPLAY total Input data

CREATE total PUT 6 IN total ADD 6 TO total DISPLAY total Process data

CREATE total PUT 6 IN total ADD 6 TO total DISPLAY total Output data

CREATE total PUT 6 IN total ADD 6 TO total DISPLAY total