introduction. let’s begin goal –teach you how to program effectively skills and information to...

34
Introduction

Upload: esther-norman

Post on 23-Dec-2015

214 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Introduction

Page 2: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Let’s begin• Goal

– Teach you how to program effectively

• Skills and information to be acquired– Mental model of computer and network behavior– Problem solving– Object-oriented design– Java

Page 3: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Computer Organization• Computer advertisement specification

– Intel® Pentium 4 Processorat 3.06GHz with 512K cache

– 512MB DDR SDRAM– 200GB ATA-100 Hard Drive

(7200 RPM, 9.0 ms seek time)– 17” LCD Monitor– 64MB NVIDIA GeForce4

MX Graphics Card®– 16x Max DVD-ROM Drive– 48x/24x/48x CD-RW Drive– 56K PCI Telephony Modem– Windows XP Home Edition SP2 ®– 10/100 Fast Ethernet Network Card

Page 4: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Computer Organization

Input Devices

CentralProcessing Unit

Memory

Output Devices

Page 5: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Computer Organization• Computer advertisement specification

– Intel® Pentium 4 Processorat 3.06GHz with 512K cache

– 512MB DDR SDRAM– 200GB ATA-100 Hard Drive

(7200 RPM, 9.0 ms seek time)– 17” LCD Monitor– 64MB NVIDIA GeForce4

MX Graphics Card®– 16x Max DVD-ROM Drive– 48x/24x/48x CD-RW Drive– 56K PCI Telephony Modem– Windows XP Home Edition SP2 ®– 10/100 Fast Ethernet Network Card

3.06 billion operationsper second

Page 6: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Computer Organization• Computer advertisement specification

– Intel® Pentium 4 Processorat 3.06GHz with 512K cache

– 512MB DDR SDRAM– 200GB ATA-100 Hard Drive

(7200 RPM, 9.0 ms seek time)– 17” LCD Monitor– 64MB NVIDIA GeForce4

MX Graphics Card®– 16x Max DVD-ROM Drive– 48x/24x/48x CD-RW Drive– 56K PCI Telephony Modem– Windows XP Home Edition SP2 ®– 10/100 Fast Ethernet Network Card

512 million bytes ofmemory that can betransferred at double

the normal rate

A byte is 8 bits

A bit is a 0 or a 1

Page 7: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Computer Organization• Computer advertisement specification

– Intel® Pentium 4 Processorat 3.06GHz with 512K cache

– 512MB DDR SDRAM– 200GB ATA-100 Hard Drive

(7200 RPM, 9.0 ms seek time)– 17” LCD Monitor– 64MB NVIDIA GeForce4

MX Graphics Card®– 16x Max DVD-ROM Drive– 48x/24x/48x CD-RW Drive– 56K PCI Telephony Modem– Windows XP Home Edition SP2 ®– 10/100 Fast Ethernet Network Card

Stores 200 billionbytes of data. You want high RPM and

low seek time.0.009 seconds is

average

Page 8: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Computer Organization• Computer advertisement specification

– Intel® Pentium 4 Processorat 3.06GHz with 512K cache

– 512MB DDR SDRAM– 200GB ATA-100 Hard Drive

(7200 RPM, 9.0 ms seek time)– 17” LCD Monitor– 64MB NVIDIA GeForce4

MX Graphics Card®– 16x Max DVD-ROM Drive– 48x/24x/48x CD-RW Drive– 56K PCI Telephony Modem– Windows XP Home Edition SP2 ®– 10/100 Fast Ethernet Network Card

17” on the diagonal.Resolution up to1,280 by 1,024

pixels

Page 9: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Computer Organization• Computer advertisement specification

– Intel® Pentium 4 Processorat 3.06GHz with 512K cache

– 512MB DDR SDRAM– 200GB ATA-100 Hard Drive

(7200 RPM, 9.0 ms seek time)– 17” LCD Monitor– 64MB NVIDIA GeForce4

MX Graphics Card®– 16x Max DVD-ROM Drive– 48x/24x/48x CD-RW Drive– 56K PCI Telephony Modem– Windows XP Home Edition SP2 ®– 10/100 Fast Ethernet Network Card

Microprocessor fordisplaying images with

64 million bytes ofmemory. More memorysupports more colorsand higher resolution

Page 10: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Computer Organization• Computer advertisement specification

– Intel® Pentium 4 Processorat 3.06GHz with 512K cache

– 512MB DDR SDRAM– 200GB ATA-100 Hard Drive

(7200 RPM, 9.0 ms seek time)– 17” LCD Monitor– 64MB NVIDIA GeForce4

MX Graphics Card®– 16x Max DVD-ROM Drive– 48x/24x/48x CD-RW Drive– 56K PCI Telephony Modem– Windows XP Home Edition SP2 ®– 10/100 Fast Ethernet Network Card

Reads DVDs 16 timesfaster than a basic DVD

drive. Can hold up to8 billion bytes of data

Page 11: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Computer Organization• Computer advertisement specification

– Intel® Pentium 4 Processorat 3.06GHz with 512K cache

– 512MB DDR SDRAM– 200GB ATA-100 Hard Drive

(7200 RPM, 9.0 ms seek time)– 17” LCD Monitor– 64MB NVIDIA GeForce4

