CSCI 161 Lecture 3 Martin van Bommel. Operating System Program that acts as interface to other software and the underlying hardware Operating System Utilities.

Slides:



Advertisements
Similar presentations
Designing a Program & the Java Programming Language
Advertisements

Introduction to Programming in C++ John Galletly.
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Lecture 1: Overview of Computers & Programming
Copyright © 2002 W. A. Tucker1 Chapter 1 Lecture Notes Bill Tucker Austin Community College COSC 1315.
Chapter 1: An Overview of Computers and Programming Languages
Chapter 1 - An Introduction to Computers and Problem Solving
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming The software development method algorithms.
COSC 120 Computer Programming
Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
17 March, 2000 CS1001 Lecture 2 Programming and problem solving Software engineering practices.
1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
Computer Programming 1 Problem Solving and Software Engineering.
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
Chapter 1 Program Design
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 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
PRE-PROGRAMMING PHASE
Chapter 1 Introduction to Programming. Computer Hardware CPU Memory –Main or primary –Secondary or auxiliary Input device(s) Output device(s)
Introduction To C++ Programming 1.0 Basic C++ Program Structure 2.0 Program Control 3.0 Array And Structures 4.0 Function 5.0 Pointer 6.0 Secure Programming.
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 1: An Overview of Computers and Programming Languages Updated by: Dr\Ali-Alnajjar.
Copyright 2003 Scott/Jones Publishing Brief Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Introduction to High-Level Language Programming
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
Introduction to Programming Prof. Rommel Anthony Palomino Department of Computer Science and Information Technology Spring 2011.
Introduction 01_intro.ppt
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
CSC141 Introduction to Computer Programming
Programming With C.
Overview of Programming and Problem Solving Textbook Chapter 1 1.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
Chapter 1 Introduction Chapter 1 Introduction 1 st Semester 2015 CSC 1101 Computer Programming-1.
Program Development Cycle Modern software developers base many of their techniques on traditional approaches to mathematical problem solving. One such.
The basics of the programming process The development of programming languages to improve software development Programming languages that the average user.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
Program Development C# Programming January 30, 2007 Professor J. Sciame.
Chapter 1 : Overview of Computer and Programming By Suraya Alias
Intermediate 2 Computing Unit 2 - Software Development.
The Hashemite University Computer Engineering Department
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
The Development Process Compilation. Compilation - Dr. Craig A. Struble 2 Programming Process Problem Solving Phase We will spend significant time on.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Tevfik Bultan Lecture 4: Introduction to C: Control Flow.
CMSC 2021 Software Development. CMSC 2022 Software Development Life Cycle Five phases: –Analysis –Design –Implementation –Testing –Maintenance.
Principles of Programming CSEB134 : BS/ CHAPTER Fundamentals of the C Programming Language.
Copyright © 2014 Pearson Addison-Wesley. All rights reserved. Chapter 2 C++ Basics.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
Evolution of C and C++ n C was developed by Dennis Ritchie at Bell Labs (early 1970s) as a systems programming language n C later evolved into a general-purpose.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
Copyright © 2014, 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Eighth Edition by Tony Gaddis,
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
Chapter 1: Introduction to Computers and Programming.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Software Engineering Algorithms, Compilers, & Lifecycle.
Introduction to Programming By: Prof. Muhammad Abu Baker Siddique 2 nd Lecture 1.
CSCI 161: Introduction to Programming
Introduction to Computers and C++ Programming
Engineering Problem Solving With C An Object Based Approach
Programming Problem steps must be able to be fully & unambiguously described Problem types; Can be clearly described Cannot be clearly described (e.g.
Chapter 1: Introduction to Computers and Programming
Problem Solving Techniques
Programming Fundamentals (750113) Ch1. Problem Solving
Chapter 1 Introduction(1.1)
Programming Fundamentals (750113) Ch1. Problem Solving
Programming Fundamentals (750113) Ch1. Problem Solving
Programming Logic and Design Eighth Edition
Presentation transcript:

CSCI 161 Lecture 3 Martin van Bommel

Operating System Program that acts as interface to other software and the underlying hardware Operating System Utilities Compilers Utility Programs Assemblers Editors Hardware

HLL to Machine Language Enter HLL program into file using editor –program.cpp- source file Translate source code to machine code - compiler –program.obj- object file Combine object code with libraries - linker –program.exe- executable file Move program to memory - loader

IDE Integrated Development Environment –combines editor, compiler, linker, loader –usually includes tools to assist in debugging Note –IDE’s do not always write to disk automatically –must remember to save work to disk often, especially before executing a program

Programming Errors Vocabulary and grammar - syntax Rules determine if statement legally constructed - syntax rules Compiler checks rules - gives syntax errors Programs also contain errors in logic - bugs Debugging - finding & fixing logic errors e.g Mariner I Venus probe crashed due to missing hyphen (-)

Initial Program #include using namespace std; int main() { cout << ”Hello world!”; return 0; } - library inclusion -symbol namespace -function “main” -call function “cout” to display string - expected value to OS

Program Development Software Engineering study and use of techniques for programming and problem solving Software Life Cycle software development goes through cycles, where begins again when software outdated

Software Life Cycle 1. Specify the problem requirements. 2. Analyze the problem. 3. Design the algorithm to solve the problem. 4. Implement the program. 5. Test and verify the completed program. 6. Maintain and update the program.

Problem Analysis and Spec. Determine its input –what information is given –what items are important to solving problem Determine its output –what information must be produced to solve the problem Determine scope of the problem –questions, questions, and more questions

Algorithm Design Procedure to convert inputs to outputs Uses step-by-step process Top-down step-wise refinement Produce pseudo-code or flowchart

Algorithm Three basic forms of control 1. Sequential - one step after another 2. Selection - choose one of many alternatives 3. Repetition - one or more steps repeatedly

START GET NUMBER ADD NUMBER 10 NUMBERS? DIVIDE BY 10 PRINT RESULT END YES NO

Program Coding Program should be correct, readable, and understandable Simple and clear - no tricks Modular - program and test subtasks of overall problem separately Conforms to syntax of language

Program Formatting Spaces between items in statements –between variables and operators Blank lines between major sections –each subpart separated from others Good indentation –indent statements in loops Meaningful variable names –Distance and Time instead of d and t

Execution and Testing Test each unit separately before combining Use expected data with known result Use unexpected data to check for problems Validation - tested with several sets of test data, but never can tell if absolutely valid.

Program Maintenance Programs survive for many years New features must be added Laws, rules, and procedures change Hardware changes e.g. Year 2000 problem