 1992-2007 Pearson Education, Inc. All rights reserved. 1 1 1 Introduction to Computers and Java.

Slides:



Advertisements
Similar presentations
EC-111 Algorithms & Computing Lecture #1 Instructor: Jahan Zeb Department of Computer Engineering (DCE) College of E&ME NUST.
Advertisements

 2008 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and World Wide Web.
 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
 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.
 2006 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and World Wide Web.
Introduction to Computer Programming CSC 1401: Introduction to Programming with Java Lecture 2 Wanda M. Kunkle.
 2007 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and the Web.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Chapter 1 – Introduction to Computers and C++ Programming.
 2000 Prentice Hall, Inc. All rights reserved. Chapter 1 – Introduction to Computers and C++ Programming Outline 1.1Introduction 1.2What Is a Computer?
 2002 Prentice Hall. All rights reserved. Week 1 - Introduction to Object- Oriented Programming Outline 1.1 Machine Languages, Assembly Languages and.
August 29, 2005ICP: Chapter 0: Introduction to Computers and Computing 1 Introduction or Computer Programming Chapter 0: Introduction to Computers 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.
 2000 Prentice Hall, Inc. All rights reserved. 1 Introduction to Computers and C Programming Outline Introduction What Is a Computer? Computer Organization.
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.
Computer Programming-1 CSC 111 Chapter 1 : Introduction.
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.
 2008 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and World Wide Web.
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
Chapter 1 Introduction to Computers, the Internet and the World Wide Web.
 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)
 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,
C++ Programming Language Lecture 1 Introduction By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
 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 __________________________.
© 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.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 1 Introduction to Computers, the Internet and.
 2006 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and World Wide Web.
1 MIS 131 Introduction to Algorithms and Programming 2015/2016 Fall - Chapter 1 -
 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.
 2008 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and World Wide Web.
ECE 264 Object-Oriented Software Development Instructor: Dr. Honggang Wang Spring 2013 Lecture 1: Introduction.
 2001 Prentice Hall, Inc. All rights reserved. Chapter 1 – Introduction to Computers, the Internet and the World Wide Web Outline 1.1Introduction 1.2What.
Java How to Program, 9/e Presented by: José M. Reyes Álamo © by Pearson Education, Inc. All Rights Reserved.
CHAPTER 1.1 INTRODUCTION TO COMPUTERS AND C++ Dr. Shady Yehia Elmashad.
1 Chapter 1 Java –Originally for intelligent consumer-electronic devices –Then used for creating Web pages with dynamic content –Now also used for: Develop.
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.
 2007 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and Visual Basic.
 2006 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and World Wide Web.
 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
 2001 Prentice Hall, Inc. All rights reserved.
