ENT 189: COMPUTER PROGRAMMING. H/P: Home page:

Similar documents
Week 1 Introduction to Computer and Algorithm (Part1) UniMAP Sem II 11/12 DKT121: Basic Computer Programming 1

BIL101E: Introduction to Computers and Information systems Lecture 8

EKT 120/4 Computer Programming KOLEJ UNIVERSITI KEJURUTERAAN UTARA MALAYSIA

Problem Solving and Program Design - Chapter 1. Cory L. Strope

Chapter 1: An Overview of Computers and Programming Languages. Objectives. Objectives (cont d.) Introduction

BITG 1113: Introduction To Computers And Programming Language LECTURE 1 LECTURE 1 1

FLOW CHART AND PSEUDO CODE

Engineering Computing M1H Together Towards A Green Environment

IS 0020 Program Design and Software Tools

Unit 1: Introduction to Programming. Saurabh Khatri Lecturer Department of Computer Technology VIT, Pune

Introduction to Basis and Practice in Programming

Programming Fundamentals (CS 302 ) Dr. Ihsan Ullah. Lecturer Department of Computer Science & IT University of Balochistan

Fundamentals of Programming. Lecture 1: Introduction to C Programming

C Language, Token, Keywords, Constant, variable

PROBLEM SOLVING AND OFFICE AUTOMATION. A Program consists of a series of instruction that a computer processes to perform the required operation.

Unit II. (i) Computer Programming Languages

C++ Programming Language Lecture 1 Introduction

Chapter 3 Structured Program Development

CSCE150A. Administrivia. Overview. Hardware. Software. Example. Program. Pseudocode. Flowchart. Control Structures. Hello World Program CSCE150A

Computer Science & Engineering 150A Problem Solving Using Computers

Structured Program Development in C

Fundamentals of Programming (C)

Topic 1: Programming concepts

Fundamentals of Structured Programming

Programming 1. Lecture 1 COP 3014 Fall August 28, 2017

DR. A.P.J. ABDUL KALAM TECHNICAL UNIVERSITY LUCKNOW. Evaluation Scheme & Syllabus. For. B.Tech. First Year (Programming for Problem Solving)

Computer Fundamentals

Kadi Sarva Vishwavidyalaya, Gandhinagar

SOEE1160: Computers and Programming in Geosciences Semester /08. Dr. Sebastian Rost

CHAPTER 1: INTRODUCTION TO COMPUTERS AND PROGRAMMING. 1 Muhalim Mohamed Amin Faculty of

Computers and FORTRAN Language Fortran 95/2003. Dr. Isaac Gang Tuesday March 1, 2011 Lecture 3 notes. Topics:


Programming for Problem Solving 105A L T P Credit Major Minor Total Time

1 The Catholic University of Eastern Africa P.o Box , Nairobi Kenya Edward Kioko 2013

C++ Programming Language Lecture 2 Problem Analysis and Solution Representation

UNIVERSITY OF JAMMU, JAMMU. (Semester System)

Problem Solving and 'C' Programming

Outline. Program development cycle. Algorithms development and representation. Examples.

Lecture 1: Preliminaries

SCSP Programming Technique C

Course Outline Introduction to C-Programming

ENGINEERING PROGRAMMING

Object Oriented Concepts and Programming (CSC244) By Dr. Tabbasum Naz

1) What is the first step of the system development life cycle (SDLC)? A) Design B) Analysis C) Problem and Opportunity Identification D) Development

What is programming? What are computer languages and how have they evolved? What is the basic process of programming, including the tools involved?

CS110D: PROGRAMMING LANGUAGE I

0 Introduction: Computer systems and program development

CS 241 Computer Programming. Introduction. Teacher Assistant. Hadeel Al-Ateeq

Course Title: C Programming Full Marks: Course no: CSC110 Pass Marks: Nature of course: Theory + Lab Credit hours: 3

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD I Year B.Tech-SYLLABUS COMPUTER PROGRAMMING

Programming 1 - Honors

ITC213: STRUCTURED PROGRAMMING. Bhaskar Shrestha National College of Computer Studies Tribhuvan University

Administration Computers Software Algorithms Programming Languages

Computers in Engineering COMP 208. Computer Structure. Computer Architecture. Computer Structure Michael A. Hawker

Unit-II Programming and Problem Solving (BE1/4 CSE-2)

Chapter 1 Introduction to Computers and C++ Programming

Introduction to C Language

Introduction to Computer Programming/Handout 01 Page 1 of 13

EP241 Computer Programming

AE Computer Programming for Aerospace Engineers

Low-Level Languages. Computer Programs and Programming Languages

Final Examination Semester 2 / Year 2005

Programming - 1. Computer Science Department 011COMP-3 لغة البرمجة 1 لطالب كلية الحاسب اآللي ونظم المعلومات 011 عال- 3

BIL 104E Introduction to Scientific and Engineering Computing. Lecture 1

Chapter 1 Introduction to Computers and C++ Programming

