Fundamentals of Programming INTRODUCTION

Similar documents
Fundamentals of Programming. By Budditha Hettige

Fundamentals of Programming. Budditha Hettige Department of Computer Science

Fundamentals of Programming

Identifiers. Identifiers are the words a programmer uses in a program Some identifiers are already defined. Some are made up by the programmer:

Introduction to Java Programming

LANGUAGE TRANSLATORS. Workbook. etghallem. St. Aloysius College Computing

Lecture 1 - Introduction (Class Notes)

From High Level to Machine Code. Compilation Overview. Computer Programs

Discovering Computers 2008

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

An Introduction to Software Engineering. David Greenstein Monta Vista High School

Unit 6 - Software Design and Development LESSON 1 INTRODUCTION

Programming 1 - Honors

Fundamentals of Programming. By Budditha Hettige

Chapter 2 Operating-System Structures

Lesson 2: First Java Programs

Chapter 1. Introduction

Introduction. Computers, algorithms

PROBLEM SOLVING AND PYTHON PROGRAMMING

LECTURE 3 ADMINISTRATION SECTION -A

Objects and Classes Lecture 1

C H A P T E R 1. Introduction to Computers and Programming

Computer Fundamentals

Chapter 2 First Java Programs

SKILL AREA 304: Review Programming Language Concept. Computer Programming (YPG)

CONTENTS. Chapter 1 Introduction and Evolution of Computer

Visual Basic Primer A. A. Cousins

AP Computer Science A: Java Programming

Discovering Computers Chapter 13 Programming Languages and Program Development

Chapter Twelve. Systems Design and Development

Chapter 1 Introduction to Computers, Programs, and Java. What is a Computer? A Bit of History

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

Programming Languages and Program Development

Technology in Action. Chapter Topics (cont.) Chapter Topics. Reasons for Software Programming. Information Systems 10/29/2010

UNIT I. Pune Vidyarthi Griha s COLLEGE OF ENGINEERING, NASHIK-4. 1

Low-Level Languages. Computer Programs and Programming Languages

Vocabulary Platform Computing\ First grade Theoretical number of hours=30 Practical number of hours =60

Algorithms and Flowcharts

Game keystrokes or Calculates how fast and moves a cartoon Joystick movements how far to move a cartoon figure on screen figure on screen

PROGRAMMING Programming is a creation of a set of commands or instructions which directs a computer in carrying out a task.

LESSON 13 OVERVIEW OF PROGRAM DEVELOPMENT PHASES

Introduction to Java. Lecture 1 COP 3252 Summer May 16, 2017

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

Introduction to Data Structures & Algorithm

Principles of Programming Languages. Lecture Outline

بسم اهلل الرمحن الرحيم

SIR C R REDDY COLLEGE OF ENGINEERING

Introduction. Lecture 1 MIT 12043, Fundamentals of Programming By: S. Sabraz Nawaz

Information Systems Software

Java Programming. Zheng-Liang Lu. Java 308 Spring Department of Computer Science & Information Engineering National Taiwan University

Scientific Computing

C++ Spring Break Packet 11 The Java Programming Language

IBPS Practice Exam 1. One megabyte equals approximately 1) 1,000 bits 2) 1,000 bytes 3) 1 million bytes 4) 1 million bits 5) 2,000 bytes 2.

Software Development. Integrated Software Environment

Chapter Overview. Assembly Language for Intel-Based Computers, 4 th Edition. Chapter 1: Basic Concepts. Printing this Slide Show

Java Puzzle Ball Nick Ristuccia

Introduction to Programming

Operating Systems CS3502 Spring 2018

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

Computer Science & Engineering 150A Problem Solving Using Computers

Full file at

Procedural Programming

Chapter 1 Introduction to Computers, Programs, and Java

COMPUTER - GENERATIONS

Unit II. (i) Computer Programming Languages

Chapter 1. Preliminaries

Computers Programming Course 6. Iulian Năstac

Java Programming. Zheng-Liang Lu. Java 301 Summer Department of Computer Science & Information Engineering National Taiwan University

Introduction to JAVA Programming Language

Unit. Programming Fundamentals. School of Science and Technology INTRODUCTION

Engineering Computing M1H Together Towards A Green Environment

Introduction to Engineering Using Robotics Experiments. Dr. Yinong Chen

CHARUTAR VIDYA MANDAL S SEMCOM Vallabh Vidyanagar

Objectives. Problem Solving. Introduction. An overview of object-oriented concepts. Programming and programming languages An introduction to Java

IT 1033: Fundamentals of Programming Loops

Module 1: Introduction to Computers, Programs, and Java

Computers can be broadly classified by their speed and computing power. S.No Type Specifications


Chapter. Focus of the Course. Object-Oriented Software Development. program design, implementation, and testing

HIGHER SCHOOL CERTIFICATE EXAMINATION COMPUTING STUDIES 3 UNIT (ADDITIONAL) Time allowed One hour and a half (Plus 5 minutes reading time)

IT2Rail Interoperability Framework

Chapter 1. Preview. Reason for Studying OPL. Language Evaluation Criteria. Programming Domains

UNIVERSITI TEKNIKAL MALAYSIA MELAKA FACULTY INFORMATION TECHNOLOGY AND COMMUNICATION (FTMK) BITE 1513 GAME PROGRAMMING I.

Chapter 2 FEATURES AND FACILITIES. SYS-ED/ Computer Education Techniques, Inc.

13. Databases on the Web

Software Development 2

CS10001: Computer Literacy Lab Assignment #4

Computer Programming-I. Developed by: Strawberry

FOR MORE PAPERS LOGON TO

Why study Programming Language Concepts? Chapter One. Language Evaluation Criteria. Programming Domains. Readability Writability Reliability Cost

Outline. Programming Languages 1/16/18 PROGRAMMING LANGUAGE FOUNDATIONS AND HISTORY. Current

Foreword. Agenda 22/09/2009 INTRODUCTION TO VBA PROGRAMMING. Foundations. Tools

Introduction to C++ IT 1033: Fundamentals of Programming

MIDI plugins with JUCE

Programming & Computers

Chapter 2: Operating-System Structures

Chapter 1 Introduction to Computers, Programs, and Java

COP4020 Programming Languages. Compilers and Interpreters Robert van Engelen & Chris Lacher

Using the Computer Programming Environment

Introduction to Java and OOP. Hendrik Speleers

Transcription:

Fundamentals of Programming INTRODUCTION Budditha Hettige

Why Machines? Café Machine can be used to make a tea? ATM machine can be used to money transaction? Calculator can be used to solve equation? Each Machine has Input Output Process 2

Café Machine Input Sugar Water Coffee Milk Output Tea Process???? Input Process Output 3

Calculator Input??? Output??? Process??? 4

ATM machine Input??? Output??? Process??? 5

Process of a Machine Work through the instructions given to it Read Write Do some calculations Go to next instruction The sequence of instructions is call Program 6

What is a Programming? Programming is the way to give instructions Each program has Start Some work End Program is given through the machine understood language 7

What is a Computer? Machine that can solve problems for people by carrying out instructions given to it The sequence of instructions is called Program The language machine can understand is called machine language 8

What is Machine Language? Machine language(ml) is a system of instructions and data executed directly by a computer's Central Processing Unit The codes are strings of 0s and 1s, or binary digits ( bits ) Instructions typically use some bits to represent Operations (addition ) Operands or Location of the next instruction. 9

Machine Language contd.. Advantages Machine can directly access (Electronic circuit) High Speed Disadvantages Human cannot identify Machine depended (Hardware depended) 10

Computer Language(s) Artificial Languages Human readable Ex: C/C++, Java Programming Language(L n ) Translator/ Interpreter Machine Language (L 0 ) Program ming Language (Ln) Machine Language (L 0 ) Machine 11

Interpretation Each instruction in L1 can execute through the relevant L0 instructions directly Program is call interpreter 12

Translator (L 1 L 0 ) 1. Replace each instruction written in L1 in to LO 2. Program now execute new program 3. Program is called compiler/ translator 13

Compilers Translate high-level language to machine language Input (Source code) The original program in a high level language Output (Object code/ Machine Code) The translated version in machine language Example C++ compiler, JAVA Compiler etc. 14

Programming language generations This classification is used to indicate increasing power of programming styles 1. First-generation programming languages 2. Second-generation programming languages 3. Third-generation programming languages 4. Fourth-generation programming languages 5. Fifth-generation programming languages 15

