Computer Programming

Paper Code: 
PHY-114
Credits: 
3
Contact Hours: 
45.00
Max. Marks: 
100.00
Objective: 

This course will enable the students to -

This module is designed to acquaint the students with the basics of C++ programming language, a useful tool to investigate theoretically problems in different areas of Physics. 

Course Outcomes (COs):

Course

Learning outcome (at course level)

Learning and teaching strategies

Assessment Strategies

Paper Code

Paper Title

PHY  114

Computer Programming (Theory)

 

The students will be able to –

CO20: Describe and compare machine language and a high level language; source code, object code and executable code.

CO21: Understand the concept of data abstraction and encapsulation and describe the function of the compiler in the language translation process.

CO22: Demonstrate an understanding of algorithms in the problem-solving process, Identify the necessary properties of good problem-solving techniques.

CO23: Create and analyze algorithms for solving simple problems.

CO24: Apply techniques of structured (functional) decomposition to decompose problem and a program solution into smaller pieces.

CO25: Design and implement code that includes the reuse of both existing code and calling functions in the C/C++ libraries.

CO26: Demonstrate an understanding of scope, lifetime and duration rules for variables and functions.

CO27: Learn how to overload functions and operators in C++.

CO28: The student will develop sufficient knowledge of programming with C/C++, so as to write down programs for different Physics related problems and run to same to obtain useful output. 

Approach in teaching:

Interactive Lectures, Discussion, Tutorials, Reading assignments, Demonstration. Solving problems in tutorials. 

 

 

Learning activities for the students:

Self-learning assignments, Effective questions, Simulation, Seminar presentation, performing given tasks, practicals, small animated games develop

Additional learning through MOOCs course on SWAYAM/NPTEL

 

Class test, Semester end examinations, Quiz, Solving problems, Assignments, Presentation

 

9.00
Unit I: 
Introduction to OO Paradigm
Introduction to OO Paradigm, Structured Versus object oriented programming, Objects and Class, features of object oriented language(encapsulation ,data abstraction ,inheritance, Object composition, Polymorphism)Merits & demerits of OO methodology, Hello World Program and C++ program structure.
Data Types, Operators: Tokens ,identifiers and keywords, data types and size, Variables , Variable definition and initialization, constants, Operators (Arithmetic, Relational ,logical , Compound assignment, Increment ,decrement and conditional operator).
9.00
Unit II: 
Expression and Precedence
Expression and Precedence : Arithmetic, Relational, logical  Expression, Operator Precedence and associatively, promotion and type casting, Different types of comments  
Control Flow: Statement and blocks, if statement, if–else statement, Nested if–else statement, Switch statement, Break, continue statement, While, for and do-while loops, Scope and Visibility control Modifier.
Arrays and Functions:  Arrays, operations on Arrays, Multi-Dimensional Arrays, Strings, Strings manipulations and Arrays of strings, functions, Parameter passing, Return by reference, inline functions, Arrays and functions. Library functions.
9.00
Unit III: 
Data Structure:One and two Dimensional arrays
Data Structure:One and two Dimensional arrays: Sequential allocation and address calculation; One dimensional array: Traversal, Searching (Linear, Binary Search), Insertion of an element in an array, deletion of an element from an array, Sorting (Insertion,Selection, Bubble sort), concatenation of two linear arrays, merging of two sorted  arrays; Two-dimensional arrays: Traversal, Finding sum/difference of two nxm arrayscontaining numeric values, Interchanging Row and Column elements in a twodimensional array;
Stack (Array and Linked implementation of Stack):Operations on Stack (PUSH and POP) and its Implementation in C++,Converting expressions from INFIX to POSTFIX notation and evaluation of Postfix expression.
Queue: (Circular Array and Linked Implementation):Operations on Queue (Insert and Delete) and its Implementation in C++.
9.00
Unit IV: 
Classes and Objects
Classes and Objects: Class specification, Class Objects, Accessing Class Members, Constructors, parameterized constructors, constructor overloading, copy constructor, Order of Constructor and destructor, Static data members.     
Defining member function outside member function as inline, Accessing Member function within class, Data Hiding ,Passing object to functions and returning Objects from functions, friend functions and friend classes.
9.00
Unit V: 
Inheritance

Inheritance: Introduction, Form of inheritance, Derive class declaration, inheritance and member accessibility, Constructor invocation, Function overloading, Member function overloading, Multi level inheritance, Multiple inheritance, Multi path inheritance, Hybrid Inheritance.

Essential Readings: 
  • SumitaArora&GautamSarkar, “Computer Science C++” ,DhanpatRai& Co,1999.
  • A.R.Venugopal, Rajkumar, T. Ravishanker, “Mastering C++”, TMH, 1997.
  • YashwantKanetkar , “Let us C++”, BPB Publications
  • R. Lafore, “Object Oriented Programming using C++”, Galgotia Publications, 2004.
  • D .Parasons, “Object Oriented Programming with C++”, BPB Publication.
  • Schildt Herbert, “C++: The Complete Reference”, 4th Ed., Tata McGraw Hill, 1999.
  • S. B. Lippman& J. Lajoie, “C++ Primer”, 3rd Edition, Addison Wesley, 2000.
Academic Year: