PROGRAMMING WITH C++ AND APPLICATIONS OF MATLAB

Paper Code: 
PHY 222
Credits: 
4
Contact Hours: 
60.00
Max. Marks: 
100.00
Objective: 

This course will enable the students to –

  1. To impart the basic knowledge of computers and C++ Programming
  2. To make the students learn essential aspects of a programming language, numerical  techniques and their applications in a variety of Physics problems

Course Outcomes (COs):

                     Course

Learning outcome (at course level)

Learning and teaching strategies

Assessment Strategies

Paper Code

Paper Title

PHY 222

Programming 

The students will be able to-

CO 44: To gain Knowledge about the difference between the top-down and bottom-up approach.

 

CO 45: Describe the object-oriented programming approach in connection with C++.

 

CO 46:  Apply the concepts of object-oriented programming.

 

CO 47: Choose appropriate data structures to represent data items in real world problems.

 

CO 48: Analyze the time and space complexities of algorithms

 

CO 49: Design programs using a variety of data structures such as stacks and queues.

 

CO 50: Analyze and implement various kinds of searching and sorting techniques.

 

CO 51: To learn Curve fitting using Matlab and spline function.

 

CO 52: Learn about various interpolating and extrapolating methods.

 

CO 53: Find numerical solutions of system of linear equations and check the accuracy of the solutions using Matlab.

 

CO 54: The student will learn C++ language and MATLAB to the extent, she can apply these techniques to problem solving in Physics, pertaining to P.G. Programme and research.

 

 

Additional learning through online videos

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

 

 

 

12.00
Unit I: 
I
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), operator precedence and associativity, Integer overflow and underflow, simple programs, Conditional Statements and Integer Types, Enumeration types. 
 
12.00
Unit II: 
II
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, Function declaration & definitions, local variables & functions, void functions, Parameter passing, Return by reference, inline functions, overloading , Arrays and functions. main ( ), exist ( ) functions, Array declaration and initializing, processing Arrays, passing an Array to a function, the Linear search and Bubble sort algorithm, binary search algorithm, using arrays with enumeration types, Multidimensional Arrays, Library functions.
 
 
12.00
Unit III: 
III

Pointers & References: Pointers declaration, pointer operator, address operator, pointer arithmetic’s References, Derived types, Arrays & pointers, the new operator, the delete operator, dynamic arrays, Arrays of pointers and pointers to Arrays, Pointers to Pointers. Pointers functions, call by value, call by References. 

Classes and Objects: Introduction, class declaration, Class Objects, Accessing Class Members, Constructors, constructor initialization, Private member function, class constructor, parameterized constructors, constructor overloading, copy constructor, Order of Constructor and destructor, Static data members.      
Pointers to object.Stream I/O:-Stream classes, the ios class, ios format flags, ios state variables, the istream & ostream classes, unformatted input functions. 
 
    
                                                    
12.00
Unit IV: 
IV
Curve fitting using MATLAB: Least square line, Methods of curve fitting, Interpolation by Spline functions, Fourier series and trigonometric polynomials, Bezier curve
 
Unit V: 
V

Numerical Integration using MATLAB: Introduction to Quadrature, Composite trapezoidal and Simpson’s Rule, Recursive rules, Adaptive Quadrature, Gauss-Legendre Integration

 
 

BOOKS RECOMMENDED:

  • A.R.Venugopal, Rajkumar, T. Ravishanker, “Mastering C++”, TMH, 2012(Reprint)
  • Yashwant Kanetkar , “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.
  •  “Numerical Methods using MATLAB.”, John H. Mathews and Kurtis D. Fink, PHI

                                                        
References: 
 
 
Academic Year: