Chapter 1 Coding Introduction.

Slides:



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

In Review JAVA C++ GUIs - Windows Webopedia.com.
INTRODUCTION Chapter 1 1. Java CPSC 1100 University of Tennessee at Chattanooga 2  Difference between Visual Logic & Java  Lots  Visual Logic Flowcharts.
CSCE 145: Algorithmic Design I Chapter 1 Intro to Computers and Java Muhammad Nazmus Sakib.
University of Palestine software engineering department Introduction to data structures Introduction to java application instructor: Tasneem Darwish.
MC697 Object-Oriented Programming Using Java. In this class, we will cover: How the class will be structured Difference between object-oriented programming.
Java: History and Introduction (Lecture # 1). History… Java – Based on C and C++ – Developed in 1991 for intelligent consumer electronic devices – Green.
Lecture 2: Do you speak Java?. From Problem to Program Last Lecture we looked at modeling with objects! Steps to solving a business problem –Investigate.
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.
CSE 1301 J Lecture 2 Intro to Java Programming Richard Gesick.
L EC. 01: J AVA FUNDAMENTALS Fall Java Programming.
01 Introduction to Java Technology. 2 Contents History of Java What is Java? Java Platforms Java Virtual Machine (JVM) Java Development Kit (JDK) Benefits.
LESSON 1 INTRODUCTION Compiled By: Edwin O. Okech [Tutor, Amoud University] JAVA PROGRAMMING.
Sadegh Aliakbary Sharif University of Technology Fall 2011.
Introducing Java.
CSC 142 A 1 CSC 142 Introduction to Java [Reading: chapter 0]
Chapter 1 Coding Introduction.
CSCI 224 Introduction to Java Programming. Course Objectives  Learn the Java programming language: Syntax, Idioms Patterns, Styles  Become comfortable.
Sadegh Aliakbary Sharif University of Technology Spring 2011.
Sadegh Aliakbary. Copyright ©2014 JAVACUP.IRJAVACUP.IR All rights reserved. Redistribution of JAVACUP contents is not prohibited if JAVACUP.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
CMSC 202 Computer Science II for Majors Object-Oriented Programming.
Chapter 1.4 Programming languages Homework Due: Monday, August 11, 2014.
111 © 2002, Cisco Systems, Inc. All rights reserved.
Sadegh Aliakbary Sharif University of Technology Fall 2012.
Computer Programming A program is a set of instructions a computer follows in order to perform a task. solve a problem Collectively, these instructions.
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
Java ACO101: Introduction to Computer Science. The History of Java Started out as a research project at Sun Microsystems in 1991 Code named “Green” Based.
Intro and Review Welcome to Java. Introduction Java application programming Use tools from the JDK to compile and run programs. Videos at
Java Introduction 1. Introduction to Java Programming2 Computers and Computer Languages Computers are everywhere –how many computers do you own? Computers.
Session 1 Introduction to Java. Objectives Java Simplified / Session 1 / 2 of 32 Explain the history of Java Explain Java in brief List the types of Java.
What Is Java? According to Sun in a white paper: Java: A simple, object-oriented, network-savvy, interpreted, robust, secure, architecture-neutral, portable,
Copyright © Mohamed Nuzrath Java Programming :: Syllabus & Chapters :: Prepared & Presented By :: Mohamed Nuzrath [ Major In Programming ] NCC Programme.
Introduction Mehdi Einali Advanced Programming in Java 1.
introductory lecture on java programming
Introduction to Programming 1 1 2Introduction to Java.
BlueJ X ICSE Syllabus. Board Pattern THEORY (100 marks) PRACTICAL (100 marks) PROJECT (50 marks) ASSIGNMENTS (50 marks)
Introduction to JAVA Programming
Introduction to 1. What is Java ? Sun Microsystems Java is a programming language and computing platform first released by Sun Microsystems in The.
Java Programming, 3e Concepts and Techniques Chapter 1 Section 56 – An Introduction to Java.
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
Introduction to Algorithm. What is Algorithm? an algorithm is any well-defined computational procedure that takes some value, or set of values, as input.
Chapter 1 Coding Introduction.
Applications Active Web Documents Active Web Documents.
Java Programming: From the Ground Up
Introduction to Computers, the Internet and the World Wide Web
Done By: Ashlee Lizarraga Ricky Usher Jacinto Roches Eli Gomez
GC101 Introduction to computer and program
Chapter 1 Introduction to Computers, Programs, and Java
Lecture 1: Introduction to JAVA
Introduction to.
The Java Programming Language
Chapter 1: Introduction to Computers and Java
Java programming lecture one
Introduction Enosis Learning.
Chapter 1 FOUNDATIONS OF JAVA
Chapter 4 Computer Software.
Introduction Enosis Learning.
Chapter 1 Introduction to Computers, Programs, and Java
Advanced Programming Fall 2017.
Topics Introduction Hardware and Software How Computers Store Data
Introduction CSC 111.
(Computer fundamental Lab)
ICT Programming Lesson 1:
By Rajanikanth B Overview Of Java By Rajanikanth B
CSC 142 Introduction to Java [Reading: chapters 1 & 2]
Chap 1. Getting Started Objectives
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:

Chapter 1 Coding Introduction

Objectives Explain the difference between high and low level programming languages. Describe the history of how the Java programming language was started. Briefly describe the following: Object Oriented Programming Platform-Independence Garbage Collection Java Developer’s Kit Explain the difference between Java applets, applications, and servlets. Explain the difference between Java and JavaScript. Compile and execute a Java program Debug errors Identify and fix compiler errors

How it Works…the Beginning Programming is a way to tell a computer what to do.   Computer program: line-by-line instructions on how to accomplish a task.  Binary: information is stored based on electronic signals. Bit (binary digit): smallest unit of information storage represented by on (1) or off (0) signal. Byte: eight bits or one character such as the letter “A” on the keyboard) uses eight bits. Two bytes meet.  The first byte asks, “Are you ill?”   The second byte replies, “No, just feeling a bit off.”

