31
Superior University

Subject: - mcsandmit.files.wordpress.com€¦ · Web viewThis course offers an elementary grasp of the fundamentals of computing techniques and applications. ... C++ Programming:

Embed Size (px)

Citation preview

Superior University

Programming FundamentalsModule Handbook

3(2, 1)

Lesson Plan Guideline

Table of Contents1 Course Delivery Arrangements.........................................................................................32 Course Instructors..............................................................................................................33 Course Introduction...........................................................................................................44 Course Objectives..............................................................................................................45 Course Coverage................................................................................................................46 Students Gain.....................................................................................................................5

6.1 Knowledge and Comprehension.................................................................................57 Teaching and Learning Methodology................................................................................5

7.1 Lectures:......................................................................................................................57.2 Labs.............................................................................................................................67.3 Assessments:...............................................................................................................6

7.3.1 Assignments.........................................................................................................67.3.2 Quizzes................................................................................................................67.3.3 Project..................................................................................................................6

7.4 Assessment Details and Policies.................................................................................68 Lecture plan.......................................................................................................................79 Grading of course............................................................................................................1410 Academic & Disciplinary Policies...................................................................................1411 Late Submission:.............................................................................................................14

11.1 Absenteeism:.........................................................................................................1411.2 Scholastic Honesty:...............................................................................................1411.3 Plagiarism..............................................................................................................14

12 Class Rules and Regulations............................................................................................1513 Assessment GPA and Percentages...................................................................................1614 Sample Papers..................................................................................................................17

14.1 Mid-Term Paper....................................................................................................1714.2 Final Term Paper...................................................................................................21

2 | P a g e

Lesson Plan Guideline

1 Course Delivery Arrangements

2 Course Instructors

Module LeaderName Rehan AhmadModule Tutors

Name

Syed Tanweer Shah BukhariSyed Ali Nauman GilaniHafiz ShahzadRehan Ahmad

Contact [email protected]@superior.edu.pk

Room and Building Department of CS & ITConsultation Hours 11:00 am - 12:30 pm

02:00 pm - 03:00 pm

3 | P a g e

Course Programming FundamentalsCredit Hours 3 ( 2, 1 )Lecture Duration 3 hours per weekSemester Duration 15 weeks

Lesson Plan Guideline

3 Course Introduction

This course offers an elementary grasp of the fundamentals of computing techniques and applications. Apart from general computing concepts it focuses on developing a problem solving approach in the students and concentrates on formulation of algorithms and translating them into structured C++ programs.

Program: BS TC, BS CS, BS SE, BS IT, MIT ,MCSSemester: 1 Session: 2013-14Follow Up: Object Oriented Programming

Text Book:

Computer Science: A Structured Programming Approach using C++ by Behrouz A. Forouzan, Richard F. Gilberg

C++ How to Program , 4th Edition by by Deitel and Deitel C++ Programming: Program Design Including Data

Structures Problem solving in C++ by D.S. Malik

4 Course Objectives

This course provides an introduction to the art of computing. The course objectives are to understand relationships between computation, problem solving, and programming using high-level languages. This will cover basic structures of C/C++ programming and then take you to high level concepts. Emphasis is on problem solving using algorithmic development methods.

5 Course Coverage

Introduction to Problem Solving Introduction to C++ Language Variables and Data Types Control Structures in C++ Loops File handling Functions Arrays C-Strings Pointers

4 | P a g e

Lesson Plan Guideline

6 Students Gain

ClassificationTeaching and learning methodology

Assessment

6.1 Knowledge and Comprehension Understand the basic knowledge

about C++. Learn how to make Program in

C++. Understand programming

concepts such as variables, conditional, loops and arrays, functions and file handling.

Weekly programming assignments that test the knowledge and improve the programming skills of students.

Students gain knowledge and understanding through lectures and self-directed study. Class activities will be used to enhance their understanding of the concepts. Comprehension will be improved through various written and oral tests.

Students’ knowledge and understanding will be assessed through: quizzes, tests, mid-term paper final term viva and exam paper.

Application and Skills

To develop programming skills in students from problem analysis to program design.

To enable students to use functions and arrays.

Enable students to appreciate the concepts of file handling.

