SlideShare a Scribd company logo
1 of 45
About the Presentations
• The presentations cover the objectives found
in the opening of each chapter
• All chapter objectives are listed in the
beginning of each presentation
• You may customize the presentations to fit
your class needs
• Some figures from the chapters are included;
a complete set of images from the book can
be found on the Instructor Resources disc
Java Programming: From Problem
Analysis to Program Design, 5e

Chapter 1
An Overview of Computers and
Programming Languages
Chapter Objectives
• Learn about different types of computers
• Explore the hardware and software
components of a computer system
• Learn about the language of a computer
• Learn about the evolution of programming
languages
• Examine high-level programming
languages

Java Programming: From Problem Analysis to Program Design, 5e

3
Chapter Objectives (continued)
• Discover what a compiler is and what it
does
• Examine how a Java program is processed
• Learn what an algorithm is and explore
problem-solving techniques
• Become aware of structured and objectoriented programming design
methodologies
Java Programming: From Problem Analysis to Program Design, 5e

4
Introduction
• Computers have greatly affected our daily
lives – helping us complete many tasks
• Computer programs (software) are designed
specifically for each task
• Software is created with programming
languages
• Java is an example of a programming
language
Java Programming: From Problem Analysis to Program Design, 5e

5
An Overview of the History of
Computers
• The first device known to carry out
calculations was the abacus
• The abacus uses a system of sliding beads
on a rack for addition and subtraction
• Blaise Pascal invented the calculating
device called the Pascaline

Java Programming: From Problem Analysis to Program Design, 5e

6
An Overview of the History of
Computers (continued)
• In 1819, Joseph Jacquard, a French weaver,
discovered that the weaving instructions for
his looms could be stored on cards with
holes punched in them
• In the early and mid-1800s, Charles
Babbage, an English mathematician and
physical scientist, designed two calculating
machines: the difference engine and the
analytical engine
Java Programming: From Problem Analysis to Program Design, 5e

7
An Overview of the History of
Computers (continued)
• The first computer-like machine was the
Mark I
– Built in 1944
– Used punched cards to feed data into the
machine
– 52 feet long, weighed 50 tons, and had 750,000
parts

• In 1946, ENIAC (Electronic Numerical
Integrator and Calculator) was built at the
University of Pennsylvania
– Contained 18,000 vacuum tubes and weighed
some 30 tons
Java Programming: From Problem Analysis to Program Design, 5e

8
An Overview of the History of
Computers (continued)
• In 1956, the invention of the transistors
resulted in smaller, faster, more reliable,
and more energy-efficient computers
• This era also saw the emergence of the
software development industry with the
introduction of FORTRAN and COBOL,
two early programming languages
• In 1970, the microprocessor, an entire CPU
on a single chip, was invented
Java Programming: From Problem Analysis to Program Design, 5e

9
An Overview of the History of
Computers (continued)
• In 1977, Stephen Wozniak and Steven Jobs
designed and built the first Apple computer in
their garage
• In 1981, IBM introduced its personal computer
(PC)
• Modern-day computers are very powerful,
reliable, and easy to use
– Can accept spoken-word instructions and imitate
human reasoning through artificial intelligence
Java Programming: From Problem Analysis to Program Design, 5e

10
An Overview of the History of
Computers (continued)
• A computer is an electronic device capable
of performing commands
• The basic commands that a computer
performs are input (get data), output (display
results), storage, and performance of
arithmetic and logical operations

Java Programming: From Problem Analysis to Program Design, 5e

11
Elements of a Computer System
• A computer has two components
– Hardware
– Software

Java Programming: From Problem Analysis to Program Design, 5e

12
Hardware Components of a
Computer
• Central processing unit (CPU)
• Main memory

Java Programming: From Problem Analysis to Program Design, 5e

13
Central Processing Unit
• Arithmetic and logical operations are
carried out inside the CPU

Java Programming: From Problem Analysis to Program Design, 5e

14
Central Processing Unit and Main Memory

Figure 1-1
Java Programming: From Problem Analysis to Program Design, 5e

15
Main Memory
• Ordered sequence of cells (memory cells)
• Directly connected to CPU
• All programs must be brought into main
memory before execution
• When power is turned off, everything in
main memory is lost

Java Programming: From Problem Analysis to Program Design, 5e

