Programming With C++ and Applications of Matlab

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

Course Objectives:
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 outcomes

(at course level)

Learning and teaching strategies

Assessment

Strategies

PAPER CODE

Paper Title

PHY 222

 

 

Programming With C++ and Applications of Matlab

(Theory)

 

 

 

The students will be able to:

CO37: gain knowledge about the difference between the top-down and bottom-up approach and describe the object-oriented programming approach in connection with C++.

CO38: choose appropriate data structures to represent data items in real world problems and analyze the time and space complexities of algorithms.

CO39: design programs using a variety of data structures such as stacks and queues.

CO40: to learn Curve fitting using Matlab & spline function and various interpolating and extrapolating methods.

CO41: develop the knowledge of C++ language and MATLAB extension and will be able to apply these techniques to problem-solving in basic research field.

Approach in teaching:

Additional learning through online videos

 

Learning activities for the students:

Practical assignments, Simulation,

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

 

12.00
Unit I: 
UNIT 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: 
UNIT 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: 
UNIT 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: 
UNIT IV

Curve fitting using MATLAB: Least square line, Methods of curve fitting, chi-square test, Interpolation by Spline functions, Fourier series and trigonometric polynomials, Bezier curve

12.00
Unit V: 
UNIT V

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

Essential Readings: 

1.    A.R.Venugopal, Rajkumar, T. Ravishanker, “Mastering C++”, TMH, 2012(Reprint)
2.    Yashwant Kanetkar , “Let us C++”, BPB Publications
3.    R. Lafore, “Object Oriented Programming using C++”, Galgotia Publications, 2004.
4.    D . Parasons, “Object Oriented Programming with  C++”, BPB Publication.
5.    Schildt Herbert, “C++: The Complete Reference”, 4th Ed., Tata McGraw Hill, 1999.
6.    S. B. Lippman & J. Lajoie, “C++ Primer”, 3rd Edition, Addison Wesley, 2000.
7.     “Numerical Methods using MATLAB.”, John H. Mathews and Kurtis D. Fink, PHI

 

Academic Year: