Computer Programming Basics Assistant Professor Jeon, Seokhee Assistant Professor Department of Computer Engineering, Kyung Hee University, Korea.

Slides:



Advertisements
Similar presentations
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Advertisements

BY: JOSHUA THOMAS IGNATIUS TOWERS COBOL. Overview What is COBOL History Design Implementations What did it do Program structure Data types Syntax Sample.
2 We need programming languages to communicate with a computer. The two broad classifications of programming languages are: Low-level and High- level.
Chapter 1: An Overview of Computers and Programming Languages J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program.
Chapter Chapter Goals Describe the layers of a computer system Describe the concept of abstraction and its relationship to computing Describe.
Overview of Programming Paradigms
The Analytical Engine Module 6 Program Translation.
Computer Concepts 5th Edition Parsons/Oja Page 546 CHAPTER 11 Software Engineering Section A PARSONS/OJA Computer Programming.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Introduction to Computers and Programming. Some definitions Algorithm: –A procedure for solving a problem –A sequence of discrete steps that defines such.
16 March, 2000 CS1001 Lecture 1 Introduction - Syllabus History of Computers Computer Components.
Chapter 16 Programming and Languages: Telling the Computer What to Do.
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
CMP 131 Introduction to Computer Programming Violetta Cavalli-Sforza Week 1, Lab.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
Introduction to Computers and Programming. Some definitions Algorithm: Algorithm: A procedure for solving a problem A procedure for solving a problem.
Chapter 1: Introduction To Computer | SCP1103 Programming Technique C | Jumail, FSKSM, UTM, 2005 | Last Updated: July 2005 Slide 1 Introduction To Computers.
CS102 Introduction to Computer Programming
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
BIT Presentation 6. Contents GENERATIONS OF LANGUAGES COMPILERS AND INTERPRETERS VIRTUAL MACHINES OBJECT-ORIENTED PROGRAMMING SCRIPTING LANGUAGES.
Introduction to Computer Programming itc-314
P-Phunck - Prolog1 Introduction to Prolog Brian Paden.
Software – Applications software and programming languages
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
Introduction to COBOL. COBOL  COBOL is an acronym which stands for Common Business Oriented Language.  The name indicates the target area of COBOL applications.
Computer Programming Basics Assistant Professor Jeon, Seokhee Assistant Professor Department of Computer Engineering, Kyung Hee University, Korea.
CHAPTER 1 Overview of Programming and Problem Solving.
Programming Language Rico Yu. Levels of Programming Languages 1.Low level languages 2.High level languages.
1 Computing Software. Programming Style Programs that are not documented internally, while they may do what is requested, can be difficult to understand.
CSC-115 Introduction to Computer Programming
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 1 – Car Payment Calculator and Guess the Number.
Computer system overview1 The Effects of Computers Pervasive in all professions How have computers affected my life? How have computers affected my life?
UniMAP Sem1-08/09EKT120: Computer Programming1 Week 1 – Lecture 1.
Programming Languages 1.07a.  A computer program is a series of instructions that direct a computer to perform a certain task.  A programming language.
Computer Programming Basics Assistant Professor Jeon, Seokhee Assistant Professor Department of Computer Engineering, Kyung Hee University, Korea.
1 Computer Programming (ECGD2102 ) Using MATLAB Instructor: Eng. Eman Al.Swaity Lecture (1): Introduction.
Visual C++ Programming: Concepts and Projects
Software – Applications software and programming languages.
CS CS Computing for Business Instructor:David Tucker GTA:Batul Mirza.
The Teacher Computing Computer Languages [Computing]
Discovering Computers 2009 Chapter 13 Programming Languages and Program Development.
Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition.
CPSC3111/CISM3111 COBOL Structured COBOL Programming Text: murach’s structured COBOL Authors: Murach, Prince, Menendez.
Chapter 0 Overview. Why you are here? Where will you go? What is this course for?
McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 4 Computer Software.
COMPUTER PROGRAMMING. Computer programming the objective of the module to gain the necessary skills to develop a computer program using one of the high.
Lecture 11: 10/1/2002CS149D Fall CS149D Elements of Computer Science Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture.
Tolo-e-aftab higher education 1 th semester Bcs 1/2/1392 MINISTRY OF HIGHER EDUCATION.
PROGRAMMING LANGUAGES
Chapter 7 Low-Level Programming Languages. 2 Chapter Goals List the operations that a computer can perform Discuss the relationship between levels of.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 1.1 What Is a Computer? 1.2 Computer Organization.
CSC1200 INTRODUCTION TO PROGRAMMING Dr. Maureen Markel
CS-303 Introduction to Programming
5.0 PROGRAMMING Duration: 10 weeks Prepared by Ong Lay Peng Copyright © 2007.
2 nd Semester Module1 Introduction to Computer and Programming อภิรักษ์ จันทร์สร้าง Aphirak Jansang
2 nd Semester Module1 Introduction to Computer and Programming อภิรักษ์ จันทร์สร้าง Aphirak Jansang
General Introduction Algorithms. Let’s write a program  A program is a collection of statements written in a language the computer understands.  A computer.
INTRODUCTION TO COMPUTER PROGRAMMING(IT-303) Basics.
Chapter 1: Introduction to Computers and Programming.
1 Chapter 1 Background Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Software Engineering Algorithms, Compilers, & Lifecycle.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
First appeared Features Popular uses Basic This language emphasises on ease of use, allowing general purpose programming to those with a small amount of.
Computer Languages [Computing] Computing.
Lecture: MATLAB Chapter 1 Introduction
Object-Oriented Programming
Principles of Programming Languages
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Presentation transcript:

Computer Programming Basics Assistant Professor Jeon, Seokhee Assistant Professor Department of Computer Engineering, Kyung Hee University, Korea

About The Lecture Note This lecture note is intended to be used by students in “Computer Programming Basics” course at the Kyung Hee University. Large portion of the materials is based on the lecture note supplied by the authors of the textbook “Computer Science : A Structured Approach Using C++, 2nd Edition.”

LECTURE 1

What is computers? Wikipedia says –“A computer is a general purpose device that can be programmed to carry out a finite set of arithmetic or logical operations.” Device? Hardware! Programmed? Software! Arithmetic or logical? Digital!

Nintendo DS HardwareSoftware

Apple iPod/iPhone HardwareSoftware

Internet HardwareSoftware

Computer Programming

Program and Programming Computer program  Software Computer programming  “Making software” Computer programmer = A person who develops software

Computer Programming Language

Programming Language A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer.

Programming Language Human LanguageProgramming Language Naturally created, e.g., Chinese, Korean, English,… Artificially developed, e.g., C, Basic, C#, Fortran,… Interpreted mostly by human Interpreted by human and computer Ambiguities and exceptions in syntax and grammar Clear and precise syntax

Hierarchy of Programming Language

The movie “Matrix” Can’t you see? Neo is here.

Hierarchy of Programming Language The movie “Matrix” Now you can pick Neo, but not clearly.

Hierarchy of Programming Language The movie “Matrix”

▒ 경희대학교 전자정보대학 ▒ Examples of Programming Language - HTML (Hyper Text Markup Language)

DIMENSION X(32), Y(32), B(34) C C GENERATE RANDOM NUMBERS AND STORE ARRAY IN B SO C THE SAME SEQUENCE CAN BE USED IN ALL TESTS. C NOTE THAT B IS DIMENSIONED TO SIZE N+2. C C IW IS A MACHINE DEPENDENT WRITE DEVICE NUMBER C IW = I1MACH(2) C DO 10 I=1,32 X(I) = UNI(0) B(I) = X(I) 10 CONTINUE M = 5 N = 2**M NP1 = N + 1 NP2 = N + 2 KNT = 1 C C TEST FAST-FSST THEN FFA-FFS C WRITE (IW,9999) 20 WRITE (IW,9998) (B(I),I=1,N) IF (KNT.EQ.1) CALL FAST(B, N) IF (KNT.EQ.2) CALL FFA(B, N) WRITE (IW,9997) (B(I),I=1,NP1,2) WRITE (IW,9996) (B(I),I=2,NP2,2) IF (KNT.EQ.1) CALL FSST(B, N) IF (KNT.EQ.2) CALL FFS(B, N) WRITE (IW,9995) (B(I),I=1,N) KNT = KNT + 1 IF (KNT.EQ.3) GO TO 40 C WRITE (IW,9994) DO 30 I=1,N B(I) = X(I) 30 CONTINUE GO TO 20 Examples of Programming Language - FORTRAN (Numeric Computation & Scientific Computing)