16
Secondary Storage
• Provides permanent storage for information
• Examples of secondary storage:
–
–
–
–
–
–

Hard disks
Floppy disks
Flash memory
ZIP disks
CD-ROMs
Tapes

Java Programming: From Problem Analysis to Program Design, 5e

17
Input Devices
• Definition: devices that feed data and
computer programs into computers
• Examples
– Keyboard
– Mouse
– Secondary storage

Java Programming: From Problem Analysis to Program Design, 5e

18
Output Devices
• Definition: devices that the computer uses
to display results
• Examples
– Printer
– Monitor
– Secondary storage

Java Programming: From Problem Analysis to Program Design, 5e

19
Input/Output Devices

Figure 1-2
Java Programming: From Problem Analysis to Program Design, 5e

20
Software
• Software consists of programs written to
perform specific tasks
• Two types of programs
– System programs
– Application programs

Java Programming: From Problem Analysis to Program Design, 5e

21
System Programs
• System programs control the computer
• The operating system is first to load when
you turn on a computer

Java Programming: From Problem Analysis to Program Design, 5e

22
Operating System (OS)
• OS monitors overall activity of the
computer and provides services
• Example services
–
–
–
–

Memory management
Input/output
Activities
Storage management

Java Programming: From Problem Analysis to Program Design, 5e

23
Application Programs
•
•
•
•

Written using programming languages
Perform a specific task
Run by the OS
Example programs
– Word processors
– Spreadsheets
– Games

Java Programming: From Problem Analysis to Program Design, 5e

24
Language of a Computer
• Machine language: the most basic language
of a computer
• A sequence of 0s and 1s
• Every computer directly understands its
own machine language
• A bit is a binary digit, 0 or 1
• A byte is a sequence of eight bits
Java Programming: From Problem Analysis to Program Design, 5e

25
Language of a Computer (continued)

Java Programming: From Problem Analysis to Program Design, 5e

26
Evolution of Programming
Languages
• Early computers programmed in machine
language
• Assembly languages were developed to
make programmer’s job easier
• In assembly language, an instruction is an
easy-to-remember form called a mnemonic
• Assembler: translates assembly language
instructions into machine language
Java Programming: From Problem Analysis to Program Design, 5e

27
Instructions in Assembly and
Machine Language

Java Programming: From Problem Analysis to Program Design, 5e

28
Evolution of Programming
Languages
• High-level languages make programming
easier
• Closer to spoken languages
• Examples
–
–
–
–
–

Basic
FORTRAN
COBOL
C/C++
Java

Java Programming: From Problem Analysis to Program Design, 5e

29
Evolution of Programming
Languages (continued)
• To run a Java program:
1. Java instructions need to be translated into an
intermediate language called bytecode
2. Then the bytecode is interpreted into a
particular machine language

Java Programming: From Problem Analysis to Program Design, 5e

30
Evolution of Programming
Languages (continued)
•

Compiler: a program that translates a program
written in a high-level language into the
equivalent machine language
– In the case of Java, this machine language is
the bytecode
• Java Virtual Machine (JVM): hypothetical
computer developed to make Java programs
machine independent
Java Programming: From Problem Analysis to Program Design, 5e

31
A Java Program

Output:

Java Programming: From Problem Analysis to Program Design, 5e

32
Processing a Java Program
• Two types of Java programs: applications and
applets
• Source program: written in a high-level language
• Loader: transfers the compiled code (bytecode)
into main memory
• Interpreter: reads and translates each bytecode
instruction into machine language and then
executes it

Java Programming: From Problem Analysis to Program Design, 5e

33
Processing a Java Program (continued)
Figure 1-3

Java Programming: From Problem Analysis to Program Design, 5e

34
Internet, World Wide Web,
Browser, and Java
• The Internet is an interconnection of networks that allows
computers around the world to communicate with each
other
• In 1969, the U.S. Department of Defense’s Advanced
Research Project Agency (ARPA) funded research projects
to investigate and develop techniques and technologies to
interlink networks
• This was called the internetting project, and the funding
resulted in ARPANET, which eventually became known
as the “Internet”
• The Internet allows computers to be connected and
communicate with each other
Java Programming: From Problem Analysis to Program Design, 5e