Enable students to differentiate between pass by value and pas by reference.

Written exercises and resource based learning will help students in strengthening their research skills and applying those skills to achieve various academic endeavors.

Students’ practical skills will be assessed by: viva; quizzes and final term paper.

Analysis and SynthesisAble to relate different programming concepts with the real world complex problems.

Students will learn summarizing and synthesizing skills through participating in lectures discussions. Analytical skills will be learnt through self-study, classroom activities and viva.

Students skills are measured through tests, viva and classroom activities.

7 Teaching and Learning Methodology

7.1 Lectures:

5 | P a g e

Lesson Plan Guideline

1 Lectures seek to make accessible to students the module and program aims in addition to crucial background and factual knowledge.

2 Interactive Lectures will introduce the concepts, theories, and application of the subject using relevant examples.

3 The lectures will also be used to discuss the problems of programming in general and the relevant problem solving theories.

4 Students will be asked questions, often in the form of short activities and are expected to discuss material from previous weeks.

5 Students would be free to ask any question related to the subject matter during and after lectures.

7.2 LabsProgramming labs will be conducted with focus on hands-on computer

programming.

7.3 Assessments:

7.3.1 AssignmentsWeekly assignments will be given to the students related to topics discussed in

class.

7.3.2 QuizzesShort quizzes of 10 to 15 mins duration will be conducted to evaluate the

performance of students and to help them identify their problem areas.

7.3.3 ProjectStudents will implement a game using programming concepts learned in the

course.

7.4 Assessment Details and Policies

Up to Mid Term: Assignments + Quizzes : 10%

Mid Term Paper : 20% 30%

After Mid Term:Assignments + Quizzes : 15%Final Term Project (Project + Viva) : 15%Final Paper : 40%

70%

6 | P a g e

Lesson Plan Guideline

8 Lecture plan

Session Topics Session Objective Student Gain Lecture Break upIntroduction to Problem Solving

Week 1

Introduction to Programming & Problem Solving How to approach a problems and write a program

To build basic understanding of programming and problem solving.

Students will have the basic understanding of how to attack a problem and how to solve it.

Lecture 1Ice breaking session 10 min

Module discussion 10 min

Lecture 40 min

Question/Answers 10 min

Attendance 5 min

Lecture 2

Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 minClass Activity: Practice Session

Assignment: Assignment I: Logic Building and Problem Due in week 3

Introduction to C Language

Week 2

C Program Structure Input/ Output Libraries Memory concepts

To understand the program structure, how to take input and print results.

Enable students to take input from user and present the output on screen.

Lecture 3

Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 min

Lecture 4

Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 minClass Activity: Practice Session

7 | P a g e

Lesson Plan GuidelineIntroduction to C Language (cont.)

Week 3

Variables Data Types Assignment Statement Arithmetic Operators and Operator Precedence Logic Building and algorithmic development

Enable students to understand the importance of arithmetic operator and their precedence.

Students will be able to differentiate between different data types.

Lecture 5

Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 min

Lecture 6

Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 minActivity: Quiz 1 on problem solving, arithmetic operators and operator precedence and logical operators & logical expressions

Control Structures in C

Week 4

Relational Operators Logical Operators & Logical Expressions Short Circuit Evaluation of Logical Expressions Selection Statements if, if-else

Enable students to understand the importance of relational and logical operators.

Students will be able to use and evaluate selection statements.

Lecture 7

Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 min

Lecture 8

Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 minClass Activity: Practice Session

8 | P a g e

Lesson Plan GuidelineControl Structures in C (cont.)

Week 5

Nested if Statement Switch Statements

To build the basic understanding of control statements.

Students will be able to use nested selection statements.

Lecture 9

Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 min

Lecture 10

Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 minActivity: Practice SessionAssignment: Assignment II: Nested if Statement due in week 6

Control Structures (Loops)

Week 6

While Loop Counter Controlled While Loops Sentinel Controlled While Loops

To build the basic understanding of control statements.

Students will be able to appreciate the concept of loops and the use of while loops to solve problems.

Lecture 11

Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 min

Lecture 12

Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 minActivity: Quiz 2 selection statementsAssignment: Assignment III: Loops due in week 7

9 | P a g e

Lesson Plan GuidelineControl Structures (Loops) (cont.)

Week 7

For Loop Do While Loop

To build the basic understanding of control statements.

Students will be able to use for loop and do while loop to solve problems.

Lecture 13

Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 min

Lecture 14

Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 minActivity: Practice Session

Week 8 Mid-Term ExamControl Structures (Loops) (cont.)

Week 9 Break and Continue Nested Loops

. To build the basic understanding of control statements.

Students will be able to use break and continue statements and nested loops

Lecture 17Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 min

Lecture 18Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 minActivity: Practice Session

10 | P a g e

Lesson Plan GuidelineFile handling

Week 10

Basics of files and different streams associated with files Types of files Creating a file Input/output to a file

To understand concepts of file handling.

Enable students to take input from file and write the result back to file.

Lecture 19

Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 min

Lecture 20

Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 minActivity: Practice SessionAssignment: Phase I of Final Term Project due date week 11

Functions

Week 11

Pre-defined Functions Value Returning Functions Void Functions Functions Parameters Static and Automatic Variables

To understand pre-defined and user-defined functions.

Enable students to differentiate between pre-defined, value returning and void functions.

Lecture 21

Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 min

Lecture 22

Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 minActivity: Practice SessionAssignment: Phase II of Final Term Project due date week 12

11 | P a g e

Lesson Plan GuidelineFunctions (cont.)

Week 12

Function Overloading Functions with default parameters Parameter passing in functions Pass by value Pass by Reference

Enable students to differentiate between pass by value and pass by reference.

Students will be able to do function overloading and implement functions with default parameters.

Lecture 23

Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 min

Lecture 24

Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 minActivity: Practice SessionAssignment: Phase III of Final Term Project due date week 13

Array

Week 13

Arrays introduction One-Dimensional Array Arrays as parameter to functions

To the understand the working and basic science behind array.

Students will be able to implement one dimensional array.

Lecture 25

Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 min

Lecture 26

Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 minActivity: Practice SessionAssignment: Phase IV of Final Term Project due date week 14

12 | P a g e

Lesson Plan GuidelineC-String

Week 14 String Comparison Reading and Writing Strings

To understand about string and string comparison.

Enable students to do string comparison.

Lecture 27

Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 min

Lecture 28

Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 minActivity: Practice SessionAssignment: Phase IV of Final Term Project due date week 15

Pointers & Revision Week

Week 15

Definition and initialization Pointer operators Concepts of memory referencing and

dereferencing Accessing memories through pointers Passing arguments to function using pointers

To understand pointer operations, memory referencing and dereferencing and functions using pointers.

Students will be able to pass arguments to functions using pointers and will understand the concepts of memory referencing and dereferencing.

Lecture 29

Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 min

Lecture 30

Review of previous session 15 min

Lecture 45 min

Question/Answers 10 min

Attendance 5 min

Final-Term Exam

13 | P a g e

Lesson Plan Guideline

9 Grading of course

Sr.# Contents WeightagePre-Mid Assessment1 Assignment 10%2 Mid Term Exam 20%Post-Mid Assessment3 Final Project 30%4 Final Term Exam 40%Overall Percentage 100%

10 Academic & Disciplinary Policies

11 Late Submission:

According to the University policy, an assignment submitted after the due date, without an

approved extension, will be penalized at the rate of 20% deduction of the possible maximum

marks of the assessment item. This policy is applicable till the next working day after due

date and time of assignment. Assignments submitted after this will be awarded zero marks.

11.1 Absenteeism:Late coming and shortage in attendance i.e. 3 continual absents from class, ensure that

students will be struck off from the relevant subject. It is not acceptable for you to disturb the

class by entering late. If you are unavoidably late, then please wait outside until the lecturer

indicates you may come in.

11.2 Scholastic Honesty:Superior University expects each student to do his/her own work. The University has "zero

tolerance" for cheating, plagiarism, unauthorized collaboration on quizzes and papers, using

"notes" during exams, submitting someone else's work as one's own, submitting work

previously submitted for another course, or facilitating acts of academic dishonesty by others.

The penalties are severe!

11.3 PlagiarismUniversity policy prohibits students plagiarizing, collusion, copying and ghost writing any

material under any circumstances. A student plagiarizes if he or she presents the thoughts or

