SlideShare a Scribd company logo
1 of 18
What Is a Computer?
• Computer
– Performs computations and makes logical decisions
– Millions / billions 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

© 2002 Prentice Hall. All rights reserved.
1.3

Computer Organization

• Six logical units of computer system
– Input unit
• Mouse, keyboard

– Output unit
• Printer, monitor, audio speakers

– Memory unit
• RAM

– Arithmetic and logic unit (ALU)
• Performs calculations

– Central processing unit (CPU)
• Supervises operation of other devices

– Secondary storage unit
• Hard drives, floppy drives
© 2002 Prentice Hall. All rights reserved.
Evolution of Operating Systems
• Batch processing
– One job (task) at a time
– Operating systems developed
• Programs to make computers more convenient to use
• Switch jobs easier

• Multiprogramming
– “Simultaneous” jobs
– Timesharing operating systems

© 2002 Prentice Hall. All rights reserved.
1.5

Personal, Distributed and Client/Server
Computing

• Personal computing
– Computers for personal use

• Distributed computing
– Computing performed among several computers

• Client/server computing
– Servers offer common store of programs and data
– Clients access programs and data from server

© 2002 Prentice Hall. All rights reserved.
1.6 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
– Translator programs convert to machine language

• High-level language
– Allows for writing more “English-like” instructions
• Contains commonly used mathematical operations

– Compiler convert to machine language

• Interpreter
– Execute high-level language programs without compilation
© 2002 Prentice Hall. All rights reserved.
History of C++
• C++
– Evolved from C
• Evolved from BCPL and B

– Provides object-oriented programming capabilities

• Objects
– Reusable software components that model real-world items

© 2002 Prentice Hall. 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 for:
• Develop large-scale enterprise applications
• Enhance WWW server functionality
• Provide applications for consumer devices (cell phones, etc.)

© 2002 Prentice Hall. All rights reserved.
Java Class Libraries
• Classes
– Contain methods that perform tasks
• Return information after task completion

– Used to build Java programs

• Java contains class libraries
– Known as Java APIs (Application Programming Interfaces)

© 2002 Prentice Hall. All rights reserved.
Other High-Level Languages
• Fortran
– FORmula TRANslator

• COBOL
– COmmon Business Oriented Language

• Pascal
• Basic

© 2002 Prentice Hall. All rights reserved.
Structured Programming
• Structured Programming
– Structured programs
• Clearer than unstructured programs
• Easier to test, debug and modify

– Pascal designed for teaching structured programming
– ADA
• Multitasking

– C

© 2002 Prentice Hall. All rights reserved.
The Internet and the World Wide Web
• Internet
– Developed over three decades ago with DOD funding
– Originally for connecting few main computer systems
– Now accessible by hundreds of millions of computers

• World Wide Web (WWW)
– Allows for locating/viewing multimedia-based documents

© 2002 Prentice Hall. All rights reserved.
Basics of a Typical Java Environment
• Java systems contain
–
–
–
–

Environment
Language
APIs
Class libraries

© 2002 Prentice Hall. All rights reserved.
Basics of a Typical Java Environment (cont.)
• Java programs normally undergo five phases
– Edit
• Programmer writes program (and stores program on disk)

– Compile
• Compiler creates bytecodes from program

– Load
• Class loader stores bytecodes in memory

– Verify
• Verifier ensures bytecodes do not violate security requirements

– Execute
• Interpreter translates bytecodes into machine language

© 2002 Prentice Hall. All rights reserved.
Fig. 1.1 A typical Java environment.

Phase 1

Phase 2

Editor

Compiler

Disk

Disk

Prog ram is created in
the editor and sto red
on disk.
Compiler c reate s
bytec odes and stores
the m on disk.

Prim ary
Mem ory
Phase 3

Class Lo ad er
Class loade r puts
byteco des in memory.

Disk

.
.
.
.
.
.

Prim ary
Mem ory
Phase 4

Bytec ode V rifier
e

.
.
.
.
.
.

Prim ary
Mem ory
Phase 5

Interpreter

.
.
.
.
.
.

© 2002 Prentice Hall. All rights reserved.

By te code ver ifier
confir ms that all
bytec odes are valid
and do not violate
Java ’s sec urity
restr ictions.

Interpreter read s
bytec odes and
tr anslates them into a
languag e that the
computer can
under stand, poss ibly
storing data values as
the pr ogram executes.
General Notes about Java and This Book
• Geared for novice programmers
• We stress clarity

