PROGRAMMING WITH C++ AND APPLICATIONS OF MATLAB

Paper Code: 
PHY 222
Credits: 
04
Contact Hours: 
60.00
Max. Marks: 
100.00
Objective: 
  • To impart the basic knowledge of computers and C++ Programming
  • To make the students learn essential aspects of a programming language, numerical  techniques and their applications in a variety of Physics problems

                     Course

Learning outcome (at course level)

Learning and teaching strategies

Assessment Strategies

Paper Code

Paper Title

PHY 222

Programming With C++ and Applications of Matlab

 

 

After the completion of this course the student should 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

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

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

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

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

 

12.00

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

 

 

References: 

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.

  1.  “Numerical Methods using MATLAB.”, John H. Mathews and Kurtis D. Fink, PHI

 

Academic Year: