Presentation is loading. Please wait.

Presentation is loading. Please wait.

(Course Introduction)

Similar presentations


Presentation on theme: "(Course Introduction)"— Presentation transcript:

1 (Course Introduction)
King Saud University College of applied studies and community services GC101 Computer Programming I Lecture 1 (Course Introduction)

2 Lecture Outline What Is A Computer Program? Software? Why Program?
What Makes A Good Programmer? An Overview of Computer Languages History Of C Why C? Flow of Information During Program Execution The Software Development Method An Example of Meter to Yard Conversion Algorithm Pseudocode Flowcharts Course Introduction 1

3 What Is A Computer Program? Software?
Program = set of instructions that a computer will follow to perform a specific task. Software = collection of programs. Two types of software: System software: used to manage computer hardware to enable us to execute & write application programs/software. Ex. Operating System, Compilers, …etc. Application Software: are meant for solving users own problems. Ex. Word processors, database management…etc. Course Introduction 2

4 Why Program? A tailor-made program is required.
Programmers are in high demand. Programming is an intellectual challenge. Course Introduction 3

5 What Makes A Good Programmer?
Two main factors: Knowledge: data structures, algorithms, tools, when and how to use those tools, & experience. Maturity: patience, humility, & time management. Only the first one can be taught. Good programmers are more than 10 times productive as average ones (does not mean they write 10 times as many lines of code per day). Course Introduction 4

6 An Overview Of Computer Languages
Machine Language Assembly Language High-Level Language Collection of binary Symbolic form of machine Combines algebraic numbers language (I.e. symbolic expressions & symbols taken names are used to represent from English language operations, registers & (ex. C, Pascal, memory locations FORTRAN, …etc) Ex. Ex. Ex. MOV AX,A A = A + 4 ADD AX,4 MOV A,AX Directly understood by a Assembler Compiler (or interpreter) computer converts to machine converts to machine language language Easier to use More powerful Course Introduction 5

7 An Overview Of Computer Languages (Continue)
C is sometimes called a middle-level language. This is not a reflection on its lack of programming power. It’s a reflection on its capability to access the system’s low-level functions. Course Introduction 7

8 History Of C Created by Dennis Ritchie at the Bell Telephone laboratories in 1972. Evolved from a language called B. Course Introduction 8

9 Why Use C? C is a powerful and flexible language. C is used for projects as diverse as operating systems, word processors, graphics, spreadsheets, and even compilers for other languages. C is a popular language preferred by professional programmers. As a result, a wide variety of C compilers and helpful accessories are available. C is a portable language. Portable means that a C program written for one computer system can be compiled and run on another system with little or no modification (hardware independent). Portability is enhanced by the ANSI standard for C, the set of rules for C compilers. Course Introduction 9

10 Why Use C? C is a language of few words, containing only a handful of terms called keywords, which serve as the base on which the language’s functionality is built. C is modular, C code should be written in routines called functions. These functions can be reused in other applications or programs. By passing pieces of information to the functions, you can create useful, reusable code. Course Introduction 10

11 The Software Development Method
1. Specify the problem requirements. 2. Analyze the problem. 3. Design the algorithm to solve the problem. 4. Implement the algorithm. 5. Test and verify the completed program. 6. Maintain and update the program. Course Introduction 7

12 An Example of Meter to Yard Conversion
1. Specify the problem requirements A program is required to convert square meters to square yards. 2. Analyze the problem Problem Input: Problem Output: Formulas: size in square meters (decimal) size in square yards (decimal) square yards = * square meters 3. Design the algorithm to solve the problem 1. Read the fabric size in square meters. 2. Convert the fabric size to square yards using the formula. 3. Display the fabric size in square yards. Course Introduction 8

13 An Example of Meter to Yard Conversion
4. Implement the algorithm (i.e. write the program) 5. Test and verify the completed program. 6. Maintain and update the program. Course Introduction 9

14 Algorithm An Algorithm is a procedure for solving a problem in terms of: 1. the actions to be executed 2- the order in which these actions are executed Course Introduction 10

15 Pseudocode Pseudocode is an artificial and informal language that helps programmer develop algorithms. It is similar to everyday English. It is not a computer programming language. Example Get out of Bed Take a shower Get dressed Eat breakfast Drive to work Course Introduction 11

16 Flowcharts A flowchart is a graphical representation of an algorithm. They are drawn using rectangles, diamonds, ovals, and small circles. Course Introduction 12

17 Flowcharts (Continue)
Start or End Input or Output Process or Calculation Decision Course Introduction 13


Download ppt "(Course Introduction)"

Similar presentations


Ads by Google