First-generation programming language (1GL) Is a machine-level programming language Translator isn t used to compile The instructions in 1GL are made of binary numbers, represented by 1s and 0s Advantage The code can run very fast and very efficiently because the instructions are executed directly by the CPU Disadvantage When an error occurs, the code is not as easy to fix 16

Second-generation programming language(2gl) Assembly language. Properties The code can be read and written by a programmer The language is specific to a particular processor family and environment Used in kernels and device drivers 17

Third-generation programming languages (3GL) Languages are more programmer-friendly Example C, C++, C#, Java, BASIC and Pascal Support structured programming. Must be translated into machine language by a compiler or interpreter Advantages Easier to read, write, and maintain 18

Fourth-generation programming languages(4gl) Designed to reduce programming effort Consist of Set of libraries CRUD generators Report generators DBMS Visual design tool and integration API Different types of 4GLs Table-driven (codeless) programming PowerBuilder Data management SAS, SPSS Report-generator programming languages Oracle Developer Suite 19

Fifth-generation programming language(5gl) Based on solving problems using constraints given to the program, rather than using an algorithm written by a programmer Use mainly in Artificial Intelligence research Example Prolog, OPS5, and Mercury 20

Selecting a suitable Computer Language Readability How easy to write the program in this particular language? Reliability How much would it cost to develop using a given language? How complicated the syntax going to be? Does the language have standards for greater readability? 21

Example Assembly Language Program Device drivers, Virus C / C++ Program Device drivers, DLLs JAVA / Visual C++ Program Desktop applications, Web Applications Prolog AI based applications, Games, Translators 22

Stages of Computer Programming 1. Planning 2. Analysis 3. Design 4. Implementation 5. Testing 6. Maintenance and update 23

Planning Identify scope of the project Estimate the work involved Create a project schedule Begins with requirements that define the software to be developed. The project plan can be used to describe the task 24

Analysis Is a complete description of the behavior of a system Consist of Functional requirements Non-functional requirements Methods Interview Questionnaires Observation etc. 25

Software Design Software design is a process of problemsolving and planning for a software solution Types Top down Bottom up Module design Use to describe Algorithm Flowchart Pseudo code 26

Design process 27

Design cont. Flowchart: is a type of diagram that represents an algorithm or process Gives diagrammatic representation solution to a given problem Use in analyzing, designing, documenting or managing a process or program 28

Flowchart- building blocks 29

Flowchart-building blocks contd... 30

Example 31

Example Draw a flow chart to display total and the maximum of the given two numbers 32

Implementation Is a realization of a technical specification or algorithm as a program, software component through computer programming May exist for a given specification or standard Example World Wide Web Consortiumrecommended specifications After implement Source code, together with documentation to make the code more readable. 33

Program Testing is an investigation conducted to provide information about the quality of the product A primary purpose of testing is to detect software failures Test White box test Black box test 34

Program Maintenance and Update Is the modification of a software product after delivery to correct faults Maintenance may span for 20 years, whereas development may be 1-2 year User guide, Maintenance manual need to provides Example Windows XP (Development few years, Maintenance.) Provides set of software updates patches etc. 35

The Characteristics of a Good Computer Program Reliability: The program should provide correct results at all times and should be free from errors. Maintainability: The existing program should be able to change or modify to meet new requirements. Portability: The program should be able to transfer to a different computer system. Readability: The program must be readable and understandable with the help of documentation. Performance: The program should handle the task more quickly and efficiently. Storage saving: The program should be written with the least number of instructions 36

Tools & Tips for programming Source code Editor TextPad, Notepad Compiler JAVA Compiler, C++ compiler Language Knowledge Logical thinking ability 37

Programming with IDE IDE : integrated design environment consists of source code editor compiler and/or an interpreter build automation tools Debugger Construction of a GUI Class browser Object inspector Etc. 38

Programming IDEs Eclipse Eclipse is a multi-language software development environment http://www.eclipse.org/ Code:blocks http://www.codeblocks.org/ Netbeans http://netbeans.org/ Microsoft Visual Studio http://www.microsoft.com/visualstudio/en-us 39

Summary Why Machines? What is programming Programming languages How to Select a programming language Computer programming stages Characteristics of a good computer program Tools & Tips for programming 40