35
Internet, World Wide Web,
Browser, and Java (continued)
• World Wide Web (WWW), or Web, uses software
programs that enable computer users to access
documents and files (including images, audio, and
video) on almost any subject over the Internet
with the click of a mouse
• Computers around the world communicate via the
Internet; the World Wide Web makes that
communication a fun activity
Java Programming: From Problem Analysis to Program Design, 5e

36
Internet, World Wide Web,
Browser, and Java (continued)
• The primary language for the Web is known as
Hypertext Markup Language (HTML)
• Java applets are programs that run from a Web
browser and make the Web responsive and
interactive
• Two well-known browsers are Mozilla Firefox
and Internet Explorer
• Java applets can run in either browser
• Through the use of applets, the Web becomes
responsive, interactive, and fun to use
Java Programming: From Problem Analysis to Program Design, 5e

37
Problem-Analysis-CodingExecution Cycle
• Algorithm: a step-by-step problem-solving
process in which a solution is arrived at in a
finite amount of time

Java Programming: From Problem Analysis to Program Design, 5e

38
Problem-Solving Process
1. Analyze the problem and outline the problem
and its solution requirements
2. Design an algorithm to solve the problem
3. Implement the algorithm in a programming
language, such as Java
4. Verify that the algorithm works
5. Maintain the program by using and
improving it and modifying it if the problem
domain changes
Java Programming: From Problem Analysis to Program Design, 5e

39
Problem-Analysis-CodingExecution Cycle (continued)

Figure 1-4

Java Programming: From Problem Analysis to Program Design, 5e

40
Programming Methodologies
• Two basic approaches to programming
design
– Structured design
– Object-oriented design

Java Programming: From Problem Analysis to Program Design, 5e

41
Structured Design
1. A problem is divided into smaller
subproblems
2. Each subproblem is solved
3. The solutions of all subproblems are then
combined to solve the problem

Java Programming: From Problem Analysis to Program Design, 5e

42
Object-Oriented Design (OOD)
•
•
•

In OOD, a program is a collection of
interacting objects
An object consists of data and operations
Steps in OOD
1. Identify objects
2. Form the basis of the solution
3. Determine how these objects interact

Java Programming: From Problem Analysis to Program Design, 5e

43
Chapter Summary
• A computer system is made up of hardware and
software components
• Computers understand machine language; it is
easiest for programmers to write in high-level
languages
• A compiler translates high-level language into
machine language
• Java steps to execute a program: edit, compile,
load, and execute
Java Programming: From Problem Analysis to Program Design, 5e

44
Chapter Summary (continued)
• Algorithm: step-by-step problem-solving process
in which a solution is arrived at in a finite amount
of time
• Three steps to problem solving: analyze the
problem and design an algorithm, implement the
algorithm in a programming language, and
maintain the program
• Two basic approaches to programming design:
structured and object-oriented
Java Programming: From Problem Analysis to Program Design, 5e

45

More Related Content

What's hot

Basics of Computer Coding: Understanding Coding Languages
Basics of Computer Coding: Understanding Coding LanguagesBasics of Computer Coding: Understanding Coding Languages
Basics of Computer Coding: Understanding Coding LanguagesBrian Pichman
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & LanguagesGaditek
 
Introduction to Programming Languages
Introduction to Programming LanguagesIntroduction to Programming Languages
Introduction to Programming Languageseducationfront
 
Logic programming (1)
Logic programming (1)Logic programming (1)
Logic programming (1)Nitesh Singh
 
Lecture 01 introduction to compiler
Lecture 01 introduction to compilerLecture 01 introduction to compiler
Lecture 01 introduction to compilerIffat Anjum
 
Introduction to Vim
Introduction to VimIntroduction to Vim
Introduction to VimBrandon Liu
 
Part 01 Linux Kernel Compilation (Ubuntu)
Part 01 Linux Kernel Compilation (Ubuntu)Part 01 Linux Kernel Compilation (Ubuntu)
Part 01 Linux Kernel Compilation (Ubuntu)Tushar B Kute
 
Compiler construction tools
Compiler construction toolsCompiler construction tools
Compiler construction toolsAkhil Kaushik
 
Introduction to system programming
Introduction to system programmingIntroduction to system programming
Introduction to system programmingsonalikharade3
 
Generations Of Programming Languages
Generations Of Programming LanguagesGenerations Of Programming Languages
Generations Of Programming Languagespy7rjs
 
An overview of computers and programming languages
An overview of computers and programming languages An overview of computers and programming languages
An overview of computers and programming languages Ahmad Idrees
 
Language translator
Language translatorLanguage translator
Language translatorasmakh89
 
An introduction to coding
An introduction to codingAn introduction to coding
An introduction to codingiain bruce
 

What's hot (20)

Basics of Computer Coding: Understanding Coding Languages
Basics of Computer Coding: Understanding Coding LanguagesBasics of Computer Coding: Understanding Coding Languages
Basics of Computer Coding: Understanding Coding Languages
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
 
Introduction to Programming Languages
Introduction to Programming LanguagesIntroduction to Programming Languages
Introduction to Programming Languages
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process Communication
 
Logic programming (1)
Logic programming (1)Logic programming (1)
Logic programming (1)
 
Lecture 01 introduction to compiler
Lecture 01 introduction to compilerLecture 01 introduction to compiler
Lecture 01 introduction to compiler
 
Introduction to Vim
Introduction to VimIntroduction to Vim
Introduction to Vim
 
Compiler Construction
Compiler ConstructionCompiler Construction
Compiler Construction
 
C programming language
C programming languageC programming language
C programming language
 
Signal
SignalSignal
Signal
 
Part 01 Linux Kernel Compilation (Ubuntu)
Part 01 Linux Kernel Compilation (Ubuntu)Part 01 Linux Kernel Compilation (Ubuntu)
Part 01 Linux Kernel Compilation (Ubuntu)
 
Compiler construction tools
Compiler construction toolsCompiler construction tools
Compiler construction tools
 
Chapter 4 5
Chapter 4 5Chapter 4 5
Chapter 4 5
 
Introduction to system programming
Introduction to system programmingIntroduction to system programming
Introduction to system programming
 
Generations Of Programming Languages
Generations Of Programming LanguagesGenerations Of Programming Languages
Generations Of Programming Languages
 
An overview of computers and programming languages
An overview of computers and programming languages An overview of computers and programming languages
An overview of computers and programming languages
 
Language translator
Language translatorLanguage translator
Language translator
 
Unix shell scripts
Unix shell scriptsUnix shell scripts
Unix shell scripts
 
Linux boot process
Linux boot processLinux boot process
Linux boot process
 
An introduction to coding
An introduction to codingAn introduction to coding
An introduction to coding
 

Viewers also liked

9781111530532 ppt ch03
9781111530532 ppt ch039781111530532 ppt ch03
9781111530532 ppt ch03Terry Yoast
 
9781111530532 ppt ch05
9781111530532 ppt ch059781111530532 ppt ch05
9781111530532 ppt ch05Terry Yoast
 
9781111530532 ppt ch04
9781111530532 ppt ch049781111530532 ppt ch04
9781111530532 ppt ch04Terry Yoast
 
9781111530532 ppt ch08
9781111530532 ppt ch089781111530532 ppt ch08
9781111530532 ppt ch08Terry Yoast
 
Chapter 2 - Basic Elements of Java
Chapter 2 - Basic Elements of JavaChapter 2 - Basic Elements of Java
Chapter 2 - Basic Elements of JavaAdan Hubahib
 
9781111530532 ppt ch10
9781111530532 ppt ch109781111530532 ppt ch10
9781111530532 ppt ch10Terry Yoast
 
Chapter 13 - Recursion
Chapter 13 - RecursionChapter 13 - Recursion
Chapter 13 - RecursionAdan Hubahib
 
9781111530532 ppt ch07
9781111530532 ppt ch079781111530532 ppt ch07
9781111530532 ppt ch07Terry Yoast
 

Viewers also liked (8)

9781111530532 ppt ch03
9781111530532 ppt ch039781111530532 ppt ch03
9781111530532 ppt ch03
 
9781111530532 ppt ch05
9781111530532 ppt ch059781111530532 ppt ch05
9781111530532 ppt ch05
 
9781111530532 ppt ch04
9781111530532 ppt ch049781111530532 ppt ch04
9781111530532 ppt ch04
 
9781111530532 ppt ch08
9781111530532 ppt ch089781111530532 ppt ch08
9781111530532 ppt ch08
 
Chapter 2 - Basic Elements of Java
Chapter 2 - Basic Elements of JavaChapter 2 - Basic Elements of Java
Chapter 2 - Basic Elements of Java
 
