 1992-2007 Pearson Education, Inc. All rights reserved. 1 1 1 Introduction to Computers, the Internet and the World Wide Web.

Slides:



Advertisements
Similar presentations
1 Copyright © 2005, Oracle. All rights reserved. Introducing the Java and Oracle Platforms.
Advertisements

 2008 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and World Wide Web.
CSCE 145: Algorithmic Design I Chapter 1 Intro to Computers and Java Muhammad Nazmus Sakib.
 2005 Pearson Education, Inc. All rights reserved Introduction.
 2002 Prentice Hall. All rights reserved. Chapter 1 – Introduction to Computers, the Internet, and the Web Java, How to Program, 4 th Edition, by Deitel.
Visual and Internet Programming using JAVA
Object Orientated Programming
Introduction To System Analysis and Design
Java: History and Introduction (Lecture # 1). History… Java – Based on C and C++ – Developed in 1991 for intelligent consumer electronic devices – Green.
 2005 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and the World Wide Web.
Java Environment (CSS444)
 2003 Prentice Hall, Inc. All rights reserved. 1 Chapter 1 – Introduction to Computers, the Internet, and the Web Outline 1.1 Introduction 1.2 What Is.
Java Programming, 3e Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Introduction to Computer Programming CSC 1401: Introduction to Programming with Java Lecture 2 Wanda M. Kunkle.
For more Lectures and Notes Visit
 2002 Prentice Hall. All rights reserved. Week 1 - Introduction to Object- Oriented Programming Outline 1.1 Machine Languages, Assembly Languages and.
 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and the World Wide Web.
Java How to Program, 9/e Instructor: José M. Reyes Álamo © by Pearson Education, Inc. All Rights Reserved.
L EC. 01: J AVA FUNDAMENTALS Fall Java Programming.
Java PAL.  Contains the development kit and the runtime environment ( aka the Java Virtual Machine )  Download Link:
 2003 Prentice Hall, Inc. All rights reserved. Chapter 1 – Introduction to Computers, the Internet, and the Web Outline 1.1 Introduction 1.2 What Is a.
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
1 Chapter 1 - Introduction to Computers, the Internet, and the World Wide Web Outline 1.1Introduction 1.2What Is a Computer? 1.3Computer Organization 1.4Evolution.
1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic.
 2008 Pearson Education, Inc. All rights reserved. 1 The chief merit of language is clearness. — Galen Our life is frittered away by detail…. Simplify,
 2005 Pearson Education, Inc. All rights reserved. 1 Introduction & The Java Virtual Machine Small Java Chapter 1 1.
Object Oriented Programming Lecturer: Andreas P. Adi
(C) 2010 Pearson Education, Inc. All rights reserved.  Java programs normally go through five phases  edit  compile  load  verify  execute.
 2003 Prentice Hall, Inc. All rights reserved. 1 Java Training Course Dr. H.E. Dunsmore Purdue University Java – How to Program, Deitel (5 th Edition)
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Programming Languages Machine.
111 © 2002, Cisco Systems, Inc. All rights reserved.
 2005 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and the World Wide Web.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 1 – Car Payment Calculator and Guess the Number.
Programming in Java This is a one semester course. You will learn the language and some basic programming skills. You are expected to read, program,
ATM Case Study Chapter 1-10 Optional Sections
Introduction To System Analysis and Design
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
 2002 Prentice Hall. All rights reserved. Chapter 1 – Introduction to Computers, the Internet, and the Web Outline 1.1 Introduction 1.2 What Is a Computer?
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.
1 Chapter 1 Introduction to Java. 2 History of Java Java Originally for _________________________ devices Then used for creating Web pages with __________________________.
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-
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Introduction to Computers Outline 1.1Introduction.
 2006 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and World Wide Web.
 2000 Prentice Hall, Inc. All rights reserved. 1 Chapter 1 - Introduction to Computers, the Internet, and the World Wide Web Outline 1.1Introduction 1.2What.
CT1513 Introduction To java © A.AlOsaimi.
Java How to Program, 9/e Presented by: José M. Reyes Álamo © by Pearson Education, Inc. All Rights Reserved.
1 Introduction Read D&D Sec 1.8; Sec 1.13 THE Java tutorial -
 Pearson Education, Inc. All rights reserved Introduction to Computers and Java.
1 Chapter 1 Java –Originally for intelligent consumer-electronic devices –Then used for creating Web pages with dynamic content –Now also used for: Develop.
Introduction to Programming 1 1 2Introduction to Java.
1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic.
Chapter 1 – Introduction to Computers, the Internet, and the Web Outline 1.1 Introduction 1.2 What Is a Computer? 1.3 Computer Organization 1.4 Evolution.
 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and the World Wide Web.
Introduction to Computers, the Internet and the World Wide Web
Introduction to Computers, the Internet and the World Wide Web
Chapter 1 – Introduction to Computers, the Internet, and the Web
Chapter 1 Introduction to Computers, Programs, and Java
Java programming lecture one
Chapter 1 – Introduction to Computers, the Internet, and the Web
Introduction to Computers, the Internet and the World Wide Web
Chapter 1 – Introduction to Computers, the Internet, and the Web
Introduction to Computers, the Internet and the World Wide Web
Introduction to Computers, the Internet and the World Wide Web
Chapter 1 – Introduction to Computers, the Internet, and the Web
Computer Programming-1 CSC 111
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:

 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and the World Wide Web

 Pearson Education, Inc. All rights reserved. 2 OBJECTIVES In this chapter you will learn:  Basic computer hardware and software concepts.  Basic object technology concepts, such as classes, objects, attributes, behaviors, encapsulation, inheritance and polymorphism.  A typical Java development environment.  Java's role in developing distributed client/server applications for the Internet and the web.  To test-drive Java applications.

 Pearson Education, Inc. All rights reserved 複習上學期 1.5Personal, Distributed and Client/Server Computing 1.9 History of Java 1.10Java Class Libraries 1.13Typical Java Development Environment 1.14Notes about Java and Java How to Program, Seventh Edition 1.15Test-Driving a Java Application 1.16Software Engineering Case Study: Introduction to Object Technology and the UML 1.17Web Web Resources

 Pearson Education, Inc. All rights reserved 複習上學期 范紐曼 (von Neumann) 電腦架構

 Pearson Education, Inc. All rights reserved 複習上學期

 Pearson Education, Inc. All rights reserved 複習上學期

 Pearson Education, Inc. All rights reserved. 7 虛擬碼 設定 COUNT  0 COUNT  COUNT+1 SUM  SUM+NUM 讀入 READ NUM 寫出 WRITE “Average=“, AVG 條件判斷 ( 內層需縮排 )  IF (COUNT = 0) THEN WRITE “ 使用者未輸入任何值 ” ELSE WRITE “Average =“, AVG  IF (street 遺漏 ) THEN WRITE “ 輸入街道號碼及名稱, 然後按歸位鍵 ” READ street

 Pearson Education, Inc. All rights reserved. 8 虛擬碼 迴圈 ( 內層需縮排 ) WHILE (COUNT < 10) READ NUM SUM  SUM + NUM COUNT  COUNT + 1

 Pearson Education, Inc. All rights reserved. 9

Introduction Java Standard Edition (Java SE) 6 Sun ’ s implementation called the Java Development Kit (JDK) Object-Oriented Programming Java is language of choice for networked applications

 Pearson Education, Inc. All rights reserved Personal, Distributed and Client/Server Computing Personal computing – Computers for personal use Distributed computing – Networked computers – Computing performed among several computers Client/server computing – Servers offer common store of programs and data – Clients access programs and data from server

 Pearson Education, Inc. All rights reserved History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating web pages with dynamic content – Now also used to: Develop large-scale enterprise applications Enhance web server functionality Provide applications for consumer devices (cell phones, etc.)

 Pearson Education, Inc. All rights reserved Java Class Libraries Java programs consist of classes – Include methods that perform tasks Return information after task completion Java provides class libraries – Known as Java APIs (Application Programming Interfaces) To use Java effectively, you must know – Java programming language – Extensive class libraries

 Pearson Education, Inc. All rights reserved. 14 Software Engineering Observation 1.1 Use a building-block approach to create programs. Avoid reinventing the wheel — use existing pieces wherever possible. Called software reuse, this practice is central to object-oriented programming.

 Pearson Education, Inc. All rights reserved. 15 Software Engineering Observation 1.2 When programming in Java, you will typically use the following building blocks: Classes and methods from class libraries, classes and methods you create yourself and classes and methods that others create and make available to you.

 Pearson Education, Inc. All rights reserved Typical Java Development Environment Java programs go through five phases – Edit Programmer writes program using an editor; stores program on disk with the.java file name extension – Compile Use javac (the Java compiler) to create bytecodes from source code program; bytecodes stored in.class files – Load Use java for class loader to read bytecodes from.class files into memory – Verify Bytecode verifier examines bytecodes to ensure that they are valid and do not violate security restrictions – Execute Java Virtual Machine (JVM) uses a combination of interpretation and just- in-time compilation to translate bytecodes into machine language

 Pearson Education, Inc. All rights reserved. 17 Fig. 1.1 | Typical Java development environment. javac java

 Pearson Education, Inc. All rights reserved. 18 Common Programming Error 1.1 Errors like division by zero occur as a program runs, so they are called runtime errors or execution-time errors. Fatal runtime errors cause programs to terminate immediately without having successfully performed their jobs. Nonfatal runtime errors allow programs to run to completion, often producing incorrect results.

 Pearson Education, Inc. All rights reserved Notes about Java and Java How to Program, Seventh Edition Stresses clarity Portability – An elusive goal due to differences between compilers, JVMs and computers – Always test programs on all systems on which the programs should run

 Pearson Education, Inc. All rights reserved. 20 Good Programming Practice 1.1 Write your Java programs in a simple and straightforward manner. This is sometimes referred to as KIS ( “ keep it simple ” ). Do not “ stretch ” the language by trying bizarre usages.

 Pearson Education, Inc. All rights reserved. 21 Good Programming Practice 1.3 Your computer and compiler are good teachers. If, after carefully reading your Java documentation manual, you are not sure how a feature of Java works, experiment and see what happens. Study each error or warning message you get when you compile your programs (called compile-time errors or compilation errors), and correct the programs to eliminate these messages.

 Pearson Education, Inc. All rights reserved Test-Driving a Java Application Test-driving the ATM application – Check system setup – Locate the ATM application (Fig. 1.2) – Run the ATM application (Fig. 1.3) – Enter an account number (Fig. 1.4) – Enter a PIN (Fig. 1.5) – View the account balance (Fig. 1.6) – Withdraw money from the account (Fig. 1.7) – Confirm that the account information has been updated (Fig. 1.8) – End the transaction (Fig. 1.9) – Exit the ATM application Additional applications (Fig. 1.10)

 Pearson Education, Inc. All rights reserved. 23 Fig. 1.2 | Opening a Windows XP Command Prompt and changing directories. Using the cd command to change directories File location of the ATM application

 Pearson Education, Inc. All rights reserved. 24 Fig. 1.3 | Using the java command to execute the ATM application.

 Pearson Education, Inc. All rights reserved. 25 Fig. 1.4 | Prompting the user for an account number. ATM welcome messageEnter account number prompt

 Pearson Education, Inc. All rights reserved. 26 Fig. 1.5 | Entering a valid PIN number and displaying the ATM application's main menu. Enter valid PINATM main menu

 Pearson Education, Inc. All rights reserved. 27 Fig. 1.6 | ATM application displaying user account balance information. Account balance information

 Pearson Education, Inc. All rights reserved. 28 Fig. 1.7 | Withdrawing money from the account and returning to the main menu. ATM withdrawal menu

 Pearson Education, Inc. All rights reserved. 29 Fig. 1.8 | Checking new balance. Confirming updated account balance information after withdrawal transaction

 Pearson Education, Inc. All rights reserved. 30 Fig. 1.9 | Ending an ATM transaction session. ATM goodbye message Account number prompt for next user

 Pearson Education, Inc. All rights reserved. 31 Fig | Examples of additional Java applications found in Java How to Program, 6/e.

 Pearson Education, Inc. All rights reserved Software Engineering Objects – Reusable software components that model real-world items – Look all around you People, animals, plants, cars, etc. – Attributes Size, shape, color, weight, etc. – Behaviors Babies cry, crawl, sleep, etc.

 Pearson Education, Inc. All rights reserved Software Engineering Case Study (Cont.) Object-oriented design (OOD) – Models software in terms similar to those used to describe real- world objects – Class relationships – Inheritance relationships – Models communication among objects – Encapsulates attributes and operations (behaviors) Information hiding Communication through well-defined interfaces Object-oriented language – Programming in object-oriented languages is called object- oriented programming (OOP) – Java

 Pearson Education, Inc. All rights reserved Software Engineering Case Study (Cont.) Object-Oriented Analysis and Design (OOA/D) – Essential for large programs – Analyze program requirements, then develop a design – UML Unified Modeling Language Standard for designing object-oriented systems Graphical representation scheme Enables developers to model object-oriented systems Flexible and extensible

 Pearson Education, Inc. All rights reserved Web 2.0 Web use exploded in mid-to-late 1990s Dot com economic bust hit in the early 2000s Resurgence in 2004 with Web 2.0 – First Web 2.0 conference – Google widely regarded as signature company of Web 2.0 – Web services enable Web 2.0

 Pearson Education, Inc. All rights reserved Web 2.0 (cont.) Ajax – Term popularized in 2005 – Group of technologies and programming techniques in use since the late 1990s – Helps Internet-based applications perform like desktop application

 Pearson Education, Inc. All rights reserved Web 2.0 (cont.) Blogs – Websites that are like online diaries – About 60 million of them at the time of this writing – Blogosphere — Collection of all blogs and the blogging community – Technorati — a leading blog search engine RSS feeds – Enable sites to push information to subscribers – Commonly used to deliver blog postings

 Pearson Education, Inc. All rights reserved Web 2.0 (cont.) Web 3.0 – Next generation web – Also known as the semantic web – Web 1.0 mostly HTML based – Web 2.0 making increasing use of XML (e.g., RSS feeds) – Web 3.0 will make extensive use of XML to add meaning to content