INTRODUCTION TO COMPUTER PROGRAMMING(IT-303) Basics.

Slides:



Advertisements
Similar presentations
1 ICS102: Introduction To Computing King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science.
Advertisements

Chapter 1 An Overview of Computers and Programming Languages.
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Lecture 1: Overview of Computers & Programming
Overview of Programming and Problem Solving ROBERT REAVES.
COSC 120 Computer Programming
Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
Chapter 1: An Overview of Computers and Programming Languages J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program.
1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
This set of slides is provided by the author of the textbook1 Introductory Topics l Computer Programming l Programming Life-Cycle Phases l Creating an.
Chapter 1 Introduction to Object- Oriented Programming and Problem Solving.
Computers: Tools for an Information Age
Chapter 1: An Overview of Computers and Programming Languages
Chapter 1 Introduction to C Programming. 1.1 INTRODUCTION This book is about problem solving with the use of computers and the C programming language.
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.
Lecture Notes 8/30/05 Program Design & Intro to Algorithms.
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 3 Planning Your Solution
CS102 Introduction to Computer Programming
Computer Programming-1 CSC 111 Chapter 1 : Introduction.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
Chapter 1 An Overview of Computers and Programming Languages.
Simple Program Design Third Edition A Step-by-Step Approach
Chapter 3: Completing the Problem- Solving Process and Getting Started with C++ Introduction to Programming with C++ Fourth Edition.
An Introduction to Programming with C++ Sixth Edition
Chapters 7, 8, & 9 Quiz 3 Review 1. 2 Algorithms Algorithm A set of unambiguous instructions for solving a problem or subproblem in a finite amount of.
TMF1013 : Introduction To Computing Lecture 1 : Fundamental of Computer ComputerFoudamentals.
Lecture 1 Introduction Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
Fundamental Programming: Fundamental Programming K.Chinnasarn, Ph.D.
Problem Solving using the Science of Computing MSE 2400 EaLiCaRA Spring 2015 Dr. Tom Way.
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
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.
Introduction to Computer Application (IC) MH Room 517 Time : 7:00-9:30pm.
Lecture 11: 10/1/2002CS149D Fall CS149D Elements of Computer Science Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture.
CHAPTER 1 INTRODUCTION 1 st Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
CHAPTER 1 INTRODUCTION 1 st semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
Chapter 7 Low-Level Programming Languages. 2 Chapter Goals List the operations that a computer can perform Discuss the relationship between levels of.
CHAPTER 1 INTRODUCTION 2 nd Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
1. Introduction Intro Programming in C++ Computer Science Dept Va Tech August, 2002 © Barnette ND & McQuain WD 1 Algorithm:a finite set of instructions.
Programming in C++ Dale/Weems/Headington Chapter 1 Overview of Programming and Problem Solving.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
Structured Programming (4 Credits)
1 Chapter 1 Programming Languages Evolution of Programming Languages To run a Java program: Java instructions need to be translated into an intermediate.
1 Overview of Programming Principles of Computers.
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.
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.
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 1: An Overview of Computers and Programming Languages.
CHAPTER 3 COMPLETING THE PROBLEM- SOLVING PROCESS AND GETTING STARTED WITH C++ An Introduction to Programming with C++ Fifth Edition.
Introduction to Problem Solving Programming is a problem solving activity. When you write a program, you are actually writing an instruction for the computer.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 1 An Introduction to Visual Basic.NET and Program Design.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
Software Engineering Algorithms, Compilers, & Lifecycle.
Low-Level Programming Languages, Pseudocode and Testing Chapter 6.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
Chapter 1 Introduction 2nd Semester H
CSCI-235 Micro-Computer Applications
Chapter 1: An Overview of Computers and Programming Languages
An Introduction to Visual Basic .NET and Program Design
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
Chapter 1 Introduction(1.1)
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
WRITING AN ALGORITHM, PSEUDOCODE, AND FLOWCHART LESSON 2.
Presentation transcript:

INTRODUCTION TO COMPUTER PROGRAMMING(IT-303) Basics