9781111530532 ppt ch10
9781111530532 ppt ch109781111530532 ppt ch10
9781111530532 ppt ch10
 
Chapter 13 - Recursion
Chapter 13 - RecursionChapter 13 - Recursion
Chapter 13 - Recursion
 
9781111530532 ppt ch07
9781111530532 ppt ch079781111530532 ppt ch07
9781111530532 ppt ch07
 

Similar to Chapter 1 - An Overview of Computers and Programming Languages

9781111530532 ppt ch01
9781111530532 ppt ch019781111530532 ppt ch01
9781111530532 ppt ch01Terry Yoast
 
9781111530532 ppt ch01
9781111530532 ppt ch019781111530532 ppt ch01
9781111530532 ppt ch01Terry Yoast
 
01 Computer Basics (Ch1.1).pptx
01 Computer Basics (Ch1.1).pptx01 Computer Basics (Ch1.1).pptx
01 Computer Basics (Ch1.1).pptxsarah380333
 
Computer, generations, languages, soft wares
Computer, generations, languages, soft waresComputer, generations, languages, soft wares
Computer, generations, languages, soft wareskiranmohan42
 
Introduction to Java(1) - CPPT+opy.Jpptx
Introduction to Java(1) - CPPT+opy.JpptxIntroduction to Java(1) - CPPT+opy.Jpptx
Introduction to Java(1) - CPPT+opy.Jpptxshesnasuneer
 
Ch01.pptxxxxxxxxxcxcxcxxccxxxxxxxxxxxcccccc
Ch01.pptxxxxxxxxxcxcxcxxccxxxxxxxxxxxccccccCh01.pptxxxxxxxxxcxcxcxxccxxxxxxxxxxxcccccc
Ch01.pptxxxxxxxxxcxcxcxxccxxxxxxxxxxxcccccctasheebedane
 
9781285852744 ppt ch01
9781285852744 ppt ch019781285852744 ppt ch01
9781285852744 ppt ch01Terry Yoast
 
Mba i-ifm-u-2-computer software
Mba i-ifm-u-2-computer softwareMba i-ifm-u-2-computer software
Mba i-ifm-u-2-computer softwareRai University
 
Synapseindia dot net development computer programming
Synapseindia dot net development  computer programmingSynapseindia dot net development  computer programming
Synapseindia dot net development computer programmingSynapseindiappsdevelopment
 
Computer and multimedia Week 1 Windows Architecture.pptx
Computer and multimedia Week 1 Windows Architecture.pptxComputer and multimedia Week 1 Windows Architecture.pptx
Computer and multimedia Week 1 Windows Architecture.pptxfatahozil
 
Introduction to computers
Introduction to computersIntroduction to computers
Introduction to computersLearn By Watch
 
C++ programming languages lectures
C++ programming languages lectures C++ programming languages lectures
C++ programming languages lectures jabirMemon
 
Overview of computers and programming
Overview of computers and programmingOverview of computers and programming
Overview of computers and programmingJason J Pulikkottil
 

Similar to Chapter 1 - An Overview of Computers and Programming Languages (20)

9781111530532 ppt ch01
9781111530532 ppt ch019781111530532 ppt ch01
9781111530532 ppt ch01
 
9781111530532 ppt ch01
9781111530532 ppt ch019781111530532 ppt ch01
9781111530532 ppt ch01
 
Chapter 01
Chapter 01Chapter 01
Chapter 01
 
01 Computer Basics (Ch1.1).pptx
01 Computer Basics (Ch1.1).pptx01 Computer Basics (Ch1.1).pptx
01 Computer Basics (Ch1.1).pptx
 
Chap01
Chap01Chap01
Chap01
 
Plc part 1
Plc part 1Plc part 1
Plc part 1
 
Computer, generations, languages, soft wares
Computer, generations, languages, soft waresComputer, generations, languages, soft wares
Computer, generations, languages, soft wares
 
Compilers.pptx
Compilers.pptxCompilers.pptx
Compilers.pptx
 
Introduction to Java(1) - CPPT+opy.Jpptx
Introduction to Java(1) - CPPT+opy.JpptxIntroduction to Java(1) - CPPT+opy.Jpptx
Introduction to Java(1) - CPPT+opy.Jpptx
 