Low-Level Programming Languages Written at the very low technical circuitry level of the computer. Examples: machine language and assembly language Machine language is composed of binary 1’s and 0’s and is not intended for humans to read.

High-Level Programming Languages Allows programmers to write programs using English terms. Computers do not understand high-level languages so they must be converted to machine language (1’s and 0’s) Examples: Java, BASIC, C++, Visual Basic

Learning Java through Alice History of Java James Gosling was given the task of creating programs to control consumer electronics (TV’s, VCR’s, toasters, etc.). Gosling and this team at Sun Microsystems started designing their software using C++ C++ was not suitable for the projects they had in mind. Thus, a new programming language named Oak (after a tree outside his window) was born.

Continued History of Java Oak was used in a few projects, but they never made it to the public eye. Sun discovered that the name Oak was already copyrighted and so after going out for coffee one day, they named their new language Java. In 1995, Sun Microsystems officially announced Java and Netscape Navigator 2.0 was the first to embrace the new language. Browsers that are “Java-enabled” mean that they can download and play Java applets on the user’s system

Java Is… Simpler than C++ An Object Oriented Language Learning Java through Alice Java Is… Simpler than C++ An Object Oriented Language Platform-independent Used on the Internet General purpose Secure Capable of containing multiple threads Capable of supporting various multimedia Programmed to collect garbage automatically Reliable and Robust

Types of Java Programs Applets appear in a web page much in the same way as images do, but unlike images, applets are dynamic and interactive. Used to create animations, games, ecommerce, etc. Applications are programs that can be run from the command line on a computer. Sun’s Star Office is a word processor, spreadsheet, etc. completely written in the Java language. Servlets are programs that respond to requests from clients.

Java Programming Tools Integrated Development Environment (IDE): software application that provides programmers with a programming environment equipped with the tools that they need to quickly and efficiently develop code. Examples: JCreator, JPad, Eclipse, JBuilder, BlueJ Java Development Kit (JDK): contains a compiler, a debugger, extensive class libraries, an execution environment, and sample codes. Java Virtual Machine (JVM): reads the bytecode found in the class file and translates the commands into machine language instructions for that computer’s specific processor The JVM is included with the JDK

Program Errors Syntax Errors Run-Time Errors Logic Errors Learning Java through Alice Syntax Errors Found during compilation Usually caused by incorrect capitalization or spelling mistakes Run-Time Errors Found during execution Usually caused by invalid data such as dividing by zero Logic Errors Found during testing Usually caused by human error such as using the wrong equation, wrong strategy, etc.

Statements Statements form a single Java operation. Generally end with a semicolon. Samples : System.out.println("Hello World");  System.out.print("Hello World");  Block of statements are surrounded by curly braces { }.  

Escape Codes        \n       Newline         \t       Tab         \\       Displays a Backslash         \'       Displays a single quote         \"      Displays a double quote System.out.println("I am going to earn an \"A\" in this course"); I am going to earn an "A" in this course.

Sample Program Learning Java through Alice