$ SET SOURCEFORMAT"FREE" IDENTIFICATION DIVISION. PROGRAM-ID. Multiplier. AUTHOR. Michael Coughlan. * Example program using ACCEPT, DISPLAY and MULTIPLY to * get two single digit numbers from the user and multiply them together DATA DIVISION. WORKING-STORAGE SECTION. 01 Num1 PIC 9 VALUE ZEROS. 01 Num2 PIC 9 VALUE ZEROS. 01 Result PIC 99 VALUE ZEROS. PROCEDURE DIVISION. DISPLAY "Enter first number (1 digit) : " WITH NO ADVANCING. ACCEPT Num1. DISPLAY "Enter second number (1 digit) : " WITH NO ADVANCING. ACCEPT Num2. MULTIPLY Num1 BY Num2 GIVING Result. DISPLAY "Result is = ", Result. STOP RUN. Examples of Programming Language - COBOL (COmmon Business-Oriented Language)

var NodeFile,LinkFile: Text; NetRoot,NodeList: NetNodePtr; EvidenceVector: NetVector; { ******************** Math Support ******************** } procedure Normalize(var Vector: NetVector); { Scales incoming Vector so that it sums to unity } var i: ValueRange; Sum: real; begin Sum := 0; with Vector do begin for i := 1 to NVals do Sum := Sum + Data[i]; for i := 1 to NVals do Data[i] := Data[i] / Sum end end; procedure MakeIdentityVector(var Vector: NetVector;Length: ValueRange); { Makes incoming Vector into an identity vector of specified length} var i: ValueRange; begin with Vector do begin NVals := Length; for i := 1 to Length do Data[i] := 1.0 end end; Examples of Programming Language - PASCAL (General/Education Purpose)

turing(Tape0, Tape) :- perform(q0, [], Ls, Tape0, Rs), reverse(Ls, Ls1), append(Ls1, Rs, Tape). perform(qf, Ls, Ls, Rs, Rs) :- !. perform(Q0, Ls0, Ls, Rs0, Rs) :- symbol(Rs0, Sym, RsRest), once(rule(Q0, Sym, Q1, NewSym, Action)), action(Action, Ls0, Ls1, [NewSym|RsRest], Rs1), perform(Q1, Ls1, Ls, Rs1, Rs). symbol([], b, []). symbol([Sym|Rs], Sym, Rs). action(left, Ls0, Ls, Rs0, Rs) :- left(Ls0, Ls, Rs0, Rs). action(stay, Ls, Ls, Rs, Rs). action(right, Ls0, [Sym|Ls0], [Sym|Rs], Rs). left([], [], Rs0, [b|Rs0]). left([L|Ls], Ls, Rs, [L|Rs]). Examples of Programming Language - PROLOG (For Artificial Intelligence)

C++

Why C++? Popularity Huge numbers of users to ask questions Open source codes, tutorials, and libraries all over the internet

C++ Why C++? Flexibility high level programming features, e.g., object-oriented, function low level hardware management functionalities, e.g., memory management, bitwise operation +

C++ C Why C++? Wide coverage Structured Programming Low-Level Programming Friendly JAVA Object-Oriented Programming High-Level Programming Friendly

Brief History of C++ 11

Review Computer: Hardware and software Software is important Programming = Software developing Programming language: artificial language specially designed for software development Machine – assembly – high-level languages C++ is awesome!