Course Outline ■Describe the major components in problem solving for a computer program. ■Analyze and write pseudocode to illustrate compact and informal high-level descriptions of computer programming algorithms. ■ Explain the concept of data storage and named memory locations. ■ Apply decision and repetition structures in program design. ■ Write and incorporate methods and functions to demonstrate program competence. ■ Define variables and arrays used in program methodology. ■ Implement input and output to access and process files.

Recommended Text Books ■Schaum's Outline of Programming with C++ 2nd Edition by John Hubbard (Author) ■Problem Solving with C++-7th Edition-2009 [48360] by Walter J. Savitch

Marking Scheme ■Terminal : 75 ■Sessional 1: 20 ■Sessional 2: 20 ■Quiz + Assignments: 35 ■Total: 150 ■Note: Copied assignments will earn zero marks

What is Programming? ■Much of human behavior and thought is characterized by logical sequences of actions applied to objects. ■Our whole civilization is based on the order of things and actions. ■Programming: Planning or scheduling the performance of a task or an event ■Electronic computer: A programmable device that can store, retrieve, and process data ■Data: Information in a form a computer can use ■Information: Any knowledge that can be communicated ■Data type :The specification of how information is represented in the computer as data and the set of operations that can be applied to it ■Computer programming: The process of specifying the data types and the operations for a computer to apply to data in order to solve a problem ■Computer program: Data type specifications and instructions for carrying out operations that are used by a computer to solve a problem

How Do We Write a Program? ■A human (the programmer) must analyze the problem ■develop the instructions for solving the problem ■and then have the computer carry out the instructions ■a two-phase process to write a program: problem solving and implementation

Problem-Solving Phase ■1. Analysis and Specification. Understand (define) the problem and what the solution must do. ■2. General Solution (Algorithm). Specify the required data types and the logical sequences of steps that solve the problem. ■3. Verify. Follow the steps exactly to see if the solution really does solve the problem

Implementation Phase ■1. Concrete Solution (Program). Translate the algorithm (the general solution) into a programming language. ■2. Test. Have the computer follow the instructions. Then manually check the results. If you find errors, analyze the program and the algorithm to determine the source of the errors, and then make corrections Algorithm Instructions for solving a problem or sub-problem in a finite amount of time using a finite amount of data

Algorithm: an example Start a car ■1. Insert the key. ■2. Make sure the transmission is in Park (or Neutral). ■3. Turn the key to the start position. ■4. If the engine starts within six seconds, release the key to the ignition position. ■5. If the engine doesn’t start in six seconds, release the key and gas pedal, wait ten seconds, and repeat Steps 3 through 5, but not more than five times. ■ 6. If the car doesn’t start, call the garage.

Problem solving ■Given the 3 dimensions of a box (length, width, and height), multiply them together to determine the volume. ■Decomposition:

■2. Eliminate redundant or irrelevant information.

Materialize the correct algorithm into code ■Programming language: A set of rules, symbols, and special words used to construct a computer program ■ Code: Data type specifications and instructions for a computer that are written in a programming language ■Documentation: The written text and comments that make a program easier for others to understand, use, and modify

How Is a Program Converted into a Form That a Computer Can Use? ■Machine language The language, made up of binary coded instructions, that is used directly by the computer ■Assembly language A low-level programming language in which a mnemonic is used to represent each of the machine language instructions for a particular computer Assembler A program that translates an assembly language program into machine code ■Compiler A program that translates a program written in a high-level language into machine code ■ Source code Data type specifications and instructions written in a high-level programming language ■Object code A machine language version of source code

■High level language allows program portability ■Visual Basic programs are translated into a standard machine language called Bytecode. ■the CLR reads the Bytecode machine language instructions and translates them into machine language operations that the particular computer executes. ■Interpretation is done as the program is running, one instruction at a time ■Linking –The object code for your C++ program must be combined with the object code for routines (such as input and output routines) that your program uses. This process of combining object code is called linking and is done by a program called a linker. For simple programs, linking may be done for you automatically.

Layout of C++ Program Include directive: It tells the compiler where to find information about certain items that are used in your program Main part of the program Return statement: End of program