Chapter 1 What is Programming? Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition) by S.N. Kamin, D. Mickunas, E.

Slides:



Advertisements
Similar presentations
Chapter 1 An Overview of Computers and Programming Languages.
Advertisements

ICS103 Programming in C Lecture 1: Overview of Computers & Programming
CSCE 145: Algorithmic Design I Chapter 1 Intro to Computers and Java Muhammad Nazmus Sakib.
Programming Types of Testing.
Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
Lecture 2: Do you speak Java?. From Problem to Program Last Lecture we looked at modeling with objects! Steps to solving a business problem –Investigate.
Chapter 1: An Overview of Computers and Programming Languages J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program.
Slides prepared by Rose Williams, Binghamton University Chapter 1 Getting Started 1.1 Introduction to Java.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
1 Chapter 1 Introduction to Object-Oriented Programming.
Chapter 1 Introduction to Object- Oriented Programming and Problem Solving.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Lecture 2: Do you speak Java?. From Problem to Program Last Lecture we looked at modeling with objects! Steps to solving a business problem –Investigate.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
Chapter 1: Introduction To Computer | SCP1103 Programming Technique C | Jumail, FSKSM, UTM, 2005 | Last Updated: July 2005 Slide 1 Introduction To Computers.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
CS 161 INTRO TO PROGRAMMING I Dr. Blaise W. Liffick Fall
Chapter Introduction to Computers and Programming 1.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
Chapter 2 Classes and Methods I Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition) by S.N. Kamin, D. Mickunas, E.
Chapter 1 An Overview of Computers and Programming Languages.
1 Lecture 2 : Computer System and Programming. Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
Topics Introduction Hardware and Software How Computers Store Data
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming 1.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Computer Programming Basics Assistant Professor Jeon, Seokhee Assistant Professor Department of Computer Engineering, Kyung Hee University, Korea.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Seventh Edition by Tony Gaddis, Judy.
What is a Computer? An, electrical machine, that can be programmed to accept data (input), process it into useful information (output) and store it away.
Chapter 1 Introduction. Goal to learn about computers and programming to compile and run your first Java program to recognize compile-time and run-time.
Computer Programming A program is a set of instructions a computer follows in order to perform a task. solve a problem Collectively, these instructions.
Computer Programming TCP1224 Chapter 3 Completing the Problem-Solving Process and Getting Started with C++
Introduction to Computer Systems and the Java Programming Language.
Java Programming, Second Edition Chapter One Creating Your First Java Program.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 1- 1 October 20, October 20, 2015October 20, 2015October 20,
1 Problem Solving with C++ The Object of Programming Walter Savitch Chapter 1 Introduction to Computers and C++ Programming Slides by David B. Teague,
Chapter 1 Section 1.1 Introduction to Java Slides prepared by Rose Williams, Binghamton University Kenrick Mock, University of Alaska Anchorage.
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
1 Lecture 2 : Computer System and Programming. Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output.
Chapter 4 Software. Chapter 4: Software Generations of Languages Each computer is wired to perform certain operations in response to an instruction. An.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Compilers and Interpreters. HARDWARE Machine LanguageAssembly Language High Level Language C++ Visual Basic JAVA Humans.
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
Introduction to OOP CPS235: Introduction.
Chapter 1 Introduction. Components of a Computer CPU (central processing unit) Executing instructions –Carrying out arithmetic and logical operations.
Computer and Programming. Computer Basics: Outline Hardware and Memory Programs Programming Languages and Compilers.
Chapter 7 Classes and Methods III: Static Methods and Variables Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition)
Compilers and Interpreters
Chapter 1 An Overview of Computers and Programming Languages.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
Representation of Data - Instructions Start of the lesson: Open this PowerPoint from the A451 page – Representation of Data/ Instructions How confident.
Copyright © 2014, 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Eighth Edition by Tony Gaddis,
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 1: An Overview of Computers and Programming Languages.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
Chapter 1: Introduction to Computers and Programming
Topics Introduction Hardware and Software How Computers Store Data
Computer System and Programming
Java programming lecture one
Chapter 1: Introduction to Computers and Programming
Topics Introduction Hardware and Software How Computers Store Data
Chapter 1 Introduction(1.1)
Lecture 8 Programming Paradigm & Languages. Programming Languages The process of telling the computer what to do Also known as coding.
Programming Logic and Design Eighth Edition
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

Chapter 1 What is Programming? Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition) by S.N. Kamin, D. Mickunas, E. Reingold

Chapter Preview In this chapter we will: demonstrate some problem-solving techniques needed in programming design an algorithm to solve a problem write a program to implement an algorithm discuss the importance of object-oriented programming discuss some basics of computer hardware describe the process of entering and running Java programs

Definitions program –a set of directions telling a computer exactly what to do programming languages –languages for specifying sequences of directions to a computer algorithm –a sequence of language independent steps which may be followed to solve a problem

Final Maze Solving Program step forward; while (inside the maze?) { turn right; while (facing a wall?) { turn left; } step forward; }

Object-Oriented Programming A modern programming paradigm that allows the programmer to model a problem in a real- world fashion Objects interact with each other by sending messages An object is an instance of a class A class implements an interface and specifies the behavior of an object

Object-Oriented Programming and Java The use of OOP in Java is pervasive –easy to create multiple objects of the same type –easy to create similar objects without having to rewrite the overlapping code OOP makes programs easier to understand and more reliable Prevents objects from having to know any more about structure of other objects than is really necessary

Computer Organization central-processing unit –performs the actual work of executing the program main memory –holds the program and during execution hard disk –holds all programs not executing and all data files input/output devices –allow the computer to communicate with the outside world

Running a Program First the program and all its data is copied from the hard disk into main memory The CPU goes to the location of the program instruction and reads that word The CPU determines what action is requested by decoding its bit pattern representation The CPU performs the action The CPU then moves to the location of the next program instruction in memory, reads the word, and repeats the process

Data Representation Computers use binary numbers Numbers can be used to represent any type of data –pictures are represented by dividing them into picture elements known as pixels –video images or animations are represented by placing several picture one after another –sounds are represented by sampling the wave at regular intervals All data are stored in files on the hard disk

Running Your Own Java Program Enter the program source code in a data file using an editor Transform the source program into machine language or Java Bytecode using an compiler (e.g. javac) Use an interpreter to execute the compiled program (e.g. java) Return to the editor to correct any errors (or bugs) and start the cycle again

Errors Debugging is the process of detecting and fixing errors found in a program Syntactic errors are caused by giving the compiler a program it cannot recognize Logical errors come from programs that compile correctly but fail to execute as expected Programs must be designed carefully and tested thoroughly to ensure that neither error will occur

Java applications –stand-alone programs that run on you own computer –can read and write data on your disk disk applets –executed from within a browser window (e.g. Netscape or Internet Explorer) –can be loaded from the World Wide Web and executed on another computer –cannot read or write data on your hard disk