works of another as one’s own. This definition may include:

Using another’s ideas without due acknowledgement;14 | P a g e

Lesson Plan Guideline

Working with others without permission and presenting the resulting work as

though it was completed independently.

Aiding another student to plagiarize is also a violation of the plagiarism Policy

and may invoke a penalty.

12 Class Rules and Regulations

All mobile phones must remain switched off (not kept on silent / vibration mode) for

the entire duration of a class. Any breach of this rule will lead to immediate

confiscation of the phone, which will only be returned after the semester is over.

No food, drinks, bubble gum or beetle-nut will be allowed inside the classroom.

In order to maintain the sanctity and decorum on the University Campus, all male

and female students are required to be dressed in a decent and appropriate manner.

Please note carefully that under no circumstances you will be allowed to attend

classes in a casual and shabby getup, for example, dirty and unironed clothes. The

University shall take a particularly stern view of any kind of immodest and revealing

clothes, such as shalwar-qameez with long slits, shirts with low necklines, skirts and

tight or torn jeans. Male students may wear shalwar-qameez with waist-coat and

sandals with straps.

Cheating, plagiarism, offensive language and disruptive behavior will be addressed

according to policies for academic misconduct mentioned in the Students’ Handbook.

A student must have maximum participation in class lecture and activities. He/she

should think critically to make effective arguments during the class.

Give respect to your class mates in terms of their opinions and arguments. A student

is encouraged to make opposing argument but maintain class decorum cannot be

ignored.

A 15-minute break will be given. Any student coming late or returning late after the

break will be considered absent for that day.

In case of cancellation / makeup of a class you shall be notified through the program

manager or class coordinator.

If you fail to attend at least 90% of the sessions you will receive an F grade for the

module

15 | P a g e

Lesson Plan Guideline

13 Assessment GPA and Percentages

(80-100%) This is an outstanding standard indicating comprehensive knowledge and understanding

of the relevant materials; demonstration of an outstanding level of academic ability;

mastery of skills (as identified in the assessment task); and achievement of all

assessment objectives.

(70-79%) This is an excellent standard indicating a very high level of knowledge and

understanding of the relevant materials; demonstration of a very high level of

academic ability; sound development of skills (as identified in the assessment task);

and achievement of all assessment objectives.

(60-69%) This is a very good standard indicating a high level of knowledge and understanding

of the relevant materials; demonstration of a high level of academic ability; reasonable

development of skills (as identified in the assessment task); and achievement of all

assessment objectives.

(50-59%) This is a satisfactory standard indicating an adequate knowledge and understanding of

the relevant materials; demonstration of an adequate level of academic ability;

satisfactory development of skills (as identified in the assessment task); and

achievement of most assessment objectives.

Fail (less than 50%)

This is an unsatisfactory standard indicating an inadequate knowledge and

understanding of the relevant materials; insufficient evidence of academic

ability; failure to develop skills (as identified in the assessment task); and

failure to achieve assessment objectives.

16 | P a g e

Lesson Plan Guideline

14 Sample Papers

14.1 Mid-Term Paper

1. SAMPLE FINAL PAPER:

Name: ______________

Roll No: _____________

Date: _______________

Time Allowed: 10 mins.

Q1: Encircle the correct answer. (2)

In C++, ________________are names of things. variables

identifier

keyword

integer

The stream objects cin and cout are included in which header file? istream.h

fstream.h

ostream.h

iostream.h

17 | P a g e

Programming FundamentalsMid Term Exam

Objective(BCS & BTC-1)

Department: CS&IT Total Marks: 10 Course Instructor: Ali Nauman Gilani Obtained Marks: _______________ __________

Instructions: 1. Do not cut or overwrite the answer.

2. Encircle only one option for all MCQ questions.

3. Please encircle the correct option in True/False question.

Lesson Plan Guideline

Q2: Circle T if the statement is true or F if the statement is false. (2)

The addition operator (+) has more precedence than multiplication operator (*). T F

All variables must be declared before they can be used. T F

Q4) Suppose a is an int variable and b = 6 . What value is of a: (6)

a = (b+ +) + 3

18 | P a g e

Lesson Plan Guideline

Name: ______________

Roll No: _____________

