0% found this document useful (0 votes)
41 views

Lecture # 1

This document provides an overview of a computer programming course taught by Dr. Afshan Jamil. It outlines the course learning outcomes, which include learning how to propose solutions to real-life problems using computer programs, analyzing programs to identify their structures, and developing programs using object-oriented design approaches. The evaluation criteria includes quizzes, assignments, midterms and finals. The course will cover topics such as computer languages, compilers, assemblers, linkers, algorithms, flow charts, program design, object-oriented programming, testing, debugging, and types of errors.

Uploaded by

Amaim Fatima
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

Lecture # 1

This document provides an overview of a computer programming course taught by Dr. Afshan Jamil. It outlines the course learning outcomes, which include learning how to propose solutions to real-life problems using computer programs, analyzing programs to identify their structures, and developing programs using object-oriented design approaches. The evaluation criteria includes quizzes, assignments, midterms and finals. The course will cover topics such as computer languages, compilers, assemblers, linkers, algorithms, flow charts, program design, object-oriented programming, testing, debugging, and types of errors.

Uploaded by

Amaim Fatima
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

Computer Programming

Course Instructor: Dr. Afshan Jamil


Lecture # 1
Course Learning outcomes
S. Course Learning Outcome (CLO’s) Bloom’s
No Learning
Level
1 Learn skills to propose solutions for real life C2
problems in terms of computer programs.
2 Analyze programs with standard notation/ C3
methods to identify their structures.
3 Develop programs using high level C3
programming language making use of modular
as well as object-oriented design approach.
Evaluation Criteria
Evaluation Criteria Percentage

Quiz (4-5) 15%


Assignment (2) 10%
Mid 25%
Final 50%
CONTENTS
Computer
Compiler Assembler
Languages

Linker Algorithms Flow chart

Program Object
Testing and
design oriented
Debugging
Process programming

Runtime
Syntax error Logical error
error
Programming is like Legos

Small number of primitive constructs!


You can build huge structures using these pieces.
Computer Languages
High level Languages
• High level language resemble human language. It is
easy for human beings to write programs in it e.g.,
C++, C#, Java, Python, Pascal etc.

Assembly Language
• One to one correspondence with machine language.
Use symbols or mnemonics to represent
instructions and data.

Machine Language
• It is executed directly by hardware. Machine
instruction consists of binary e.g., 0s and 1s. .
CONTD…

Any high-level language program must


be translated into machine language
before the computer can understand and
follow the program
Compiler

• A program that translates a high-level language like


C++ to a machine language that the computer can
directly understand and execute.
• The input to the compiler is a program in high level
language (source program or source code) and the
translated version produced by the compiler is called
the object program or object code.
CONTD…
The magic of Compiler
Assembler

• The Assembler is a Software that converts an assembly


language code to machine code.
• We can also name an assembler as the compiler of
assembly language.
• An assembler works by assembling and converting the
source code of assembly language into object code or an
object file that constitutes a stream of zeros and ones of
machine code, which are directly executable by the
processor.
CONTD…
Linker

The object code for your C++ program must be


combined with the object code for routines (such as
input and output routines) that your program uses. This
process of combining object code is called linking and
is done by a program called a linker.
Linker
Algorithms

A sequence of precise instructions which leads to a


solution is called an algorithm.
To qualify as an algorithm, a set of instructions must
completely and unambiguously specify the steps to be
taken and the order in which they are taken.
Example: Sum of two numbers
Flow chart

a graphical representation of a computer program in


relation to its sequence of functions (as distinct from
the data it processes).
Flow Chart Symbols
Example: Sum of two numbers
Program design process
Object Oriented Programming

Procedural programming is about writing


procedures or functions that perform operations
on the data, while object-oriented
programming is about creating objects that
contain both data and functions.
EXAMPLE
Testing and Debugging

Mistake in a program is usually called a bug, and the


process of eliminating bugs is called debugging.
Syntax error
Violation of the syntax (that is, the
grammar rules) of the programming
language, such as omitting a semicolon.
Example
• He eats lunch the…

• I going am school to…


Logical error
The program will run perfectly but it
will not behave in desired manner. It is
most difficult to spot logical errors. Can
only be resolved by careful testing.
Example
If you intend to write:
“A dog bit a man…”
BUT mistakenly end up with
“A man bit a dog…”
Runtime Error
There are certain kinds of errors that the
computer system can detect only when a
program is run, these are called run-
time errors.
Example

If the computer attempts to divide a


number by zero, that is normally a
run-time error.
Questions?
Brainstorming Time

❑ Why study C++ language??


❑ What are latest job trends in C++??
❑ What are major applications of
C++ in the field of computing ??
❑ ….
❑ …..
THE END

You might also like