Programming Languages and Program Development Life Cycle Fall Introduction to Information and Communication Technologies CSD 102

Introduction to Computer Programming Using FORTRAN 77

Fortran 90 Two Commonly Used Statements

Your Instructor. CSE Content. Notes. Notes. Notes. Summer May 4, 2010

Computer is an electronic machine that can receive, store, transform and output data of all kinds (image, text, numeric, graphics and sound).

Instructor. Mehmet Zeki COSKUN Assistant Professor at the Geodesy & Photogrammetry, Civil Eng. (212)

Python - Week 1. Mohammad Shokoohi-Yekta

CS240: Programming in C

COP 1220 Introduction to Programming in C++ Course Justification

CS120 Computer Science I. Instructor: Jia Song

CSC 453 Operating Systems

Chapter Two: Program Design Process and Logic

Simply Java Programming: An Application Driven, Tutorial

Introduction Objectives: 1) differentiate between high-level, low-level, and machine language; 2) explain why it is necessary to translate a program

Method & Tools for Program Analysis & Design

William Paterson University of New Jersey Department of Computer Science College of Science and Health Course Outline

Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

AT76.09 Digital Image Processing in Remote Sensing using C Language

Week 1 Introduction to Programming

CS 113: Introduction to

LECTURE/ STUDY NOTES ON C

Introduction to Java Programming

CHAPTER 2 PROBLEM SOLVING TECHNIQUES. Mr Mohd Hatta Bin Hj Mohamed Ali Computer Programming BFC2042

Hrs Hrs Hrs Hrs Hrs Marks Marks Marks Marks Marks

K Hinds Section No.2 Problem-Solving and Program Design12

Computing. Building Retention: What prior learning must be built upon/revisited and how will it be assessed? Term Cycle 1

CSE111 Introduction to Computer Applications

BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE, PILANI PILANI CAMPUS Instruction Division

There are algorithms, however, that need to execute statements in some other kind of ordering depending on certain conditions.

1 EEE1008 C Programming

Basic Computer Programming for ISNE. Santi Phithakkitnukoon ผศ.ดร.ส นต พ ท กษ ก จน ก ร

Introduction to Modern Fortran

DEPARTMENT OF INFORMATION TECHNOLOGY KUMAUN UNIVERSITY, NAINITAL SEMESTER-I ( )

Problem Solving FLOWCHART. by Noor Azida Binti Sahabudin Faculty of Computer Systems & Software Engineering

CHARUTAR VIDYA MANDAL S SEMCOM Vallabh Vidyanagar

Transcription:

ENT 189: COMPUTER PROGRAMMING Dr. PAULRAJ M P, Associate Professor, School of Mechatronic Engineering, #42- Level 2, Ulu Pauh New Campus 02600-Arau. PERLIS Email: paul@unimap.edu.my H/P: 017 5103757 Home page: http://publicweb.unimap.edu.my/~paul/

Course Outcomes CO1 : Ability to define the basic programming techniques. CO2: Ability to apply suitable programming techniques to solve a given problem. CO3: Ability to develop and analyze computer programs in C and C++ for Mechatronic Applications.

General Information Contributes 3 units: 3 hours - lectures 2 hours lab Main Objective: Students can independently write a computer program to solve problems related to engineering.

Evaluation Contribution Examination: Mid Examination : 10% Final Examination : 60% Course Work: 30% Lab Lab Test Mini Project Quiz Project : Team (Three)

Lecture Content Lecture content can be accessed through http://publicweb.unimap.edu.my/~paul/

References C How to program, Deitel, Suhizaz, R Badlishah, Yasmin, Pearson Prentice Hall Beginning Visual C++, Ivor Hortons, Wiley Publishing, Inc Indiana 2003. C Programming for Engineering & Computer Science, H.H.Tan and T.B.Orazio, Mc Graw Hill, 1999. Any other C programming books

INTRODUCTION TO COMPUTER SYSTEMS Hardware It is a Physical Equipment. Software It is a collection of Instructions.

HARDWARE COMPONENT 1. Input Devices 2. Central Processing Unit (CPU) 3. Primary Storage 4. Output Devices 5. Auxiliary Storage Devices

INPUT DEVICE

Hardware: Physical Component Input Device Through which programs and data are entered. Key Board, Mouse, a pen or stylus, a touch screen.

Central Processing Unit (CPU) Responsible for executing instructions such as arithmetic calculations,comparisons among data and movement of data inside the system.

Primary Storage It is a place where data and programs are stored temporarily during processing. The data in the main memory are erased when the system is turned off.

OUTPUT DEVICE To show the processed result output devices are used. If the output is shown in a monitor it is called soft copy. If it is printed on the printer, it is called as hard copy.

AUXILIARY STORAGE It is the place where all the programs and data are stored permanently.

SOFTWARE System Software It manages the computer resources. It provides an interface between the hardware and the users but does nothing to directly serve the users.

COMPUTER PROGRAM It is a sequence of instructions used to perform a job. Programming is the process of writing the instructions in a language that the computer can understand.

