Fundamentals of Programming. By Budditha Hettige

Similar documents
Fundamentals of Programming INTRODUCTION

Fundamentals of Programming. Budditha Hettige Department of Computer Science

Fundamentals of Programming

8/16/12. Computer Organization. Architecture. Computer Organization. Computer Basics

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

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

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

Topic 1: Programming concepts

Software Development 2

Compilers. Prerequisites

Why do you need to know about programming? Programming is used to create the application / software you use everyday

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

Computer Basics 1/24/13. Computer Organization. Computer systems consist of hardware and software.

Lesson 01 Introduction

Lecture 1 - Introduction (Class Notes)

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

Design & Implementation Overview

Computer Basics 1/6/16. Computer Organization. Computer systems consist of hardware and software.

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

CSC180: Lecture 2. Wael Aboulsaadat.

Programming 1 - Honors

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

Computer Science & Engineering 150A Problem Solving Using Computers

CS2900 Introductory Programming with Python and C++ Kevin Squire LtCol Joel Young Fall 2007

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

Low-Level Languages. Computer Programs and Programming Languages

Objects and Classes Lecture 1

Principles of Programming Languages. Lecture Outline

Outline. Introduction to Programming (in C++) Introduction. First program in C++ Programming examples

Chapter 1: Introduction to Computers and Programming

Chapter 1. Preliminaries

Programs are: CMPSCI 105/119/120: Programming, Flowchar<ng, and Running Program Flowcharts

Introduction to Java Programming

INFS 214: Introduction to Computing

Compiling and Interpreting Programming. Overview of Compilers and Interpreters

Unit 6 - Software Design and Development LESSON 1 INTRODUCTION

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

Introduction to Computers and Programming Languages. CS 180 Sunil Prabhakar Department of Computer Science Purdue University

Högnivåspråk och översättning

Chapter 1 Preliminaries

Fundamentals of Programming. By Budditha Hettige

COMPILER DESIGN LECTURE NOTES

Lesson 2: First Java Programs

IT 1033: Fundamentals of Programming Loops

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

Introduction. Computers, algorithms

Programming Languages and Program Development

Java Puzzle Ball Nick Ristuccia

MaSMT A Multi-agent System development framework

LECTURE 17. Expressions and Assignment

SCAN: Computer Science - second year. Christian Wolf

Chapter 1. Preliminaries

Programming Languages FILS Andrei Vasilateanu

Assembly Language Fundamentals

(0) introduction to the course. how to learn a programming language. (0) course structure

Introduction to Computer Programming Using FORTRAN 77

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

IT2Rail Interoperability Framework

LECTURE 3 ADMINISTRATION SECTION -A

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

Lecture 01 & 02 Computer Programming

Programming. leads to programming languages. leads to operating systems

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

Visual Basic Primer A. A. Cousins


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

The Computer System. Hardware = Physical Computer. Software = Computer Programs. People = End Users & Programmers. people

Discovering Computers 2008

Introduction to Programming

Problem Solving Footer Text 10/30/2015 1

Lecture 13: Expression Evaluation

Lecture 09. Ada to Software Engineering. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

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

1. Fundamental Concepts

Unit. Programming Fundamentals. School of Science and Technology INTRODUCTION

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 01, SPRING 2013

Introduction to JAVA Programming Language

Chapter 1 Introduction to Computers, Programs, and Java

ENGR/CS 101 CS Session Lecture 3

What is a programming language?

A Set Of Machine Language Instructions For A Program Is Called Source Code >>>CLICK HERE<<<

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

CSE 452: Programming Languages. Outline of Today s Lecture. Expressions. Expressions and Control Flow

last time in cs recitations. computer commands. today s topics.

Java Language. Programs. Computer programs, known as software, are instructions to the computer. You tell a computer what to do through programs.

Introduction to C++ IT 1033: Fundamentals of Programming

Chapter 1 Introduction to Computers, Programs, and Java

Computer Fundamentals

Chapter 7 Control I Expressions and Statements

Control Flow February 9, Lecture 7


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

Part (04) Introduction to Programming

Software. Software. Software. Program Language. Programs written for the ENIAC

Chapter 1. Introduction

Programming Languages, Summary CSC419; Odelia Schwartz

PROGRAMMING FUNDAMENTALS

Computer Software: Introduction

CIS 3260 Intro. to Programming with C#

Chapter 1 Introduction to Computers, Programs, and Java

Transcription:

Fundamentals of Programming By Budditha Hettige

Overview Machines solve problems? How Machine Solve a Problem? What is Programming? What are Programming Languages Compilers Tools and Tips for Programming About Programming IDEs 2

Machines solve problems? Café Machine can be used to make a Tea ATM machine use to money transaction Calculator can be used to solve equation Each Machine has Input Output Do some process 3

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

Calculator Input??? Output??? Process??? 5

ATM machine Input??? Output??? Process??? 6

Process of a Machine Work through the instructions given to it Read Write Do some Calculation Goto other instraction The sequence of instructions is call Program 7

What is a Programming? Programming is the way to give instructions Each Program has Start Do some work End Program is given through the machine understood language 8

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

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. 10

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

About Machines & Languages Machine defines a language Set of instructions carried out by the machine Language defines by the machine Machine executing all the program, writing in the language Language Machine Language 12

Computer Language(s) Machine contains New Languages (Ln) and the Machine language (LO) Programming Language(L n ) Translate/ Interpreter Machine Language (L 0 ) Program ming Language (Ln) Machine Language (L 0 ) Machine 13

Translation (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 14

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

Language Level Machine High-level Language Program (C, C++) Assembly Language Program Machine Language 16

Programming Language is an artificial language designed to communicate instructions to a machine Programming Language has Keywords Syntax Semantics 17

Low-level Languages An assembly language command such as ADD X Y Z might mean add the values found at x and y in memory, and store the result in location z. Assembly language must be translated to machine language (zeros and ones) 0110 1001 1010 1011 The CPU can follow machine language 18

High-level Languages Common programming languages include C, C++, Java, Pascal, Visual Basic FORTRAN COBOL, Lisp These high level languages Resemble human languages Are designed to be easy to read and write Use more complicated instructions than the CPU can follow Must be translated to zeros and ones for the CPU to execute a program 19

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

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

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. 22

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

Exercise 1. To solve the following problems, identify the input, output and the process a. Find the area of a room b. Search a place of a city c. Calculate grade for the given mark 2. What are the differences between compiler and interpreter? 3. Why High-level language are useful than the Lowlevel languages 4. Why Low-level is useful? 5. Search what are the compilers and IDE/Editors available for the JAVA programming? 6. Search what are the existing Java based applications? 24