You are on page 1of 7

UNIVERSITY OF MANAGEMENT AND TECHNOLOGY

Fall 2022

Title Programing Fundamental


Code CMP-101
Credit Hours Theory 3 Cr. Hrs.
Lab 1 Cr. Hrs.

Instructor Ms.Hina Tufail


Email Hina.tufail@skt.umt.edu.pk
Office 24
Prerequisite Better if know about computer system and any programming language.
Category Information Technology+ Computer Science (Core)
Aims and  Prepare programs using top-down structured design.
Objectives  Understand the syntax and concepts of programming language (C++).
 Design, create, test and debug programs (C++).
 Developed programs that are both syntactically and logically correct.
 The student will be able to understand basic designing techniques of programming
language.
 Hands on experience of different c/ c++ constructs
 Perform problem solving skills

Learning 1. Understand basic problem solving steps and logic constructs


Outcomes 2. Apply basic programing concepts
3. Design and implement algorithms to solve real world problems.

Syllabus Introduction to problem solving, a brief review of Von-Neumann architecture,


Introduction to programming, role of compiler and linker, introduction to
algorithms, basic data types and variables, input/output constructs, arithmetic,
comparison and logical operators, conditional statements and execution flow for
conditional statements, repetitive statements and execution flow for repetitive
statements, lists and their memory organization, multi-dimensional lists, introduction
to modular programming, function definition and calling, stack rolling and unrolling,
string and string operations, pointers/references, static and dynamic memory
allocation, File I/O operations
Reference 1. Introduction to Programming with C++ by Daniel Liang
Books 2. C++ How to program by DEITEL AND DEITEL
3. Hanly Koffman – Problem Solving & Program Design in C – Addison Wesley
3rd addition.
Assessment
Criteria
Assignments (3 to 4) 10%
Quizzes (3 to 4) 10%
Term Project 15%
Midterm Exam 25%
End term Exam 35%
Total 35
Classroom During class all cell phones must be turned off or set to “vibrate.” If you are on-call for
Behavior emergencies, please let me know at the beginning of the class.

Students have flexibility of 5 minutes after starting the lecture.

Recommendations
for Learning
Source Activities
Week TOPICS (Book-Chapter No) (Mention Assignments, Test,
Quizzes, Practical, Case Study,
Projects, Lab Work or Reading
Assignments)
1 Course Introduction:
Course Policies/Overview/Course
Contents/Course Objectives
Introduction to Computer:
 Computer hardware components
 Computer software components.
 Operating systems, compiler, interpreter,
editor, application
 Source file and object file
Introduction to Programming:
 Programming languages
 C++ programming environment.
 Machine language, assembly, high level
programming language
 C++ language
 Steps for creating, compiling and
executing a C++ program
 Sample C++ program
 Program Life Cycle.
2 Problem Solving:
 Software development method.
 Problem analysis.
 Design and algorithm representation –
flowchart, pseudo code.
 Testing and verification &
Implementation.
 Program documentation.
Getting Started with C++:
 The C++ character Set
 Constants, Variables and Keywords
 Types of C++ constants and variables
 C++ character set and tokens – reserved
words, identifiers
 Constants, string literals.
C++ program structure:
 Preprocessor directives.
 Types of Preprocessor directives.
 Main function and body of the main
function.
 Statements, compound statements.
 Standard Input-Output functions in C++.
 Comments and types of comments.
3 Concept of Data Types:
 Data types causes and reasons.
 Classification of data and their supportive
type’s analogy.
 Data types supported by C++.
 Range and Limitations of different data
types.
 Type casting and conversion.
Variables declarations and
initialization:
 How to declare a variable in C++.
 How to initialize the variable.
 Defining the variables.
 Naming conventions and variables
description.
 Rules for declaring the name of variables.
 Escape Sequence characters
4 Standard Input-Output functions in C+
+:
 What is standard input and Output?
 Input and out functions supported by C+
