24-June-2002cse142-AB-Introduction © 2002 University of Washington1 Introduction CSE 142, Summer 2002 Computer Programming 1

Slides:



Advertisements
Similar presentations
Computer Science and Computer Engineering. parts of the computer.
Advertisements

Lecture 1: Intro to Computers Yoni Fridman 6/28/01 6/28/01.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
Introduction to Computers Essential Understanding of Computers and Computer Operations.
Copyright Arshi Khan1 System Programming Instructor Arshi Khan.
Computers & Logic An Overview. Hardware Hardware is the equipment, or the devices, associated with a computer. For a computer to be useful, however, it.
Introduction to Computers and Programming
Introduction to computer: storing instructions and information.
Microsoft Visual Basic 2005 CHAPTER 1 Introduction to Visual Basic 2005 Programming.
Lesson 4 Computer Software
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
Chapter Introduction to Computers and Programming 1.
CS 0004 –Lecture 1 Wednesday, Jan 5 th, 2011 Roxana Gheorghiu.
Configuration.
What is a Computer ? Computers are Electronic Machines that process (performs calculation and manipulation) Data under the control of Set of Instructions.
An Introduction to Computers August 12, 2008 Mrs. C. Furman.
Intro to Computers Computer Applications. What is a Computer? Initially the term computer referred to an individual whose job it was to perform mathematical.
An Overview of the Computer System lesson 1. This lesson includes the following sections: The Parts of a Computer System Looking Inside the Machine Software:
CS 127 Introduction to Computer Science. What is a computer?  “A machine that stores and manipulates information under the control of a changeable program”
Beginning Snapshots Chapter 0. C++ An Introduction to Computing, 3rd ed. 2 Objectives Give an overview of computer science Show its breadth Provide context.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
1 THE COMPUTER. 2 Input Processing Output Storage 4 basic functions.
Business Technology Applications Computer Basics Vocab.
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
Computer Programming (1) Code & No.: CS 102 CREDIT HOURS: 5 UNIT Lecture 3.0 hours/week Lab: 2.0 hour/on every week a. This course introduces the students.
Ch 1 - Introduction to Computers and Programming Hardware Terminology Main Memory Auxiliary Memory Drives Writing Algorithms Using Pseudocode Programming.
5 th October 2004Hardware – KS41 Hardware Objectives: Computer systems  What do they do?  Identify the hardware that makes up a computer system (PC)
DIGITAL TECHNOLOGY. 20 Questions  Pair off with another student within your table.  Both of you are to think of your favorite in a specific category.
INTRODUCTION TO COMPUTERS. A computer system is an electronic device used to input data, process data, store data for later use and produce output in.
Introduction CSE 410, Spring 2005 Computer Systems
Computer Basics 1 Chapter One Computer Basics Part 1.
Computer Basics and Vocabulary Lecture: 1 Mrs. Najwa Almazroei1.
Computer Architecture and Number Systems
Java Programming: From the Ground Up
BASIC PROGRAMMING C SCP1103 (02)
Parts of a computer Vocabulary & Labeling.
Chapter Objectives In this chapter, you will learn:
An Overview of the Computer System
Computer Fundamentals 1
Key Ideas from day 1 slides
Introduction to Visual Basic 2008 Programming
Lecture 1: Introduction to JAVA
BASIC PROGRAMMING C SCP1103 (02)
INTRODUCTION TO COMPUTING
CSE 410, Spring 2006 Computer Systems
Principles of Information Technology
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Computer Architecture
Introduction to Computers and Java
Introduction CSE 1310 – Introduction to Computers and Programming
Computers Are Your Future
Looking Inside the machine (Types of hardware, CPU, Memory)
An Overview of the Computer System
Computer Science I CSC 135.
Engineering 1020 Introduction to Programming
CIS16 Application Development – Programming with Visual Basic
Computer Basics/Algorithms
INFO/CSE 100, Spring 2005 Fluency in Information Technology
Chapter 1: How are computers organized?
Introduction to computers
Logical Computer System
Introduction to Computing
15-110: Principles of Computing
Tonga Institute of Higher Education IT 141: Information Systems
Data Communications and Computer Networks
Tonga Institute of Higher Education IT 141: Information Systems
Chapter-1 Computer is an advanced electronic device that takes raw data as an input from the user and processes it under the control of a set of instructions.
Type Topic in here! Created by Educational Technology Network
Computer components is a programmable machine that receives input, stores and manipulates data, and provides output in a useful format. Computer The computer.
Programming Logic and Design Eighth Edition
Presentation transcript:

24-June-2002cse142-AB-Introduction © 2002 University of Washington1 Introduction CSE 142, Summer 2002 Computer Programming 1

24-June-2002cse142-AB-Introduction © 2002 University of Washington2 Why Are We Here? Computers are everywhere! Big ones serving databases and forecasting the weather Medium sized computers on your desk top, for playing games, writing papers, surfing the internet Tiny ones everywhere: cars, microwaves, toys, phones They’re part of our world What can they do? How do they do it? What can you do using a computer program that you’ve written yourself?

24-June-2002cse142-AB-Introduction © 2002 University of Washington3 Two Interesting Facts 1. Computers are multi-purpose Unlike cars, toasters, dishwashers The same physical computer can play games, solve equations, plan trips, send , etc. How is this possible?? Answer: the computer operates under direction of a “program”: a set of precise instructions 2. The largest and the smallest computers have much in common We can usefully think of about computers in general without worrying about hardware details This is our first example of “abstraction”, a key notion in computer science