01CHAP_1.PPT
01CHAP_1.PPT01CHAP_1.PPT
01CHAP_1.PPT
 
Ch01.pptxxxxxxxxxcxcxcxxccxxxxxxxxxxxcccccc
Ch01.pptxxxxxxxxxcxcxcxxccxxxxxxxxxxxccccccCh01.pptxxxxxxxxxcxcxcxxccxxxxxxxxxxxcccccc
Ch01.pptxxxxxxxxxcxcxcxxccxxxxxxxxxxxcccccc
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
 
9781285852744 ppt ch01
9781285852744 ppt ch019781285852744 ppt ch01
9781285852744 ppt ch01
 
Mba i-ifm-u-2-computer software
Mba i-ifm-u-2-computer softwareMba i-ifm-u-2-computer software
Mba i-ifm-u-2-computer software
 
Synapseindia dot net development computer programming
Synapseindia dot net development  computer programmingSynapseindia dot net development  computer programming
Synapseindia dot net development computer programming
 
Computer and multimedia Week 1 Windows Architecture.pptx
Computer and multimedia Week 1 Windows Architecture.pptxComputer and multimedia Week 1 Windows Architecture.pptx
Computer and multimedia Week 1 Windows Architecture.pptx
 
Introduction to computers
Introduction to computersIntroduction to computers
Introduction to computers
 
chapt_01.pdf
chapt_01.pdfchapt_01.pdf
chapt_01.pdf
 
C++ programming languages lectures
C++ programming languages lectures C++ programming languages lectures
C++ programming languages lectures
 
Overview of computers and programming
Overview of computers and programmingOverview of computers and programming
Overview of computers and programming
 

Recently uploaded

PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 

Recently uploaded (20)

PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 

