An Introduction to Programming

Slides:



Advertisements
Similar presentations
An Introduction to Programming General Concepts. What is a program? A program is an algorithm expressed in a programming language. programming language.
Advertisements

Senem Kumova Metin Introduction to Programming CS 115 Introduction to Computing PART I : Computer Basics PART II: Introduction to Computing/Programming.
Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
Programming Languages Language Design Issues Why study programming languages Language development Software architectures Design goals Attributes of a good.
Overview of Programming Paradigms
High-Level Programming Languages
Chapter 8 High-Level Programming Languages Nell Dale John Lewis.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Objectives Machine language vs.. High-level language Procedure-oriented, object-oriented, and event- driven languages Background of Visual Basic VB Integrated.
Programming Paradigms Imperative programming Functional programming Logic programming Event-driven programming Object-oriented programming A programming.
1 Programming Concepts Module Code : CMV6107 Class Contact Hours: 45 hours (Lecture 15 hours) (Laboratory/Tutorial 30 hours) Module Value: 1 Textbook:
ProgrammingLanguages Programming Languages Event-Driven Visual Programming Languages This lecture discusses the basic concepts of the event-driven programming.
PZ01A Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ01A -- Introduction Programming Language Design and.
Chapter 8 High-Level Programming Languages (modified by Erin Chambers)
High-Level Programming Languages: C++
COMPUTER PROGRAMMING Source: Computing Concepts (the I-series) by Haag, Cummings, and Rhea, McGraw-Hill/Irwin, 2002.
COMPUTER PROGRAMS AND LANGUAGES Chapter 4. Developing a computer program Programs are a set (series) of instructions Programmers determine The instructions.
Chapter 11 An Introduction to Visual Basic 2008 Why Windows and Why Visual Basic How You Develop a Visual Basic Application The Different Versions of Visual.
1 Introduction Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
Visual C++ Programming: Concepts and Projects
Chapter 12 Computer Programming. Chapter Contents Chapter 12: Computer Programming 2  Section A: Programming Basics  Section B: Procedural Programming.
Chapter 11 An Introduction to Visual Basic 2005 Why Windows and Why Visual Basic How You Develop a Visual Basic Application The Different Versions of Visual.
Chapter 8 High-Level Programming Languages. 2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
Programming Languages
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
Programming Language Paradigms ITSK2314 Lecture 3.
a medium allowing humans and computers to communicate an abstraction of the real world a notation for expressing algorithms the set of all syntactically.
History. Development Driven by Function Functions of a Programming Language –To describe computation for use by computers –To describe computation and.
CPS120 Introduction to Computer Science High Level Language: Paradigms.
Programming Paradigms, Software Architectural Patterns, and MVC CS 378 – Mobile Computing for iOS Dr. William C. Bulko.
Programming Languages and Data Organization
Programming Languages 2nd edition Tucker and Noonan
Chapter 1 Introduction to Visual Basic
Unit 2 Technology Systems
Computer Programming (BCT 1113)
Introduction to Programming and Visual Basic
CSCI-235 Micro-Computer Applications
Event-driven programming
Architecture Concept Documents
Event loops 16-Jun-18.
CS101 Introduction to Computing Lecture 19 Programming Languages
An Introduction to Programming
Introduction to Computers and Java
C++ Programming: From Problem Analysis to Program Design
Developing Applications
Computer Programming.
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Programming Languages
Event loops.
Programming Languages 2nd edition Tucker and Noonan
CSE 341 Programming Languages Autumn 2001
CSE 341 Programming Languages Autumn 2003
CS285 Introduction - Visual Basic
CSE 341 Programming Languages Autumn 2002
Event loops 17-Jan-19.
Event loops 17-Jan-19.
High Level Programming Languages
Low Level Programming Languages
CSE 341 Programming Languages Spring 2003
Principles of Programming Languages
Overview of Programming Paradigms
Event loops 8-Apr-19.
Lecture 8 Programming Paradigm & Languages. Programming Languages The process of telling the computer what to do Also known as coding.
CSE 341 Programming Languages Autumn 2003
강의 내용 및 방법 접근방법 리포트 시험 Lambda Calculus, Proof of Correctness
Programming Languages and Paradigms
Event loops.
Event loops 19-Aug-19.
Presentation transcript:

An Introduction to Programming General Concepts

What is a program? A program is an algorithm expressed in a programming language. An algorithm is a detailed sequence of actions to perform to accomplish some task. Named after an Iranian mathematician, Al-Khwarizmi. Technically, an algorithm must reach a result after a finite number of steps.

Algorithm: An Example To convert Celsius degrees to Fahrenheit: multiply the temperature by 9 divide the result by 5 increase the result by 32

Algorithm: Key Elements Notice that there are 3 key elements of this example: What to do – the operation What to do it to – the data When to do it – the sequence

Algorithm: Key Elements The operations that can be performed on data are defined for each programming language and associated with special symbols. The data elements that can be manipulated fall into 2 categories: The order in which the instructions are executed is determined by their sequence. literal variable

Key Elements of Programs All programs are algorithms, but not all algorithms are programs. While the example demonstrates several key elements of algorithms, it omits an essential element of all programs: Input/Output (I/O)

Key Elements of Programs The key elements of programs, then, are: Input/Output How a program communicates with the user. Logic The order in which activities are carried out. Data Storage Manipulation

Evolution of I/O Early in the history of computing, programs were submitted on punch cards with all the data they required and executed together with other programs that used the same libraries. Output was to a line printer. Many computing tasks are well suited to this batch mode of processing. Later developments introduced interactive processing which allowed the user to provide data while the program was running. This normally takes place in a Question & Answer format.

Evolution of I/O The development of the Graphic User Interface (GUI) provided the opportunity for another development. The GUI is not restricted to interacting with the user one line at a time. It can present several options to the user and respond to whichever is selected.

Language Paradigms What is a paradigm? The evolution of I/O reflected changes in the way programmers looked at programming. Several paradigms have been developed. What is a paradigm? A set of assumptions, concepts, values, and practices that constitute a way of viewing reality.

Programming Language Paradigms Imperative or procedural model Algorithms are expressed as a hierarchy of tasks. FORTRAN, COBOL, BASIC, C, Pascal, Ada, and C++

Programming Language Paradigms Functional model Computation is expressed in terms of the evaluation of functions. A solution is expressed in terms of function calls. LISP, Scheme (a derivative of LISP), and ML

Programming Language Paradigms Logic programming Based on symbolic logic A “program” consists of a set of facts about objects, a set of rules about relationships between the objects, and a way to ask questions about the objects and their relationships. PROLOG

Programming Language Paradigms Object-oriented paradigm Views the world as interacting objects Objects are active, and responsible for their own manipulation. SIMULA and Smalltalk C++ is as an imperative language with some object-oriented features. Java is an object-oriented language with some imperative features.

Asynchronous Processing Asynchronous processing: is the concept that input and output can be accomplished through windows on the screen. Clicking has become a major form of input to the computer. Mouse clicking is not within the sequence of the program. A user can click a mouse at any time during the execution of a program.

Event-driven Programming In VB we construct an interface of objects that the user can manipulate. Anything that can happen in the interface is called an Event. A VB project consists of the programs that will be executed when each Event occurs. Hence the term Event-driven programming.

Event-driven Programming Even though the approach is very different on the user end, ultimately Events invoke procedures, so the fundamental skills of programming haven’t changed much. In VB, as with most other programming languages, the programmer must deal with the 3 key elements: I/O Data Flow of control