1 / 18

INTRODUCTION TO COMPUTER PROGRAMMING

INTRODUCTION TO COMPUTER PROGRAMMING. A computer is an electronic, automatic and programmable device that accepts input, processes the input and gives output, which can be stored for future retrieval. what makes these machines so powerful ??

corin
Download Presentation

INTRODUCTION TO COMPUTER PROGRAMMING

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. INTRODUCTION TO COMPUTER PROGRAMMING MIS 101 Ms Safa Fallatah

  2. A computer is an electronic, automatic and programmable device that accepts input, processes the input and gives output, which can be stored for future retrieval. what makes these machines so powerful ?? Someone had to write the instructions, called code or program, to make the computer do what we want it to do. Called the Programmer Program .. is a set of instructions that tells the computer what to do. MIS 101 Ms Safa Fallatah

  3. . Programming .. is the act of writing code or program that is interpreted by the computer to carry out some repeatable task. A bug is a mistake in a program introduced by a programmer, which may lead to undesired results. MIS 101 Ms Safa Fallatah

  4. A BRIEF HISTORY OF COMPUTER PROGRAMMING Evolution of Computer Language : Towrite a program for a computer, you must use a computer language. A computer language … is a set of predefined words that are combined into a program according to predefined rules (syntax). Over the years, computer languages have evolved from machine language to natural languages. A time line for computer languages is presented bellow. MIS 101 Ms Safa Fallatah

  5. Evolution of computer languages MIS 101 Ms Safa Fallatah

  6. Categories of Programming Language Today, computer languages are categorized according to the approach they use in solving a problem and the category of problems they solve. As shown, computer languages can be categorized into five categories: Procedural (Imperative) Languages Object-Oriented Languages Functional Languages Declarative Languages Special Languages MIS 101 Ms Safa Fallatah

  7. Categories of computer languages MIS 101 Ms Safa Fallatah

  8. Procedural Language • Set of instructions that are executed one by one from beginning to end unless an instruction forces the control elsewhere. Even in this case, the program is still a series of instructions that are executed one after another, although some may be executed more than once or some may be skipped. • FORTRAN (FORmulaTRANslation), COBOL (COmmon Business-Oriented Language), Pascal, C etc. Examples .. MIS 101 Ms Safa Fallatah

  9. Object-Oriented Language (OO) OO programming is a mindset or a philosophy that attempts to: • simplify application development • relatescode objects to real world objects • creates more flexible applications C++, Java, VB.NET Examples .. MIS 101 Ms Safa Fallatah

  10. Classes vs. Objects • The basic building block of Object-Oriented programming is the class; class is closely related to object. • A class is a description of a group of objects with common properties (attributes), behavior (operations), relationships, and semantics. • An object, on the other hand, is an instance of a class. MIS 101 Ms Safa Fallatah

  11. Object-Oriented Language (OO) object represents an entity, either physical, conceptual, or software. An object is something that has: • State • Behavior • Identity MIS 101 Ms Safa Fallatah

  12. Object-Oriented Language (OO) • State of an objectis one of the possible conditions in which an object may exist. The state of an object normally changes over time. • Behaviordetermines how an object acts and reacts to requests from other objects. • Each object has a unique identity, even if its state is identical to that of another object MIS 101 Ms Safa Fallatah

  13. Functional Language • A program is considered a mathematical function. • For Example : summation can be considered a function with ninputs and only one output. The function takes the n inputs, adds them, and creates the sum. MIS 101 Ms Safa Fallatah

  14. Functional Language A functional language does the following: • It predefines a set of primitive (atomic) functions that can be used by any programmer. • It allows the programmer to combined primitive functions to create new functions LISP (LISt Programming) Examples .. MIS 101 Ms Safa Fallatah

  15. Declarative Language • Declarative Language uses the principle of logical reasoning to answer queries. It is based on formal logic defined by Greek mathematicians and later developed into what is called first-order predicate calculus. • Logical reasoning is based on deduction. Some statements (facts) are given that are assumed to be true; the logician uses solid rules of logical reasoning to deduce new statements (facts). • For example, the famous rule of deduction in logic is • If (A is B) and (B is C), then (A is C) • Using this rule, we have • If Ehab is a human and a human is mortal • Then Ehab is mortal. •   If (A is B) and (B is C), then (A is C) • Using this rule, we have • If Ehab is a human and a human is mortal • Then Ehab is mortal. • Prolog is an example of declarative language. MIS 101 Ms Safa Fallatah

  16. Special Language During the last decade, some new languages have emerged that cannot be placed in the four categories just discussed. Some are a mixture of two or more models and others belong to a specific task. Examples include HTML, PERL, and SQL. MIS 101 Ms Safa Fallatah

  17. PROGRAM DEVELOPMENT CYCLE MIS 101 Ms Safa Fallatah

  18. Since Software refers to a collection of instructions for the computer, the computer only knows how to do what the programmer tells it to do. Therefore, the programmer has to know how to solve problems. • The following are steps that will help the programmer plan his program development. • Analyze: Define the problem. • Design: Plan the solution to the problem. • Choose the interface: Select the objects (text boxes, buttons, etc.). • Code: Translate the algorithm into a programming language. • Test and debug: Locate and remove any errors in the program. • Complete the documentation: Organize all the material that describes the program MIS 101 Ms Safa Fallatah

More Related