Programming in C++ Lesson Plan OPERATORS

Similar documents
BCS2B02: OOP Concepts and Data Structures Using C++

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement?

PROBLEM SOLVING SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON

The C Programming Language course syllabus associate level

Laboratory Assignments of OBJECT ORIENTED METHODOLOGY & PROGRAMMING (USING C++) [IT 553]

Course Name: ADVANCE COURSE IN SOFTWARE DEVELOPMENT (Specialization:.Net Technologies)

C++ INTERVIEW QUESTIONS

Multichoice Quetions 1. Atributes a. are listed in the second part of the class box b. its time is preceded by a colon. c. its default value is

ALLIED PAPER : DISCRETE MATHEMATICS (for B.Sc. Computer Technology & B.Sc. Multimedia and Web Technology)

KITES TECHNOLOGY COURSE MODULE (C, C++, DS)

RARITAN VALLEY COMMUNITY COLLEGE ACADEMIC COURSE OUTLINE. CISY 105 Foundations of Computer Science

WORKSPACE WEB DEVELOPMENT & OUTSOURCING TRAINING CENTER

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C

Fundamentals of Java Programming

I PUC - Computer Science. Practical s Syllabus. Contents

Summit Public Schools Summit, New Jersey Grade Level / Content Area: Mathematics Length of Course: 1 Academic Year Curriculum: AP Computer Science A

B.Sc. (Computer Science) First Year

C++ Programming Language

Object Oriented Programming With C++(10CS36) Question Bank. UNIT 1: Introduction to C++

10CS35: Data Structures Using C

CEC225 COURSE COMPACT

El Dorado Union High School District Educational Services

arrays C Programming Language - Arrays

Subject Name: Object Oriented Programming in C++ Subject Code:

ADVANCED SCHOOL OF SYSTEMS AND DATA STUDIES (ASSDAS) PROGRAM: CTech in Computer Science

Operator Overloading. Lecture 8. Operator Overloading. Running Example: Complex Numbers. Syntax. What can be overloaded. Syntax -- First Example

Boolean Expressions, Conditions, Loops, and Enumerations. Precedence Rules (from highest to lowest priority)

Java (12 Weeks) Introduction to Java Programming Language

COMPUTER SCIENCE. Paper 1 (THEORY)

Syllabus for Computer Science. Proposed scheme for B.Sc Programme under Choice Based Credit System

PES Institute of Technology-BSC QUESTION BANK

FLORIDA STATE COLLEGE AT JACKSONVILLE COLLEGE CREDIT COURSE OUTLINE. Introduction to Programming with Visual Basic.NET

UIL Computer Science for Dummies by Jake Warren and works from Mr. Fleming

B.Sc.(Computer Science) and. B.Sc.(IT) Effective From July 2011

C++FA 5.1 PRACTICE MID-TERM EXAM

Certified PHP Developer VS-1054

Objected oriented Programming: C++ Unit 1 1. Introduction 1.1. Introduction to Object Oriented Programming C++ fundamentals.

: provid.ir

Today. Binary addition Representing negative numbers. Andrew H. Fagg: Embedded Real- Time Systems: Binary Arithmetic

1 p a g e 1 1. Syllabus of 3 rd Semester of B.Tech. Information Technology (Batch 2014 Onwards)

Data Structures Using C++ 2E. Chapter 5 Linked Lists

Chapter 4 OOPS WITH C++ Sahaj Computer Solutions

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING LESSON PLAN

Storage Classes CS 110B - Rule Storage Classes Page 18-1 \handouts\storclas

An Introduction to Programming and Computer Science

Chapter 2: Elements of Java

Object Oriented Software Design II

Glossary of Object Oriented Terms

13 Classes & Objects with Constructors/Destructors

Curriculum Map. Discipline: Computer Science Course: C++

Keywords are identifiers having predefined meanings in C programming language. The list of keywords used in standard C are : unsigned void

Java Application Developer Certificate Program Competencies

IS0020 Program Design and Software Tools Midterm, Feb 24, Instruction

Programming and Software Development (PSD)

C++ Language Tutorial

JAVA - QUICK GUIDE. Java SE is freely available from the link Download Java. So you download a version based on your operating system.

Syllabus OBJECT ORIENTED PROGRAMMING C++

Classes and Objects in Java Constructors. In creating objects of the type Fraction, we have used statements similar to the following:

How To Teach C++ Data Structure Programming

PROGRAMMING IN C PROGRAMMING IN C CONTENT AT A GLANCE

AP Computer Science Java Mr. Clausen Program 9A, 9B

Course Title: Software Development

Sample Problems. Practice Problems

Chapter 5 Functions. Introducing Functions

9 Control Statements. 9.1 Introduction. 9.2 Objectives. 9.3 Statements

C++ Overloading, Constructors, Assignment operator

Introduction to Programming System Design. CSCI 455x (4 Units)

Logic in Computer Science: Logic Gates

JavaScript: Control Statements I

Bangalore University B.Sc Computer Science Syllabus ( Semester System)