Chapter 1 - An Overview of Computers and Programming Languages

  • 1. About the Presentations • The presentations cover the objectives found in the opening of each chapter • All chapter objectives are listed in the beginning of each presentation • You may customize the presentations to fit your class needs • Some figures from the chapters are included; a complete set of images from the book can be found on the Instructor Resources disc
  • 2. Java Programming: From Problem Analysis to Program Design, 5e Chapter 1 An Overview of Computers and Programming Languages
  • 3. Chapter Objectives • Learn about different types of computers • Explore the hardware and software components of a computer system • Learn about the language of a computer • Learn about the evolution of programming languages • Examine high-level programming languages Java Programming: From Problem Analysis to Program Design, 5e 3
  • 4. Chapter Objectives (continued) • Discover what a compiler is and what it does • Examine how a Java program is processed • Learn what an algorithm is and explore problem-solving techniques • Become aware of structured and objectoriented programming design methodologies Java Programming: From Problem Analysis to Program Design, 5e 4
  • 5. Introduction • Computers have greatly affected our daily lives – helping us complete many tasks • Computer programs (software) are designed specifically for each task • Software is created with programming languages • Java is an example of a programming language Java Programming: From Problem Analysis to Program Design, 5e 5
  • 6. An Overview of the History of Computers • The first device known to carry out calculations was the abacus • The abacus uses a system of sliding beads on a rack for addition and subtraction • Blaise Pascal invented the calculating device called the Pascaline Java Programming: From Problem Analysis to Program Design, 5e 6
  • 7. An Overview of the History of Computers (continued) • In 1819, Joseph Jacquard, a French weaver, discovered that the weaving instructions for his looms could be stored on cards with holes punched in them • In the early and mid-1800s, Charles Babbage, an English mathematician and physical scientist, designed two calculating machines: the difference engine and the analytical engine Java Programming: From Problem Analysis to Program Design, 5e 7
  • 8. An Overview of the History of Computers (continued) • The first computer-like machine was the Mark I – Built in 1944 – Used punched cards to feed data into the machine – 52 feet long, weighed 50 tons, and had 750,000 parts • In 1946, ENIAC (Electronic Numerical Integrator and Calculator) was built at the University of Pennsylvania – Contained 18,000 vacuum tubes and weighed some 30 tons Java Programming: From Problem Analysis to Program Design, 5e 8
  • 9. An Overview of the History of Computers (continued) • In 1956, the invention of the transistors resulted in smaller, faster, more reliable, and more energy-efficient computers • This era also saw the emergence of the software development industry with the introduction of FORTRAN and COBOL, two early programming languages • In 1970, the microprocessor, an entire CPU on a single chip, was invented Java Programming: From Problem Analysis to Program Design, 5e 9
  • 10. An Overview of the History of Computers (continued) • In 1977, Stephen Wozniak and Steven Jobs designed and built the first Apple computer in their garage • In 1981, IBM introduced its personal computer (PC) • Modern-day computers are very powerful, reliable, and easy to use – Can accept spoken-word instructions and imitate human reasoning through artificial intelligence Java Programming: From Problem Analysis to Program Design, 5e 10
  • 11. An Overview of the History of Computers (continued) • A computer is an electronic device capable of performing commands • The basic commands that a computer performs are input (get data), output (display results), storage, and performance of arithmetic and logical operations Java Programming: From Problem Analysis to Program Design, 5e 11
  • 12. Elements of a Computer System • A computer has two components – Hardware – Software Java Programming: From Problem Analysis to Program Design, 5e 12
  • 13. Hardware Components of a Computer • Central processing unit (CPU) • Main memory Java Programming: From Problem Analysis to Program Design, 5e 13
  • 14. Central Processing Unit • Arithmetic and logical operations are carried out inside the CPU Java Programming: From Problem Analysis to Program Design, 5e 14
  • 15. Central Processing Unit and Main Memory Figure 1-1 Java Programming: From Problem Analysis to Program Design, 5e 15
  • 16. Main Memory • Ordered sequence of cells (memory cells) • Directly connected to CPU • All programs must be brought into main memory before execution • When power is turned off, everything in main memory is lost Java Programming: From Problem Analysis to Program Design, 5e 16
  • 17. Secondary Storage • Provides permanent storage for information • Examples of secondary storage: – – – – – – Hard disks Floppy disks Flash memory ZIP disks CD-ROMs Tapes Java Programming: From Problem Analysis to Program Design, 5e 17
  • 18. Input Devices • Definition: devices that feed data and computer programs into computers • Examples – Keyboard – Mouse – Secondary storage Java Programming: From Problem Analysis to Program Design, 5e 18
  • 19. Output Devices • Definition: devices that the computer uses to display results • Examples – Printer – Monitor – Secondary storage Java Programming: From Problem Analysis to Program Design, 5e 19
  • 20. Input/Output Devices Figure 1-2 Java Programming: From Problem Analysis to Program Design, 5e 20
  • 21. Software • Software consists of programs written to perform specific tasks • Two types of programs – System programs – Application programs Java Programming: From Problem Analysis to Program Design, 5e 21
  • 22. System Programs • System programs control the computer • The operating system is first to load when you turn on a computer Java Programming: From Problem Analysis to Program Design, 5e 22
  • 23. Operating System (OS) • OS monitors overall activity of the computer and provides services • Example services – – – – Memory management Input/output Activities Storage management Java Programming: From Problem Analysis to Program Design, 5e 23
  • 24. Application Programs • • • • Written using programming languages Perform a specific task Run by the OS Example programs – Word processors – Spreadsheets – Games Java Programming: From Problem Analysis to Program Design, 5e 24
  • 25. Language of a Computer • Machine language: the most basic language of a computer • A sequence of 0s and 1s • Every computer directly understands its own machine language • A bit is a binary digit, 0 or 1 • A byte is a sequence of eight bits Java Programming: From Problem Analysis to Program Design, 5e 25
  • 26. Language of a Computer (continued) Java Programming: From Problem Analysis to Program Design, 5e 26
  • 27. Evolution of Programming Languages • Early computers programmed in machine language • Assembly languages were developed to make programmer’s job easier • In assembly language, an instruction is an easy-to-remember form called a mnemonic • Assembler: translates assembly language instructions into machine language Java Programming: From Problem Analysis to Program Design, 5e 27
  • 28. Instructions in Assembly and Machine Language Java Programming: From Problem Analysis to Program Design, 5e 28
  • 29. Evolution of Programming Languages • High-level languages make programming easier • Closer to spoken languages • Examples – – – – – Basic FORTRAN COBOL C/C++ Java Java Programming: From Problem Analysis to Program Design, 5e 29
  • 30. Evolution of Programming Languages (continued) • To run a Java program: 1. Java instructions need to be translated into an intermediate language called bytecode 2. Then the bytecode is interpreted into a particular machine language Java Programming: From Problem Analysis to Program Design, 5e 30
  • 31. Evolution of Programming Languages (continued) • Compiler: a program that translates a program written in a high-level language into the equivalent machine language – In the case of Java, this machine language is the bytecode • Java Virtual Machine (JVM): hypothetical computer developed to make Java programs machine independent Java Programming: From Problem Analysis to Program Design, 5e 31
  • 32. A Java Program Output: Java Programming: From Problem Analysis to Program Design, 5e 32
  • 33. Processing a Java Program • Two types of Java programs: applications and applets • Source program: written in a high-level language • Loader: transfers the compiled code (bytecode) into main memory • Interpreter: reads and translates each bytecode instruction into machine language and then executes it Java Programming: From Problem Analysis to Program Design, 5e 33
  • 34. Processing a Java Program (continued) Figure 1-3 Java Programming: From Problem Analysis to Program Design, 5e 34
  • 35. Internet, World Wide Web, Browser, and Java • The Internet is an interconnection of networks that allows computers around the world to communicate with each other • In 1969, the U.S. Department of Defense’s Advanced Research Project Agency (ARPA) funded research projects to investigate and develop techniques and technologies to interlink networks • This was called the internetting project, and the funding resulted in ARPANET, which eventually became known as the “Internet” • The Internet allows computers to be connected and communicate with each other Java Programming: From Problem Analysis to Program Design, 5e 35
  • 36. Internet, World Wide Web, Browser, and Java (continued) • World Wide Web (WWW), or Web, uses software programs that enable computer users to access documents and files (including images, audio, and video) on almost any subject over the Internet with the click of a mouse • Computers around the world communicate via the Internet; the World Wide Web makes that communication a fun activity Java Programming: From Problem Analysis to Program Design, 5e 36
  • 37. Internet, World Wide Web, Browser, and Java (continued) • The primary language for the Web is known as Hypertext Markup Language (HTML) • Java applets are programs that run from a Web browser and make the Web responsive and interactive • Two well-known browsers are Mozilla Firefox and Internet Explorer • Java applets can run in either browser • Through the use of applets, the Web becomes responsive, interactive, and fun to use Java Programming: From Problem Analysis to Program Design, 5e 37
  • 38. Problem-Analysis-CodingExecution Cycle • Algorithm: a step-by-step problem-solving process in which a solution is arrived at in a finite amount of time Java Programming: From Problem Analysis to Program Design, 5e 38
  • 39. Problem-Solving Process 1. Analyze the problem and outline the problem and its solution requirements 2. Design an algorithm to solve the problem 3. Implement the algorithm in a programming language, such as Java 4. Verify that the algorithm works 5. Maintain the program by using and improving it and modifying it if the problem domain changes Java Programming: From Problem Analysis to Program Design, 5e 39
  • 40. Problem-Analysis-CodingExecution Cycle (continued) Figure 1-4 Java Programming: From Problem Analysis to Program Design, 5e 40
  • 41. Programming Methodologies • Two basic approaches to programming design – Structured design – Object-oriented design Java Programming: From Problem Analysis to Program Design, 5e 41
  • 42. Structured Design 1. A problem is divided into smaller subproblems 2. Each subproblem is solved 3. The solutions of all subproblems are then combined to solve the problem Java Programming: From Problem Analysis to Program Design, 5e 42
  • 43. Object-Oriented Design (OOD) • • • In OOD, a program is a collection of interacting objects An object consists of data and operations Steps in OOD 1. Identify objects 2. Form the basis of the solution 3. Determine how these objects interact Java Programming: From Problem Analysis to Program Design, 5e 43
  • 44. Chapter Summary • A computer system is made up of hardware and software components • Computers understand machine language; it is easiest for programmers to write in high-level languages • A compiler translates high-level language into machine language • Java steps to execute a program: edit, compile, load, and execute Java Programming: From Problem Analysis to Program Design, 5e 44
  • 45. Chapter Summary (continued) • Algorithm: step-by-step problem-solving process in which a solution is arrived at in a finite amount of time • Three steps to problem solving: analyze the problem and design an algorithm, implement the algorithm in a programming language, and maintain the program • Two basic approaches to programming design: structured and object-oriented Java Programming: From Problem Analysis to Program Design, 5e 45