Programs/Algorithms.  Computer Architecture  What is a computer program?  Flow chart  Data states  Data  Variables  History – Why VB?  Procedural.

Slides:



Advertisements
Similar presentations
Flow Control Analysis & Design Tool: Flowcharts
Advertisements

Chapter 1 - An Introduction to Computers and Problem Solving
Use Flowchart Symbols for Structured Programming
Starting Out with C++, 3 rd Edition 1 Chapter 1. Introduction to Computers and Programming.
Chapter 2- Visual Basic Schneider
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Sixth Edition by Tony Gaddis, Judy Walters,
Computer Hardware.
Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 1- 1.
Chapter 1- Visual Basic Schneider 1 Chapter 1 An Introduction to Computers and Visual Basic.
Understanding the Mainline Logical Flow Through a Program (continued)
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 Programming and Visual Basic 2005 Lecture Notes Chapter 1 (CSIT 105)
Chapter Introduction to Programming and Visual Basic
Programming Logic and Design Fourth Edition, Introductory
CS 0008 Day 2 1. Today Hardware and Software How computers store data How a program works Operators, types, input Print function Running the debugger.
Introduction to Programming and Visual Basic
Addison Wesley is an imprint of © 2011 Pearson Addison-Wesley. All rights reserved. Chapter 1 Introduction to Programming and Visual Basic.
Sequencing Miss Regan. Blood Hound  Does anyone know what the Bloodhound project is?  Video 1 Video 1  Video 2 Video 2  Link to website Link to website.
CSC103: Introduction to Computer and Programming
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Programming Logic and Design Fifth Edition, Comprehensive
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
Why Program? Computer – programmable machine designed to follow instructions Program – instructions in computer memory to make it do something Programmer.
Chapter Introduction to Computers and Programming 1.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
CS130 Introduction to Programming with VB 6.0 Fall 2001.
CS 0004 –Lecture 1 Wednesday, Jan 5 th, 2011 Roxana Gheorghiu.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
1 Introduction to Flowcharting. 2 Writing a program Defining the problem –Write down what the program will do Planning –Write down the steps, draw a flowchart.
1 Introduction to Flowcharting. 2 Writing a program Defining the problem –Write down what the program will do Planning –Write down the steps, draw a flowchart.
Visual C++ Programming: Concepts and Projects
Copyright © 2014 Pearson Education, Inc. Chapter 1 Introduction to Programming and Visual Basic.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
Flowcharts.
Mrs. Ulshafer August, 2013 Java Programming Chapter 1.
Chapter Two Creating a First Project in Visual Basic.
CHAPTER 1 INTRODUCTION 1 st Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
Internal Lab Registeration labreg/lab/signup.aspxhttp:// labreg/lab/signup.aspx
CHAPTER 1 INTRODUCTION 1 st semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
Copyright © 2011 Pearson Addison-Wesley What is a Program Made Of? Keywords (Reserved Words) – Words with special meaning that make up a high-level programming.
Addison Wesley is an imprint of © 2011 Pearson Addison-Wesley. All rights reserved. Chapter 1 Introduction to Programming and Visual Basic.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Brief Version of Starting Out with C++ Chapter 1 Introduction to Computers and Programming.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
Algorithms and Flowcharts
Chapter 1 Introduction to Programming and Visual Basic.
Copyright © 2015, 2012, 2009 Pearson Education, Inc., Publishing as Addison-Wesley All rights reserved. Chapter 1: Introduction to Computers and Programming.
Chapter 1 Introduction 2nd Semester H
Computer Architecture and Number Systems
BASIC PROGRAMMING C SCP1103 (02)
Unit 2 Technology Systems
Introduction to Flowcharting
Introduction to Programming and Visual Basic
BASIC PROGRAMMING C SCP1103 (02)
An Introduction to Computers and Visual Basic
Chapter 1. Introduction to Computers and Programming
An Introduction to Computers and Visual Basic
Introduction to Programming and Visual Basic
Interaction of Hardware
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
Chapter 2- Visual Basic Schneider
An Introduction to Computers and Visual Basic
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
Programming Logic and Design Eighth Edition
Presentation transcript:

Programs/Algorithms

 Computer Architecture  What is a computer program?  Flow chart  Data states  Data  Variables  History – Why VB?  Procedural programming  Object oriented programming  Visual programming  Example: Hello world

 Drawn in figure 1-1  Main components:  CPU  Main memory  Secondary storage  Input devices  Keyboard  Mouse  Scanner  Camera (still/video/webcam)

 Main components (contd):  Output devices  Monitor  Printer  Software  Operating System  Application Programs

 Set of tasks/instructions  Related?  How?  Set of data (states)  Can be in main memory (temporary)  Can be persistent  Long-term  Often stored in a database or data file

 Help visualize the flow of the program. Shows mainly the instructions and decisions  Is a blueprint for the logic in how to write the program  Historically, different symbols used for different types of logic  Variable assignment  Decisions

 Symbols:  Start/End of program: Ovals  Flow of control: Arrows  Actions: Rectangle  Input/Output: Parallelogram  Conditional: Diamond

 Variables are ESSENTIAL in programming  Variables hold things  Data  State  Variables typically have names that are meaningful  Descriptive is better  Older languages only allowed one letter  i, j, etc…  Now they can be as long as needed

 Sometimes use underscore (_)  sum_total  number_of_tries  “CamelCasing”  Start each word with a capital letter  No underscores  Ex:  SumTotal  NumberOfTries

 Hello World  No data  No states  Just a control flow  Gross pay calculator  Data: Hours worked, hourly pay rate  Ask them to exit  Or exit button (control)

 Create flowchart on board  Demo of example programs

 Procedural programming  Original style  Set of steps (including Input/Output)  Goes from “Start” to “End”  Can be shown in a flow chart easily  More difficult to reuse code

 Object-Oriented programming  Current style  Create “objects” that mimic real-world things  Ex: Automobile  Objects have properties (data)  Objects have methods (actions)  Car example. What are properties, methods  Properties: Color, Location, Speed, Direction  Actions: Honk horn, Speed up, slow down, turn to right

 Graphical User Interface (GUI)  Many, many objects have been created for visual objects  Makes it easier to program  Looks great  Don’t have to “reinvent the wheel”  Graphical environment to write programs  Graphical environment to debug programs

 GUI programming is event-driven  Screen “sits there” in a loop, waiting for user action  You write “event handlers” that handle each action that might be taken  Button clicks  Typing text  Check a checkbox  Only have to write a little bit of code at a time  Much, much easier to debug!

 Demonstrate graphical version of the two example programs