Date: _______________

Time Allowed: 90mins.

Q1) Write a program that takes as input given lengths expressed in feet and inches. Theprogram should then convert and output the lengths in centimeters. Assume that thegiven lengths in feet and inches are integers. (10)

Q2) Write a program that takes as input any change expressed in cents. It should thencompute the number of half-dollars, quarters, dimes, nickels, and pennies to bereturned, returning as many half-dollars as possible, then quarters, dimes, nickels,and pennies, in that order. (10)

Q3) This programming example demonstrates a program that calculates a customer’s bill for a local cable company. There are two types of customers: residential and business. There are two rates for calculating a cable bill: one for residential customers and one for business customers. (20)

For residential customers, the following rates apply:• Bill processing fee: $ 4.50• Basic service fee: $20.50• Premium channels: $7.50 per channel.

For business customers, the following rates apply:• Bill processing fee: $ 15.00• Basic service fee: $ 75.00 for first 10 connections, $ 5.00 for each additional connection• Premium channels: $50.00 per channel for any number of connections.

19 | P a g e

Programming FundamentalsMid Term Exam

Subjective(BCS & BTC-1)

Department: CS&IT Total Marks: 40 Course Instructor: Ali Nauman Gilani Obtained Marks: _______________ __________

Instructions: If you want to cut something cut it properly and rewrite again.

Lesson Plan Guideline

The program should ask the user for an account number (an integer) and a customercode. Assume that R or r stands for a residential customer, and B or b stands for abusiness customer.

20 | P a g e

Lesson Plan Guideline

14.2 Final Term Paper

Name: ______________

Roll No: _____________

Date: _______________

Time Allowed: 15 mins.

Q1) What is the output of the following code? (6)int num = 1;while (num < 10){ cout << num << " "; num = num + 2;}cout << endl;

Q2) Circle T if the statement is true or F if the statement is false. (4)

An EOF-controlled while loop continues to execute until the program detects the end-of-file marker.

T F

When the program executes, the execution always begins with the firststatement in the function main .

T F

All variables must be declared before they can be used. T F

The body of the while loop must contain a statement that eventually setsthe expression to false

T F

21 | P a g e

Introduction to ProgrammingFinal Term Exam

Objective

Department: CS&IT Total Marks: 10 Course Instructor: Ali Nauman Gilani Obtained Marks: _______________ __________

Instructions: 4. Do not cut or overwrite the answer.

5. Please encircle the correct option in True/False question.

Lesson Plan Guideline

Name: ______________

Roll No: _____________

Date: _______________

Time Allowed: 90mins.

Q1) Design a program to read floating-point values from a file even.txt until end-of-file. (20)

Q2) Write a program that take 10 values from the user and add them. Also calculate the average of these 10 values. (20)

Q3) You are supposed to write a program for a Hotel to make bills for the customers. To print a bill for a customer, the program takes as input the number of days the customer stayed, category of room reserved by the customer and the number of meals taken by the customer. The program should then perform the following tasks to make a bill.

The bill includes room charges, meal charges and taxes. The charges are calculated as follows:

Room Charges: There are 4 categories A, B, C and D of rooms. Room charges apply according to the category of the room. The charge for a room is the product of the number of days a customer stayed and rate per day. The rate per day is as follows:

Category Rate per day

A Rs.1000

B Rs.2000

C Rs.4000

D Rs.8000

22 | P a g e

Introduction to ProgrammingMid Term Exam

Subjective

Department: CS&IT Total Marks: 90 Course Instructor: Ali Nauman Gilani Obtained Marks: _______________ __________

Instructions: 6. If you want to cut something cut it properly and rewrite again.

Lesson Plan Guideline

Meal Charges: Each meal costs Rs. 80. Meal charges are the product of the number of meals taken by customer and cost of meal.

Tax: Tax on the bill is the total of basic tax and stay tax. Basic tax is 10% of total of room and meal charges. Stay tax is fixed at Rs. 40 per day. It is the product of 40 and number of days of stay.

The bill for the customer is the total of room charges, meal charges and tax.

Write functions for each of the above tasks. (30)

Q3) Write a program that print the following triangle: (20)

* * * * * * * * * * * * * * *

23 | P a g e