© 2002 Prentice Hall. All rights reserved.
Thinking About Objects: Introduction to
Object Technology and the Unified
Modeling Language
• Object orientation
• Unified Modeling Language (UML)
– Graphical language that uses common notation
– Allows developers to represent object-oriented designs

© 2002 Prentice Hall. All rights reserved.
Thinking About Objects (cont.)
• 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.

© 2002 Prentice Hall. All rights reserved.
Thinking About Objects (cont.)
• Object-oriented design (OOD)
– Models real-world objects
– Models communication among objects
– Encapsulates data (attributes) and functions (behaviors)
• Information hiding
• Communication through well-defined interfaces

• Object-oriented language
– Programming is called object-oriented programming (OOP)
– Java

© 2002 Prentice Hall. All rights reserved.

More Related Content

What's hot (19)

Introduction to embedded linux device driver and firmware
Introduction to embedded linux device driver and firmwareIntroduction to embedded linux device driver and firmware
Introduction to embedded linux device driver and firmware
 
IncludeOS for ics 2018
IncludeOS for ics 2018IncludeOS for ics 2018
IncludeOS for ics 2018
 
System software
System softwareSystem software
System software
 
parallel programming models
 parallel programming models parallel programming models
parallel programming models
 
Spr ch-01
Spr ch-01Spr ch-01
Spr ch-01
 
Device Drivers
Device DriversDevice Drivers
Device Drivers
 
Linux for embedded_systems
Linux for embedded_systemsLinux for embedded_systems
Linux for embedded_systems
 
Parallel language and compiler
Parallel language and compilerParallel language and compiler
Parallel language and compiler
 
Compilers and interpreters
Compilers and interpretersCompilers and interpreters
Compilers and interpreters
 
Software
SoftwareSoftware
Software
 
Embedded Linux - Building toolchain
Embedded Linux - Building toolchainEmbedded Linux - Building toolchain
Embedded Linux - Building toolchain
 
Simplified instructional computer
Simplified instructional computerSimplified instructional computer
Simplified instructional computer
 
Window ce
Window ceWindow ce
Window ce
 
Embedded linux system development (slides)
Embedded linux system development (slides)Embedded linux system development (slides)
Embedded linux system development (slides)
 
Device Driver in WinCE 6.0 R2
Device Driver in WinCE 6.0 R2Device Driver in WinCE 6.0 R2
Device Driver in WinCE 6.0 R2
 
Advanced C
Advanced C Advanced C
Advanced C
 
Embedded linux
Embedded linuxEmbedded linux
Embedded linux
 
13 risc
13 risc13 risc
13 risc
 
System programming note
System programming noteSystem programming note
System programming note
 

Similar to Introduction+to+java+2

Introduction to Computers, the Internet and the Web
Introduction to Computers, the Internet and the WebIntroduction to Computers, the Internet and the Web
Introduction to Computers, the Internet and the WebAndy Juan Sarango Veliz
 
chapter01.ppt
chapter01.pptchapter01.ppt
chapter01.pptFiroza10
 
Computer1 test 2 prep: processing, software, storage
Computer1   test 2 prep:  processing, software, storageComputer1   test 2 prep:  processing, software, storage
Computer1 test 2 prep: processing, software, storageCathy Bennett
 
Management information system software
Management information system softwareManagement information system software
Management information system softwareOnline
 
chapter1lecturenotes sdsdasdddadad(2).ppt
chapter1lecturenotes sdsdasdddadad(2).pptchapter1lecturenotes sdsdasdddadad(2).ppt
chapter1lecturenotes sdsdasdddadad(2).pptmeharikiros2
 
3. basic organization of a computer
3. basic organization of a computer3. basic organization of a computer
3. basic organization of a computerSHIKHA GAUTAM
 
1_chapter one Java content materials.ppt
1_chapter one Java content materials.ppt1_chapter one Java content materials.ppt
1_chapter one Java content materials.pptlekhacce
 
Chtp4 01
Chtp4 01Chtp4 01
Chtp4 01manedar
 
fdocuments.in_unit-2-foc.ppt
fdocuments.in_unit-2-foc.pptfdocuments.in_unit-2-foc.ppt
fdocuments.in_unit-2-foc.pptKrishanPalSingh39
 
Computer Organization and Design
Computer Organization and DesignComputer Organization and Design
Computer Organization and DesignRa'Fat Al-Msie'deen
 
cpphtp4_PPT_01.ppt
cpphtp4_PPT_01.pptcpphtp4_PPT_01.ppt
cpphtp4_PPT_01.pptSuleman Khan
 