PROGRAMMING LANGUAGE The set of instructions that can be used to construct a program is called a programming language

MACHINE LANGUAGE Made up of 0 s and 1 s Example: 00110011 is an instruction COMPUTER LANGUAGES HIGH LEVEL LANGUAGES Working with symbolic language is very difficult. To improve programmer s efficiency High level languages are developed. HLL are portable. HLL relieve the programmer from the assembly language SYMBOLIC LANGUAGE Mnemonics are used to denote the strings of 1 s and 0 s. Example: ADD A

HIGH LEVEL LANGUAGES i) FORTRAN FORmula TRANSlation Created by John Backus in 1957 Used for Scientific and Engineering applications. ii) COBOL Common Business Oriented Language Developed by Admiral hopper iii) C Middle level language Developed by Dennis Ritchie at AT&T Bell Laboratories of USA in 1972.

HOW TO FEED YOUR PROGRAM TO A COMPUTER? A text editor is used to Enter, Modify and Save the programs and data. Some of the text editors are available with search commands to locate and replace statements, copy and paste commands to copy or move statements from one part to another. The programs written and saved will be input to the compiler. The program is known as source program. COMPILER Compiler is a program that converts source program into machine language. A C compiler contains two separate programs as : preprocessor and translator.

PREPROCESSOR A preprocessor search for the preprocessor directives (special commands) and make substitutions of code. After the preprocessor has prepared the code for compilation, the translator converts the program into machine language and this code is called object code. LINKER Even though the output of the compiler is machine language, it can not be executed. The object code is linked to the library functions using the linker and a executable code is produced. The final executable program is executed in the system.

PROGRAM EXECUTION To execute your program, use an operating system, load your program in the primary memory and execute it. The program is loaded into the primary memory using a system program called Loader.

PROBLEM SOLVING DEFINE THE PROBLEM LOOK AT POTENTIAL CAUSES FOR THE PROBLEM SELECT AN APPROACH TO RESOLVE THE PROBLEM IDENTIFY ALTERNATIVES FOR APPROACHES TO RESOLVE THE PROBLEM PLAN THE IMPLEMENTATION OF THE BEST ALTERNATIVE MONITOR IMPLEMENTATION OF THE PLAN VERIFY IF THE PROBLEM HAS BEEN RESOLVED OR NOT

TOOLS TO DEVELOP THE SOLUTION STRUCTURE CHARTS Used to design the whole program, It is also known as hierarchy chart. This chart shows the functional flow of the interrelated components. The structure chart shows how you are going to break your program into logical steps; each step will be a separate module. It also shows the interaction between various modules.

PSEUDO CODE English like statements that follow a loosely defined syntax are used to convey the design of the algorithm. Example: Pseudo code to add three number and to display the average: Step 1: Input three numbers into the computer. Step 2: Add all the three numbers and divide it by 3. Step 3: Display the result as average. Example: input A input B C = A + B print C

FLOW CHART It is a program design tool in which standard graphical symbols are used to represent the logical flow of data through a function. A flowchart is a diagrammatic representation that illustrates the sequence of operations to be performed to get the solution of a problem. Flowcharts are generally drawn in the early stages of formulating computer solutions. Flowcharts facilitate communication between programmers and business people. These flowcharts are quite helpful in understanding the logic of complicated and lengthy problems. Once the flowchart is drawn, it becomes easy to write the program in any high level language.

Terminal Input/ Output Predefined Process Connector Process Flow Lines Decision Loop

TESTING THE PROGRAMS Program testing is very tedious and time consuming part of program development. There are two type of program testing BLACK BOX TESTING WHITE BOX TESTING In this method of testing, the program is tested without knowing what is inside the program. ie., The program is like a black box that we can not see. In this method, the tester knows everything about the program. In this case program is like a glass house in which every thing is visible.

Control Structure All programs could be written in terms of three control structures: Sequence structure Selection structure Repetition structure

Sequence structure Is a series of steps executed sequentially by default Pseudocode Read num1,num2 Calculate total=num1+num2 Print total Flowchart Read num1,num2 total = num1+num2 print total

Selection structure Used to choose among alternative courses of action C has three types: if, if..else, and switch

The if selection structure if structure is a single-entry/single-exit structure If student s grade is greater than or equal to 60 Print Passed grade >= 60 true print Passed false

The if..else selection structure Specifies an action to be performed both when the condition is true and when it is false. If student s grade is greater than or equal to 60 Print Passed else Print Failed false grade >= 60 true print Failed print Passed

Repetition structure Specifies a block of one or more statements that are repeatedly executed until a condition is satisfied Three types : while, for, do-while

The while repetition structure Programmer specifies an action is to be repeated while some conditions remains true product <= 1000 true product = 2 * product false While product is less than or equal 1000 calculate product=2 * product

END OF LECTURE-1

ANY QUESTIONS?

THANK YOU

List of Experiments 1. C Programming Environment. 2. Logical and repetitive structure statements. 3. Functions and Pointers. 4. Structure and File handling methods. Click to return