Objectif. Participant. Prérequis. Remarque. Programme. C# 3.0 Programming in the.net Framework. 1. Introduction to the.

Java Interview Questions and Answers

Keil C51 Cross Compiler

INFORMATION BROCHURE Certificate Course in Web Design Using PHP/MySQL

Converting a Number from Decimal to Binary

Functions Recursion. C++ functions. Declare/prototype. Define. Call. int myfunction (int ); int myfunction (int x){ int y = x*x; return y; }

Specialized Programme on Web Application Development using Open Source Tools

Objective-C Tutorial

CpSc212 Goddard Notes Chapter 6. Yet More on Classes. We discuss the problems of comparing, copying, passing, outputting, and destructing

The D Programming Language

Sources: On the Web: Slides will be available on:

Facebook Twitter YouTube Google Plus Website

Chapter 7: Additional Topics

Simple C++ Programs. Engineering Problem Solving with C++, Etter/Ingber. Dev-C++ Dev-C++ Windows Friendly Exit. The C++ Programming Language

Object Oriented Software Design

C++FA 3.1 OPTIMIZING C++

Java SE 8 Programming

Cohort: BCA/07B/PT - BCA/06/PT - BCNS/06/FT - BCNS/05/FT - BIS/06/FT - BIS/05/FT - BSE/05/FT - BSE/04/PT-BSE/06/FT

CSE373: Data Structures and Algorithms Lecture 3: Math Review; Algorithm Analysis. Linda Shapiro Winter 2015

Recursion. Slides. Programming in C++ Computer Science Dept Va Tech Aug., Barnette ND, McQuain WD

MISRA-C:2012 Standards Model Summary for C / C++

University of Pune Revised Structure for the B. Sc. (Computer Science) Course (Second Year to be implemented from Academic Year )

5 Arrays and Pointers

Chapter 2 Introduction to Java programming

Moving from CS 61A Scheme to CS 61B Java

core. Volume I - Fundamentals Seventh Edition Sun Microsystems Press A Prentice Hall Title ULB Darmstadt

Object Oriented Software Design

Syllabus Introduction to C++ Programming and Numerical Analysis Spring 2016

Transcription:

Programming in C++ Lesson Plan Subject code: 10EC761 No.of hours: 52 Faculty: Lakshmi Naga Prasanna.R Exam Marks:100 Class No. Topic to be covered Chapter Title Part A 1 Getting started, the C++ program, Preprocessor Directives. 2 The Built-In Array Data Type. Unit 1 C++, AN OVERVIEW 3 Dynamic Memory Allocation and Pointers 4 An Object based Design, An Object-Oriented Design, 5 An Exception based Design. 6 An array. 7 Literal Constant, Variables. Unit 2 8 Pointer Types THE BASIC LANGUAGE: 9 String Types 10 Const Qualifier, Reference Types 11 The Bool Type, Enumeration types 12 Array Types. The vector Container Type. 13 Arithmetic Operators Unit 3 14, 15 Equality, Relational and Logical Operators, OPERATORS 16 Assignment Operators 17, 18 Increment and Decrement operator, The Conditional Operator, 19 Bitwise Operator, Bitset Operations 20 Statements: if, switch 21, 22 for Loop, while, break, goto, continue Statements. 23 Prototype Unit 4 24, 25 Argument passing, FUNCTIONS. 26 Recursion and linear (or inline) function. Part B 1

27, 28 Throwing an Exception, Unit 5 EXCEPTION HANDLING 29, 30 Catching an Exception 31 Exception Specifications 32 Exceptions and Design Issues. 33 Definition Unit 6 CLASSES 34 Class Objects 35 Class Initialization 36, 37 Class Constructor, The Class Destructor 38, 39 Class Object Arrays and Vectors. 40, 41 Overload Operators Unit 7 42, 43 Operators ++ and --, 44, 45 Operators new and delete. 46-48 Multiple Inheritances, Unit 8 49, 50 public, private & protected inheritance, 51, 52 Class scope under Inheritance. TEXT BOOK: T1. C++ Primer, S. B. Lippman & J. Lajoie, 3rd Edition, Addison Wesley, 2000. REFERENCE BOOKS: R1. C++ Program Design: An Introduction to Programming and Object- Oriented Design. Cohoon and Davidson, 3rd Edn. TMH publication. 2004. R2. Object Oriented Programming using C++, R. Lafore, Galgotia Publications, 2004. R3. Schaum s outlines, Programming with C++, J. R. Hubbard, Ph. D., 2 nd Edition, Tata McGraw-Hill, 2002. Assignments: Serial no. Question type To be submitted on * 1. Question Bank Unit 1, 2 and a part of 3. 2 weeks before T1. 2. Question Bank Unit 3, 4, 5 and a part of 6. 2 weeks before T2. 3. Question Bank Unit 6, 7. and 8 2 weeks before T3. Internal Test Portions: Test I : Unit 1, 2 and a part of 3. Test II: Unit 3-5, and a part of 6. Test III: Unit 6 8. 2