Chapter 04 C++ Programmings Fundamental.
Chapter 04 C++ Programmings Fundamental.Chapter 04 C++ Programmings Fundamental.
Chapter 04 C++ Programmings Fundamental.YasirAli288
 
Operating system.ppt (1)
Operating system.ppt (1)Operating system.ppt (1)
Operating system.ppt (1)Vaibhav Bajaj
 

Similar to Introduction+to+java+2 (20)

Introduction to Computers, the Internet and the Web
Introduction to Computers, the Internet and the WebIntroduction to Computers, the Internet and the Web
Introduction to Computers, the Internet and the Web
 
chapter01.ppt
chapter01.pptchapter01.ppt
chapter01.ppt
 
chapter01 (1).ppt
chapter01 (1).pptchapter01 (1).ppt
chapter01 (1).ppt
 
chapter01.ppt
chapter01.pptchapter01.ppt
chapter01.ppt
 
The Java Story
The Java StoryThe Java Story
The Java Story
 
Computer1 test 2 prep: processing, software, storage
Computer1   test 2 prep:  processing, software, storageComputer1   test 2 prep:  processing, software, storage
Computer1 test 2 prep: processing, software, storage
 
Management information system software
Management information system softwareManagement information system software
Management information system software
 
C programming Introduction
C programming IntroductionC programming Introduction
C programming Introduction
 
chapter1lecturenotes sdsdasdddadad(2).ppt
chapter1lecturenotes sdsdasdddadad(2).pptchapter1lecturenotes sdsdasdddadad(2).ppt
chapter1lecturenotes sdsdasdddadad(2).ppt
 
JAVA INTRODUCTION - 1
JAVA INTRODUCTION - 1JAVA INTRODUCTION - 1
JAVA INTRODUCTION - 1
 
3. basic organization of a computer
3. basic organization of a computer3. basic organization of a computer
3. basic organization of a computer
 
1_chapter one Java content materials.ppt
1_chapter one Java content materials.ppt1_chapter one Java content materials.ppt
1_chapter one Java content materials.ppt
 
Chtp4 01
Chtp4 01Chtp4 01
Chtp4 01
 
fdocuments.in_unit-2-foc.ppt
fdocuments.in_unit-2-foc.pptfdocuments.in_unit-2-foc.ppt
fdocuments.in_unit-2-foc.ppt
 
Computer Organization and Design
Computer Organization and DesignComputer Organization and Design
Computer Organization and Design
 
Chtp401
Chtp401Chtp401
Chtp401
 
cpphtp4_PPT_01.ppt
cpphtp4_PPT_01.pptcpphtp4_PPT_01.ppt
cpphtp4_PPT_01.ppt
 
Chapter 04 C++ Programmings Fundamental.
Chapter 04 C++ Programmings Fundamental.Chapter 04 C++ Programmings Fundamental.
Chapter 04 C++ Programmings Fundamental.
 
Operating system.ppt (1)
Operating system.ppt (1)Operating system.ppt (1)
Operating system.ppt (1)
 
Java Introduction
Java IntroductionJava Introduction
Java Introduction
 

More from QUAID-E-AWAM UNIVERSITY OF ENGINEERING, SCIENCE & TECHNOLOGY, NAWABSHAH, SINDH, PAKISTAN (11)

Uml for Java Programmers
Uml for Java ProgrammersUml for Java Programmers
Uml for Java Programmers
 
Introduction to Java Programming
Introduction to Java ProgrammingIntroduction to Java Programming
Introduction to Java Programming
 
Java tutorials
Java tutorialsJava tutorials
Java tutorials
 
Java
JavaJava
Java
 
Java
JavaJava
Java
 
Java
JavaJava
Java
 
Java multi thread programming on cmp system
Java multi thread programming on cmp systemJava multi thread programming on cmp system
Java multi thread programming on cmp system
 
Java applets
Java appletsJava applets
Java applets
 
Introduction to-java
Introduction to-javaIntroduction to-java
Introduction to-java
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Threads
ThreadsThreads
Threads
 

Recently uploaded

Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 

Recently uploaded (20)

Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 