+.
 Syntax of Cout() and Cin() and their
uses.
 getch() and getche()
 Format Specifiers.
Basic C++ operators:
 Arithmetic operators.
 Assignment operators.
Basic C++ operators:
 Equalities and relational operators.
 Logical operators.
 Conditional operators.
5 Quiz
The Decision Control structure using
If:
 The if statement.
 Flow chart of if statement.
 Multiple statements within if.
 Examples and Exercise.
 The goto statement.
The Decision Control structure using if-
else:
 The if-else statement.
 Flow chart of if-else statement.
 Multiple if-else Statements.
 Nested if-else’s.
 The break statement.
6 Lab exercise
The Decision Control structure using
Switch-Case:
 Syntax of Switch-case statements.
 Difference of switch case with multiple if-
else statements.
 Benefits and limitations of switch-case
statements.
 Examples and Exercise.
7 The Repetition control structure using
for loop:
 What is a loop?
 Elements or components of a loop.
 Syntax of for loop.
 Flow chart of for loop to understand it’s
working.
 for loop as counter controlled loop?
The Repetition control structure using
while loop:
 Syntax of while loop.
 Flow chart of while loop to understand its
working.
 What is a counter/sentinel controlled
loop?
 Sentinel value controlled loop vs.
counter controlled loop.

8
MID TERM WEEK

9 The Repetition control structure using


do-while loop:
 Syntax of do-while loop.
 Working of do-while loop using Flow
chart.
 Difference between while and do-while.
 An application of do-while loop for data
validation.
The Nested repetition control
structures & continue statements:
 What is nested loop?
 Working of nested loop using flow chart.
 Nested for loop.
 Infinite loop.
 The continue statement.
10 The Simple Functions: Quiz#2
 Why use functions? Assignment#2
 Standard functions.
 User defined functions.
 Signature of the functions.
 Function prototype.
 Function definition.
 Function call.
The Fruitful & Parameterized
Functions:
 Functions that return a value.
 Parameters and use of arguments to pass
data to a function.
 Formal / Actual parameters.
 Parameters vs. arguments.
 Passing values between functions.
11 The Functions & Simple Recursion:
 Using more than one function.
 Local and global variables.
 What is recursion?
 Example using recursion.
 Recursion vs. iteration
The Arrays Construct I:
 Concept of arrays – why, how,
advantages.
 Array declaration and initialization.
 A simple program using array.
 Referring to individual elements of
the array.

12 The Arrays Construct II:


 Operation on arrays – simple sorting and
Searching.
 Passing arrays to the functions as
argument.
 Initializing a two-Dimensional array.
 Multidimensional arrays
The String Construct I:
 String and String constant.
 String variables.
 The string I/O functions gets() and puts()
 Initializing strings.
13 The String Construct II: Projects
 String handling library functions:
 strlen()
 strcpy()
 strcat()
 strcmp()
The Pointers Construct:
 Concept of pointers.
 Pointers overview.
 Pointer declaration and control.
 Pointer operator (& and *).
 Parameter passing by pointers.
Quiz
14 The Structures Construct: Presentations
 Why use structures.
 Structures declaration.
 Structure variables declaration.
 Initializing structure variables.
 Accessing structures elements.
 Referencing structure members.
The Structures and Union Construct:
 Nested structures.
 Uses of structures.
 Concept of Unions.
 Unions vs. structures.
 Unions of structures.

15 The file Handling I:


 Basic of files.
 Types of Disk I/O.
 Standard Input/output.
 Binary Mode and Text Mode.
 File operators.
 End-Of-File.
The file Handling II:
 Opening and closing a file.
 Writing to a file.
 Reading from a file.
 Error condition.
 Record input/output.
16 Presentations:
Demonstration of student’s projects
Presentations:
Demonstration of student’s projects
Revisions :
 Tying-up loose ends.

You might also like