Question Bank Unit 1. C++, AN OVERVIEW 1. What are the advantages of object oriented languages over procedure oriented languages? 6M 2. List a few areas of application of OOP technology. 6M 3. What is enumerated data type?explain. 6M 4.What are preprocessor directives?what is their function? Give six examples of preprocessor directives. 5. With an example, explain the data types and variables in C++. **06M 6. Write a program to find the roots of a quadratic equation ax2+bx+c=0 using switch and CASE.7M 7.Write a single C++ statement that subtracts the sum of x and y from z and then increment y. 03 M 8.What is the difference b/w reserved word and a standard identifier? 3M 9.Write a single C++ statement that prints Too many if the variable count exceeds 100.. 03 marks 10.Describe the two ways to include comments in a C++ program. 03M 11. What will be the values of m and n in each of the following instruction execution: (i) m *= n++; (ii) m += --n; m=5 and n=2 before instruction execution. 06 marks 12. Evaluate each of the following expressions, assuming in each case that m has the value 25 and n has the value 7. (i) m%n (ii) m%n++ (iii) m%==n (iv) ++m n-- 06 marks 13.Explain the difference between the four objects defined below. (v) int ival=1024; (vi) int *pt2 = new int(1024); (vii) int *p1 = &ival; (viii) int *pi3 = new int[1024]; 06 marks Unit 2. The Basic Language 1. Give 1 example each for objects, lvalues, mutable lvalues and immutable lvalues. 06 marks 2. Give 5 examples of C++ keywords. 05 marks 3. What are the restrictions for variable names? Give one example of an illegal variable 02+01+01 marks name. The following variables india and India are different variable names. True/False? 4. Write a program to traverse an array with a pointer.. 06 marks 5.Write a c++ program to find the prime numbers between 200 and 500 using for loop. 6.What are manipulators.explain the usage of same with an example. 6M 6M Unit 3. Operators 1. Explain the various looping constructs available in C++ with their syntax. **07 marks 2. Write a C++ program to input a series of integer numbers and sum them and **08 marks terminate when the number is zero. i) using for loop ii) using while loop. 3. Write a C++ program to add the first 15 even numbers and display their sum. **05 marks 4. Explain the difference between the following three declarations: int n1=n; int& n2=n; p=&n 02 marks 5. Name the operators which are common for c and c++.indicate its precedence and associativity.also mention the operators which are exclusive for c++. 8M 6. What are bitwise operators?explain the left shift and right shift operations with examples. 5M Unit 4. Functions 1. Write a program to compute the factorial of consecutive integers using 10 marks 3

recursive function. 2. What is the utility of writing functions instead of writing a single main 10 Marks program? 3. With the help of an example explain the utility of Inline Function? 05 marks 4. Describe the various types of operators available in C++ with example. **06 marks 5. How do you pass an array to a function? Explain with example program. **08 marks 6. Write a C++ program to calculate area and perimeters of a circle. **06 marks 7. Write a c++ program to swap two numbers using call by address explain the mechanism. 10M Unit 5. Exception Handling 1. What is exception handling? With an example, briefly explain try, throw and **10 marks catch mechanisms in C++. 2. Explain what happens during stack unwinding. 05 marks 3. Give two reasons that the exception declaration of a catch clause should 06 marks declare a reference. 4. Explain with the help of a program the concept of Rethrow. 06 marks 5. Write a c++ program to illustrate the process of catching all uncaught exceptions through in a try block. 10M Unit 6. CLASSES 1. Implement a Point class for three-dimensional points (x,y,z). Include a default constructor, a copy constructor, a negate() function to tra nsform the point into its negative, a norm() function to return the point s distance from the origin (0, 0, 0) and a print() function. 10 marks 2. How many times is the copy constructor called in the following code: 10 marks Widget f(widget u) {Widget v(u); Widget w=v; return w; } main() {Widget x; Widget y=f(f(x)); } 3. Define class and object. With the help of general syntax describe a class, class **10 marks members and class object arrays and vectors. 4. What are class constructor and class destructor? Give the characteristics of each **10 marks (through example program) to find the length of a string. 5. Explain different types of constructors,with example. 10M 6. Write short note on friend functions and explain with an example. 8M 7. Explain OOPS features. 10M Unit 7. 1. How the operator keyword is used? Give two examples. 04 marks 2. Implement the binary subtractor operator, the unary negation operator, and the less 10 marks than operator < for the Ratio class: class Ratio { friend Ratio operator*(const Ratio&, const Ratio&); public: Ratio(int =0, int =1); Ratio(const Ratio&); Ratio& operator=(const Ratio&); //other declarations go here private: 4

int num, den; //other declarations go here }; 3. What is operator overloading? With the general syntax explain the process of **10 marks operator overloading. 4. Write a C++ program to overload the + + and - - operator. **10 marks Unit 8. 1. What is the difference between protected and private members? 03 marks 2. What is inheritance? Briefly explain public, private and protected inheritance, **10 marks with an example. 3. What is multiple inheritance? Explain with one C++ program. **10 marks 4. Write a note on base class and derived class. 4M 5. Explain this pointer with an example 5M 6. Explain virtual functions with an example program. 8M 5