24-June-2002cse142-AB-Introduction © 2002 University of Washington4 Computers & You & CSE142 You’ll learn to write programs We use a particular language called Java The principles apply to many other languages You’ll use particular computers Windows, Mac, Linux, Unix, whatever Principles apply to many computers and operating systems We’ll talk about the process of software development Useful class if you want to understand how computer systems are developed and how they operate programmer, technical user, business user, manager, purchaser, …

24-June-2002cse142-AB-Introduction © 2002 University of Washington5 What To Expect Course is for beginners Programming is quite different from using applications Logic/problem solving skills Can be challenging, but also very rewarding Important to keep up Ask for help when you need it; don’t fall behind If you have the background to skip this course, you can go directly to CSE 143 Automatic credit for CSE 142 after completing CSE 143 successfully

24-June-2002cse142-AB-Introduction © 2002 University of Washington6 Readings and References Reading Chapter 1, An Introduction to Programming and Object Oriented Design using Java, by Niño and Hosch Other References All course information is available from the web site:

24-June-2002cse142-AB-Introduction © 2002 University of Washington7 Hardware: the physical machine Central Processing Unit (CPU) Pentium, PowerPC, SPARC, ARM,... Memory / Random Access Memory (RAM) main memory Hard disk, floppy disk, CDROM disk storage Monitor, speakers, keyboard, mouse input / output (I/O) Network connection modem or Local Area Network

24-June-2002cse142-AB-Introduction © 2002 University of Washington8 Software: the personality Software the plans that instruct the hardware what to do software defines the personality of the system Hardware doesn’t do much on its own But one set of hardware can do many different things if given the right instructions It is often easier to update software than hardware

24-June-2002cse142-AB-Introduction © 2002 University of Washington9 A typical computer organization main memory I/O bus network interface hard disk floppy disk CDROM drive serial ports central processing unit (CPU) processor/memory bus

24-June-2002cse142-AB-Introduction © 2002 University of Washington10 Running a program - program load main memory I/O bus network interface hard disk floppy disk CDROM drive serial ports CPU processor/memory bus load program into main memory

24-June-2002cse142-AB-Introduction © 2002 University of Washington11 Running a program - program execution main memory I/O bus network interface hard disk floppy disk CDROM drive serial ports CPU processor/memory bus write data read instructions and data execute the instructions

24-June-2002cse142-AB-Introduction © 2002 University of Washington12 Learning Programming Programming is both easier and harder than most people make it out to be. Easier: Many of the things good programmers do well are actually things all of us already do all the time, we just don't know it. Harder: Programming is in large part a skill, even an art Programming is like any craft: it requires practice. Learning by doing vs. learning by reading about it Not sure how something works? Try it and see! Build things and throw them away. Experiment! Don’t be afraid that you will break the computer. get a cheap used one ($20) and tear it apart … it’s fun!

24-June-2002cse142-AB-Introduction © 2002 University of Washington13 Programming as Communication When we write a program, we are communicating with the computer other people The computer reads our program as the set of instructions that it should perform It just needs to know how, not why Other people read our programs to understand how and why Programs that don't work (bugs) Program evolution - new features Performance improvement Project completion (you never did finish all those features last year …)

24-June-2002cse142-AB-Introduction © 2002 University of Washington14 Communicating with Computers and People Computers need precision and logical thinking on your part Being precise, complete, and logical is one thing that makes programming hard Computers offer speedy, by-the-book results What can go wrong with by-the-book results? No “common sense”! People can fill in missing steps, but can get swamped by lots of unorganized details and clutter Need to write programs so that can be understood by people, e.g., your coworkers, your clients, yourself 3 months from now Invent abstractions : new vocabulary, short-hands Be organized, use good style

24-June-2002cse142-AB-Introduction © 2002 University of Washington15 Example: Giving Directions Imagine giving campus directions: To another student To a tourist To a robot The student operates at a higher level of abstraction with a richer vocabulary of short-hands An algorithm is a plan for how to accomplish a task A program is a software implementation of an algorithm Good algorithms (at any level of abstraction) require precision

24-June-2002cse142-AB-Introduction © 2002 University of Washington16 Metaphor: Programs as Directions One way to think about programming: a program is a sequence of commands that brings about some action telling a robot how to navigate around campus telling a human visitor how to get from here to there telling a student (a higher form of human) how to get from here to there

24-June-2002cse142-AB-Introduction © 2002 University of Washington17 Metaphor: Programs as Math We also can think of programs as executable math : a program calculates some result for us. Consider: We can employ such expressions in programs. Most of our intuitions and knowledge about mathematics apply to computers.

x = 1:10; y1 = x.*x; y2 = 2*(x.*x)+x+1; y3 = 3*(x.*x); plot(x,y1,'r') hold on plot(x,y2,'g') plot(x,y3,'b') Using the program Matlab to calculate and plot function values

24-June-2002cse142-AB-Introduction © 2002 University of Washington19 Metaphor: Programs as Simulations We also can think of programming as creating or simulating both real and virtual worlds. We can define things in our programs that model the things in our world. We call these things objects. Programs are plastic : they are easy to mold to our wishes Can be free of the constraints of real life! The limit of plasticity: big programs become as hard to work with as real-world entities bird.exe