MX Graphics Card®– 16x Max DVD-ROM Drive– 48x/24x/48x CD-RW Drive– 56K PCI Telephony Modem– Windows XP Home Edition SP2 ®– 10/100 Fast Ethernet Network Card

Can read and writeCDs. Can hold 650

million bytes of dataReads at 48 timesfaster and writes

24 times faster thana basic drive

Page 12: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Computer Organization• Computer advertisement specification

– Intel® Pentium 4 Processorat 3.06GHz with 512K cache

– 512MB DDR SDRAM– 200GB ATA-100 Hard Drive

(7200 RPM, 9.0 ms seek time)– 17” LCD Monitor– 64MB NVIDIA GeForce4

MX Graphics Card®– 16x Max DVD-ROM Drive– 48x/24x/48x CD-RW Drive– 56K PCI Telephony Modem– Windows XP Home Edition SP2 ®– 10/100 Fast Ethernet Network Card

Can send or receiveup to 56 thousand

bits per second

Page 13: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Computer Organization• Computer advertisement specification

– Intel® Pentium 4 Processorat 3.06GHz with 512K cache

– 512MB DDR SDRAM– 200GB ATA-100 Hard Drive

(7200 RPM, 9.0 ms seek time)– 17” LCD Monitor– 64MB NVIDIA GeForce4

MX Graphics Card®– 16x Max DVD-ROM Drive– 48x/24x/48x CD-RW Drive– 56K PCI Telephony Modem– Windows XP Home Edition SP2 ®– 10/100 Fast Ethernet Network Card

Computer operatingsystem using a

graphical interface

Page 14: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Computer Organization• Computer advertisement specification

– Intel® Pentium 4 Processorat 3.06GHz with 512K cache

– 512MB DDR SDRAM– 200GB ATA-100 Hard Drive

(7200 RPM, 9.0 ms seek time)– 17” LCD Monitor– 64MB NVIDIA GeForce4

MX Graphics Card®– 16x Max DVD-ROM Drive– 48x/24x/48x CD-RW Drive– 56K PCI Telephony Modem– Windows XP Home Edition SP2 ®– 10/100 Fast Ethernet Network Card

Can send or receivedata at two rates –

10 or 100 million bytesper second

Page 15: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Problem Solving• Remember

– The goal is not a clever solution but a correct solution

Page 16: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Problem Solving• Accept

– The process is iterative• In solving the problem increased understanding might

require restarting

Page 17: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Problem Solving• Solutions

– Often require both concrete and abstract thinking• Teamwork

Page 18: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Problem Solving Process• What is it?

– Analysis– Design– Implementation– Testing

Page 19: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Problem Solving Process• What is it?

– Analysis– Design– Implementation– Testing

Determine the inputs, outputs, and other components of the problem

Description should be sufficiently specific to allow you to solve the problem

Page 20: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Problem Solving Process• What is it?

– Analysis– Design– Implementation– Testing

Describe the components and associated processes for solving the problem

Straightforward and flexible

Method – process

Object – component and associated methods

Page 21: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Problem Solving Process• What is it?

– Analysis– Design– Implementation– Testing

Develop solutions for the components and use those components to produce an overall solution

Straightforward and flexible

Page 22: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Problem Solving Process• What is it?

– Analysis– Design– Implementation– Testing

Test the components individually and collectively

Page 23: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Problem Solving Process

Testing

Design

Analysis

Implementation

Determineproblem features

Describe objectsand methods

Produce theclasses and code

Examine forcorrectness

Rethink asappropriate

Page 24: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Tips• Find out as much as you can

• Reuse what has been done before

• Expect future reuse

• Break complex problems into subproblems

Page 25: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Engineering software• Complexity of software grows as attempts are made to make it

easier to use– Rise of wizards

Page 26: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Software engineering• Goal

– Production of software that is effective and reliable, understandable, cost effective, adaptable, and reusable

Page 27: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Software engineering• Goal

– Production of software that is effective and reliable, understandable, cost effective, adaptable, and reusable

• Work correctly and not fail

Page 28: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Software engineering• Goal

– Production of software that is effective and reliable, understandable, cost effective, adaptable, and reusable

• Because of the long lifetime many people will be involved– Creation– Debugging– Maintenance – Enhancement

• Two-thirds of the cost is typically beyond creation

Page 29: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Software engineering• Goal

– Production of software that is effective and reliable, understandable, cost effective, adaptable, and reusable

• Cost to develop and maintain should not exceed expected benefit

Page 30: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Software engineering• Goal

– Production of software that is effective and reliable, understandable, cost effective, adaptable, and reusable

• Design software so that new features and capabilities can be added

Page 31: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Software engineering• Goal

– Production of software that is effective and reliable, understandable, cost effective, adaptable, and reusable

• Makes sense due to the great costs involved to have flexible components that can be used in other software

Page 32: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Object-oriented design• Purpose

– Promote thinking about software in a way that models the way we think and interact with the physical word

• Object– Properties or attributes– Behaviors

Page 33: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Object-oriented design• Class

– Term for a type of software object

• Object– An instance of a class with– specific properties and

attributes

Page 34: Introduction. Let’s begin Goal –Teach you how to program effectively Skills and information to be acquired –Mental model of computer and network behavior

Java and the Internet

I think ...

JVMJava

Compiler

DisplayForecast.java

DisplayForecast.class DisplayForecast.class

Modem Modem

Your machine Your friend's machine

Internet