Introduction+to+java+2

  • 1. What Is a Computer? • Computer – Performs computations and makes logical decisions – Millions / billions 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 © 2002 Prentice Hall. All rights reserved.
  • 2. 1.3 Computer Organization • Six logical units of computer system – Input unit • Mouse, keyboard – Output unit • Printer, monitor, audio speakers – Memory unit • RAM – Arithmetic and logic unit (ALU) • Performs calculations – Central processing unit (CPU) • Supervises operation of other devices – Secondary storage unit • Hard drives, floppy drives © 2002 Prentice Hall. All rights reserved.
  • 3. Evolution of Operating Systems • Batch processing – One job (task) at a time – Operating systems developed • Programs to make computers more convenient to use • Switch jobs easier • Multiprogramming – “Simultaneous” jobs – Timesharing operating systems © 2002 Prentice Hall. All rights reserved.
  • 4. 1.5 Personal, Distributed and Client/Server Computing • Personal computing – Computers for personal use • Distributed computing – Computing performed among several computers • Client/server computing – Servers offer common store of programs and data – Clients access programs and data from server © 2002 Prentice Hall. All rights reserved.
  • 5. 1.6 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 – Translator programs convert to machine language • High-level language – Allows for writing more “English-like” instructions • Contains commonly used mathematical operations – Compiler convert to machine language • Interpreter – Execute high-level language programs without compilation © 2002 Prentice Hall. All rights reserved.
  • 6. History of C++ • C++ – Evolved from C • Evolved from BCPL and B – Provides object-oriented programming capabilities • Objects – Reusable software components that model real-world items © 2002 Prentice Hall. All rights reserved.
  • 7. History of Java • Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic content – Now also used for: • Develop large-scale enterprise applications • Enhance WWW server functionality • Provide applications for consumer devices (cell phones, etc.) © 2002 Prentice Hall. All rights reserved.
  • 8. Java Class Libraries • Classes – Contain methods that perform tasks • Return information after task completion – Used to build Java programs • Java contains class libraries – Known as Java APIs (Application Programming Interfaces) © 2002 Prentice Hall. All rights reserved.
  • 9. Other High-Level Languages • Fortran – FORmula TRANslator • COBOL – COmmon Business Oriented Language • Pascal • Basic © 2002 Prentice Hall. All rights reserved.
  • 10. Structured Programming • Structured Programming – Structured programs • Clearer than unstructured programs • Easier to test, debug and modify – Pascal designed for teaching structured programming – ADA • Multitasking – C © 2002 Prentice Hall. All rights reserved.
  • 11. The Internet and the World Wide Web • Internet – Developed over three decades ago with DOD funding – Originally for connecting few main computer systems – Now accessible by hundreds of millions of computers • World Wide Web (WWW) – Allows for locating/viewing multimedia-based documents © 2002 Prentice Hall. All rights reserved.
  • 12. Basics of a Typical Java Environment • Java systems contain – – – – Environment Language APIs Class libraries © 2002 Prentice Hall. All rights reserved.
  • 13. Basics of a Typical Java Environment (cont.) • Java programs normally undergo five phases – Edit • Programmer writes program (and stores program on disk) – Compile • Compiler creates bytecodes from program – Load • Class loader stores bytecodes in memory – Verify • Verifier ensures bytecodes do not violate security requirements – Execute • Interpreter translates bytecodes into machine language © 2002 Prentice Hall. All rights reserved.
  • 14. Fig. 1.1 A typical Java environment. Phase 1 Phase 2 Editor Compiler Disk Disk Prog ram is created in the editor and sto red on disk. Compiler c reate s bytec odes and stores the m on disk. Prim ary Mem ory Phase 3 Class Lo ad er Class loade r puts byteco des in memory. Disk . . . . . . Prim ary Mem ory Phase 4 Bytec ode V rifier e . . . . . . Prim ary Mem ory Phase 5 Interpreter . . . . . . © 2002 Prentice Hall. All rights reserved. By te code ver ifier confir ms that all bytec odes are valid and do not violate Java ’s sec urity restr ictions. Interpreter read s bytec odes and tr anslates them into a languag e that the computer can under stand, poss ibly storing data values as the pr ogram executes.
  • 15. General Notes about Java and This Book • Geared for novice programmers • We stress clarity © 2002 Prentice Hall. All rights reserved.
  • 16. Thinking About Objects: Introduction to Object Technology and the Unified Modeling Language • Object orientation • Unified Modeling Language (UML) – Graphical language that uses common notation – Allows developers to represent object-oriented designs © 2002 Prentice Hall. All rights reserved.
  • 17. Thinking About Objects (cont.) • 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. © 2002 Prentice Hall. All rights reserved.
  • 18. Thinking About Objects (cont.) • Object-oriented design (OOD) – Models real-world objects – Models communication among objects – Encapsulates data (attributes) and functions (behaviors) • Information hiding • Communication through well-defined interfaces • Object-oriented language – Programming is called object-oriented programming (OOP) – Java © 2002 Prentice Hall. All rights reserved.