Introduction to Computers, the Internet and the World Wide Web
Chapter 1 – Introduction to Computers, the Internet, and the Web
CSCI-235 Micro-Computer Applications
Lecture 1: Introduction to JAVA
Chapter 1 – Introduction to Computers and C++ Programming
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 and C++ Programming
Chapter 1 – Introduction to Computers and C++ Programming
Chapter 1 – Introduction to Computers, the Internet, and the Web
Introduction to Computers, Internet and the World Wide Web
Chapter 1 – Introduction to Computers and C++ Programming
Presentation transcript:

 Pearson Education, Inc. All rights reserved Introduction to Computers and Java

 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.  The different types of programming languages.  Which programming languages are most widely used.  A typical Java development environment.

 Pearson Education, Inc. All rights reserved. 3 Introduction Java Standard Edition Java SE Java Enterprise Edition Java EE – geared toward large-scale distributed applications and web applications Java Micro Edition Java ME – geared toward applications for small, memory constrained devices Java Development Kit JDK – development and run time environment [ JDK and JRE ] Object-Oriented Programming Java is language of choice for networked applications

 Pearson Education, Inc. All rights reserved. 4 Computers: Hardware and Software Computer – Performs computations and makes logical decisions – Millions or billions of times faster than human beings Computer programs – Sets of instructions for which computer processes data Hardware – Physical devices of computer system Software – Programs that run on computers

 Pearson Education, Inc. All rights reserved. 5 Computer Organization Six logical units of computer system – Input unit Mouse, keyboard – Output unit Printer, monitor, audio speakers – Memory unit Retains input and processed information – Arithmetic and logic unit (ALU) Performs calculations – Central processing unit (CPU) Supervises operation of other devices – Secondary storage unit Hard drives, floppy drives – Assembly Language

 Pearson Education, Inc. All rights reserved. 6 Early Operating Systems Batch processing – One job (task) at a time – Operating systems Developed to make computers more convenient to use Made transitions between jobs easier More throughput Multiprogramming [ multitasking ] – “Simultaneous” jobs – Timesharing operating systems mainframe/mini-computers and terminals

 Pearson Education, Inc. All rights reserved. 7 Types of 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 Utility / Grid / Cloud computing

 Pearson Education, Inc. All rights reserved. 8 Machine Languages, Assembly Languages and High-Level Languages Machine language – “Natural language” of computer component – Machine dependent Assembly language – English-like abbreviations represent computer operations – Assembler converts to machine language High-level language – Allows for writing more “English-like” instructions [ abstraction ] Intermediate Language [ bytecode / MSIL ] Translator – Compiler – translate from a high-level language to another language – Interpreter – translate and execute statements [ JITer ]

 Pearson Education, Inc. All rights reserved. 9 History of C and C++ C++ evolved from C, which evolved from BCPL and B C 1972 – Developed at Bell Labs – Popularized as the language of the UNIX operating system C ’s – Developed at Bell Labs – Developed by Bjarne Stroustrup – Provides object-oriented programming capabilities – Hybrid language Objects – Reusable software components that model real-world items – Attributes and behaviors [ fields / methods in Java ]

 Pearson Education, Inc. All rights reserved. 10 History of Java Java 1995 – Original intent was 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. 11 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) – Java SE 6 API To use Java effectively, you must : – Learn the Java programming language – Become familiar with the extensive set of class libraries [API ]

 Pearson Education, Inc. All rights reserved. 12 Software Engineering Observation  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. 13 Software Engineering Observation When programming in Java, you will typically use classes and methods:  from class libraries  you create yourself  that others create and make available to you.

 Pearson Education, Inc. All rights reserved. 14 Performance Tip Using Java API classes and methods instead of writing your own versions can improve program performance, because they are carefully written to perform efficiently. This technique also shortens program development time.

 Pearson Education, Inc. All rights reserved. 15 FORTRAN, COBOL, Pascal and Ada Fortran mid 50’s – FORmula TRANslator – Developed by IBM for scientific and engineering applications COBOL late 50’s – COmmon Business Oriented Language – Used for commercial applications requiring precise/efficient manipulation of large amounts of data Pascal 1971 – Developed by Prof. Niklaus Wirth [ who also created Modula ] – Designed to teach structured programming Ada 70’s and 80’s – Developed under the sponsorship of the U.S. Department of Defense – Needed a single language to fill most of its needs – Provided multiprocessing so programmers could specify parallel tasks

 Pearson Education, Inc. All rights reserved. 16 BASIC, Visual Basic, Visual C++, C# and.NET BASIC mid 60’s – Beginner’s All-Purpose Symbolic Instruction Code – Developed at Dartmouth College to familiarize novices with programming techniques Visual Basic introduced by Microsoft in the early 1990’s.NET platform [ similar concept to Java platform ] 2000 – Part of Microsoft’s corporate-wide strategy to incorporate the Internet and web into computer applications.NET programming languages – Visual Basic(based on BASIC) – Visual C++ (based on C++) – Visual C#(based on C++ and Java, new in VS 2000) – Visual F# (new in VS 2010)

 Pearson Education, Inc. All rights reserved. 17 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 Class loader reads 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. 18 Fig. 1.1 | Typical Java development environment.

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

 Pearson Education, Inc. All rights reserved. 20 Notes about Java and Java How to Program Textbook Stresses: clarity Portability [ Holy Grail ] – 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. 21 Good Programming Practice Write your Java programs in a simple and straightforward manner. This is sometimes referred to as KIS (“keep it simple”).

 Pearson Education, Inc. All rights reserved. 22 Good Programming Practice Read the documentation for the version of Java you are using. Refer to it frequently, especially to familiarize yourself with new features and deprecated classes/methods.

 Pearson Education, Inc. All rights reserved. 23 Introduction to Object Technology and the UML Object orientation Unified Modeling Language (UML) – Graphical language that uses common notation – Allows developers to represent object-oriented designs

 Pearson Education, Inc. All rights reserved. 24 Introduction to Object Technology and the UML 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. – Messages Causes the invocation of a behavior

 Pearson Education, Inc. All rights reserved. 25 Introduction to Object Technology and the UML 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. 26 Introduction to Object Technology and the UML Classes are to objects as blueprints are to houses Associations – Relationships between classes is-arelated by inheritance has-aobject composition uses-aclasses with static methods Packaging software in classes facilitates reuse

 Pearson Education, Inc. All rights reserved. 27 Introduction to Object Technology and the UML History of the UML – Need developed for process with which to approach OOA/D – Brainchild of Booch, Rumbaugh and Jacobson – Object Management Group (OMG) supervised

 Pearson Education, Inc. All rights reserved. 28 Introduction to Object Technology and the UML UML – Graphical representation scheme – Enables developers to model object-oriented systems – Flexible and extensible

 Pearson Education, Inc. All rights reserved. 29 Software Technologies Open source software – Individuals and companies contribute to developing, maintaining and evolving software in exchange for the right to use that software for their own purposes, typically at no charge – Code typically scrutinized by much larger audiences, so bugs get removed faster – Java is open source – Some open source organizations Eclipse Foundation, Mozilla Foundation, Apache Software Foundation, SourceForge

 Pearson Education, Inc. All rights reserved. 30 Software Technologies (cont.) Linux – Open source operating system – One of the greatest successes of the open source movement MySQL [ now part of Oracle ] – an open source database management system PHP – most popular open source server-side Internet “scripting” language for developing Internet-based applications LAMP—Linux, Apache, MySQL and PHP (or Perl or Python) – An acronym for the set of open source technologies that many developers used to build web applications

 Pearson Education, Inc. All rights reserved. 31 Software Technologies (cont.) Ruby on Rails – Combines the scripting language Ruby with the Rails web application framework developed by 37Signals – Many Ruby on Rails developers report significant productivity gains over using other languages when developing database-intensive web applications – Getting Real (gettingreal.37signals.com/toc.php) a must read for today’s web application developers