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

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

C++ INTERVIEW QUESTIONS

13 Classes & Objects with Constructors/Destructors

Glossary of Object Oriented Terms

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

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

The C Programming Language course syllabus associate level

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

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

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

Java Interview Questions and Answers

BCS2B02: OOP Concepts and Data Structures Using C++

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

I PUC - Computer Science. Practical s Syllabus. Contents

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

Java (12 Weeks) Introduction to Java Programming Language

C++FA 5.1 PRACTICE MID-TERM EXAM

Introduction to C++ Introduction to C++ Week 7 Dr Alex Martin 2013 Slide 1

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

Chapter One Introduction to Programming

Ch 7-1. Object-Oriented Programming and Classes

Chapter 4 OOPS WITH C++ Sahaj Computer Solutions

C++ Programming Language

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

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

An Incomplete C++ Primer. University of Wyoming MA 5310

CEC225 COURSE COMPACT

Object Oriented Software Design II

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

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

Fundamentals of Java Programming

Embedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C

WORKSPACE WEB DEVELOPMENT & OUTSOURCING TRAINING CENTER

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

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

El Dorado Union High School District Educational Services

Specialized Programme on Web Application Development using Open Source Tools

Syllabus OBJECT ORIENTED PROGRAMMING C++

Java Application Developer Certificate Program Competencies

Course Title: Software Development

Programming and Software Development (PSD)

Polymorphism. Problems with switch statement. Solution - use virtual functions (polymorphism) Polymorphism

CS 111 Classes I 1. Software Organization View to this point:

C++ Programming: From Problem Analysis to Program Design, Fifth Edition. Chapter 3: Input/Output

CSCI 253. Object Oriented Programming (OOP) Overview. George Blankenship 1. Object Oriented Design: Java Review OOP George Blankenship.

Moving from CS 61A Scheme to CS 61B Java

Chapter 2: Elements of Java

Certified PHP Developer VS-1054

CS193D Handout 06 Winter 2004 January 26, 2004 Copy Constructor and operator=

Syllabus for CS 134 Java Programming

Variable Base Interface

Lecture 3. Arrays. Name of array. c[0] c[1] c[2] c[3] c[4] c[5] c[6] c[7] c[8] c[9] c[10] c[11] Position number of the element within array c

Chapter 5 Functions. Introducing Functions

Masters programmes in Computer Science and Information Systems. Object-Oriented Design and Programming. Sample module entry test xxth December 2013

Handout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.

AP Computer Science Java Subset

Programming in C# with Microsoft Visual Studio 2010

Computer Programming C++ Classes and Objects 15 th Lecture

Object Oriented Software Design

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

The Sun Certified Associate for the Java Platform, Standard Edition, Exam Version 1.0

1.1.3 Syntax The syntax for creating a derived class is very simple. (You will wish everything else about it were so simple though.

Course notes Standard C++ programming

10CS35: Data Structures Using C

Specialized Programme on Web Application Development using Open Source Tools

CS 141: Introduction to (Java) Programming: Exam 1 Jenny Orr Willamette University Fall 2013

C Programming. for Embedded Microcontrollers. Warwick A. Smith. Postbus 11. Elektor International Media BV. 6114ZG Susteren The Netherlands

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

Semantic Analysis: Types and Type Checking

Course MS10975A Introduction to Programming. Length: 5 Days

Introduction to Object-Oriented Programming

Object Oriented Software Design

Advanced Data Structures

Data Structures using OOP C++ Lecture 1

C++ Language Tutorial

Compiling Object Oriented Languages. What is an Object-Oriented Programming Language? Implementation: Dynamic Binding

MAHALAKSHMI ENGINEERING COLLEGE B TIRUCHIRAPALLI

Lecture 7 Notes: Object-Oriented Programming (OOP) and Inheritance

Java SE 8 Programming

Introduction to Programming Block Tutorial C/C++

Classes and Pointers: Some Peculiarities (cont d.)

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

Java CPD (I) Frans Coenen Department of Computer Science

Basics of I/O Streams and File I/O

Description of Class Mutation Mutation Operators for Java

Certified PHP/MySQL Web Developer Course

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

Basic Programming and PC Skills: Basic Programming and PC Skills:

We will learn the Python programming language. Why? Because it is easy to learn and many people write programs in Python so we can share.

OBJECT ORIENTED PROGRAMMING AND DATA STRUCTURES CONSTRUCTORS AND DESTRUCTORS

CSE 1020 Introduction to Computer Science I A sample nal exam

Passing 1D arrays to functions.

Specialized Android APP Development Program with Java (SAADPJ) Duration 2 months

TECHNOLOGY Computer Programming II Grade: 9-12 Standard 2: Technology and Society Interaction

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

CISC 181 Project 3 Designing Classes for Bank Accounts

Lesson Name: Introduction of OOP

Chapter 1 Fundamentals of Java Programming

Visual Basic. murach's TRAINING & REFERENCE

Computer Programming I

Transcription:

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 preceded by an equal sign d. its name has undereline 2. Associations may be a. one b. binary c. ternary d. higher order 3. A aggregate has a finite number of levels, but the number of parts may vary i. fixed ii.recursive iii.level iv.variable 4. A class is a class that is instantiable that is it can have direct instance. i. multiple ii. Multilevel iii. Concrete iv.abstract class 5. A class with more than one super class is called a class 6. i. combine ii. join iii. diffrent iv. Direct 7. Overriding is done for the following reasons 8. i. for extension ii. for restriction iii.for optimization iv. for design 9. is the sharing of attributes and operations among classes base on hierarchical relationship. 10. a. Classification b. Identity c. Inheritance d. Polymorphism 11. model is used to specify and implement the control aspect of a system 12. a. Function b. Dynamic. c. Object d. None of these 13. Diagram describes how a particular set of objects relate to each other. 14. a. Object b. Instance c. Class d. None of these 15. An describes a group of links with common structure and common semantics. 16. a. Link b. attribute c. method d. association 17. A qualified assosiction relates two object, classes and a 18. a. entity b.subclass c. qualifier d. role 19. errors are identified during analysis and report on constraints that exist in the problem domain 20. i. protect ii. logical iii. syntax iv. application 21. ability take more than one form 22. i. Inheritance ii. Generalization iii. Polymorphism iv. Abstraction 23. refer to the names of variable, functions,arrays and classes etc. created by the 24. programmer 25. i. Constant ii. Identifier iii. Variable iv. Keyword 26. are operators that are used to format the data display 27. i. logic ii. Relations iii. manipulators iv none of these 28. An is combination of operators, constants and variables,arrange as per the rules of the language. 29. i. program ii.error iii.expression iv. operation 30. Which of the following variable declaration are correct? 31. i. int a; ii.float f; iii.char c; iv int Abc; 32. Which of the following derive types of data types 33. i. array ii. Function iii.pointer iv.structure 34. Which of the following member dereferencing operators 35. i. :: * ii * iii ->* iv.?: 36. An object cannot invoke a function using the dot operator 37. i. private ii.public iii.static iv none of these

38. A function,although not a member function has full access rights to the private members of the class 39. i. inline. i. inside iii.friend iv. Outside 40. A constructor that accepts no parameters is called the constructor 41. i. parameterized ii.copy iii. Dynamic iv. Default 42. Constructor a. should be declared in the public section b. are invoked automatically when the objects are created c. can have defaults arguments d. can be virtual 43. Destructors a. is used to destroy the object that have been created by constructors b. whose name is the same as the class name but is preceded by the tilde c. will be invoked implicitly by the compiler upon exit from the program d. take any argument and return any value 44. The casting operator function should the following conditions a. It must be a class member b. It must not specify a return type c. It must not have any arguments d. It must specify a return type 45. We can overload almost all the c++ operators except the following a. scope resolution operator ii. Size operator b. Conditional operator iv. binary operator 46. The mechanism of deriving a class from another derive class is known as inheritance i. i.single ii. multiple iii. Multilevel iv. Hybrid 47. virtual void display( ) = 0; is function i. i. pure ii. Proper iii. improper iv. None of these. 48. Virtual function a. must be members of some class b. cannot be static members c. are access by using object pointer d. iv cannot be a friend or another class 49. Which header file provides a set of functions for manipulators a. i. iomanip ii. iostream iii.stdio iv none of these 50. Which function to define the width of a field necessary for output of an item? a. i. precision( ) ii. fill( ) iii. width( ) iv. None of these

Question for four marks 1. Discuss OMT methodology models 2. Explain object oriented themes 3. Give characteristics of object 4. What is aggregation? Explain its properties 5. Explain generalization and Inheritance 6. Explain Multiplicity in detail 7. Discuss concept of rolenames 8. Explain qualification in association 9. What is homomorphism? Explain in detail 10. What is overriding? Explain its resons 11. Explain aggregation Vs association 12. What is extensibility? Explain object oriented enhances extensibility 13. Discuss reusability with various style rules 14. What is OOPS paradigm? Give striking features of OOPS 15. What is Object? Give principal advantages of it 16. What is Inheritance? Give applications of OOPs 17. How are data and function organized in object oriented program 18. Explain scope resolution operator 19. Explain reference variable with suitable example 20. Discuss various manipulators with suitable example 21. What is control structure? Explain Switch Statement in detail 22. What is variable? Explain dynamic initialization of variables 23. Discuss inline function 24. Describe the output following program int main( ) { for( inti=0;i<8;i++) if ( i%2 = = 0) cout << i +1 << \t ; elseif (i%3 = = 0) cout << i*i << \t ; elseif (i%5 = = 0) cout << 2 * i 1 << \t else cout << i << \t ; } 25. Write a program for display first positive 10 integers ( using if and for loop) 26. Explain friend function with suitable Example 27. Discuss pointers to members 28. What is static data members? Explain static member function 29. class xyz { int x; int y; public: int z; };

xyz p; p.x=0; p.z=10; In above code find which statement will not execute and why? 30. Correct errors of following program and include missing items class exam { int x; public: }; void main( ) { exam a1; a1.read( ); a1.show( ); exam a2=10; a2.show( ); } 31. What is Destructor? Explain in detail 32. Explain Copy constructor with suitable example 33. How parameterized constructor works? In detail 34. integer int1 = integer( 0, 100); integer int1( 0, 100); what is the use of above tow statements? Discuss there difference 35. List rules for overloading operator 36. How we can overloaded operator? Explain with example. 37. Discuss with example overloading operator using friend function 38. What are abstract classes? Give example 39. Which different inheritance methods are there in c++? Explain any four 40. Write note on private member function 41. What is virtual base class? When do we may a class virtual? 42. Explain virtual function. Why do we need virtual function? 43. Explain in brief this pointer in c++ with suitable example 44. Explain pointers to object with suitable example 45. How do the following two statements differ in operation? cin>>c; cin.get(c); 46. Both cin and getline ( ) functions can be used for reading a string. Comment 47. Discuss the syntax of setf( ) with example 48. What will be the reason of the following program segment? for( i=0.25;i<=1.0;i=i+0.25) { cout.pricesion ( 5 ); cout.width (7);

cout << i; cout.width (10); cout<< i*r<< \n ; } cout<<setw(10)<< total= <<setw(20)<<setprecision(2)<<1234.567 <<endl; 49.Explain function template with example 50.What is an exception? How is an exception handle in c++? 51.Why the templates are used? Explain class templates 52. What are the advantages of using exception handling mechanism in a program? 1. Write a program to print 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 2. Write a program to that will ask for a temperature in Fahrenheit and display it in Celcius. 3. Write a program to input an integer value from keyboard and display on screen HELLO. 4. Write a program to read a value of a, b and c & display the value of x where x=a/b-c. 5. Write a program to display the sum of the digits in a given number. 6. Write a program to add two matrices using for loop. 7. Write a program to calculate the area of a circle. 8. Write a program for sum of even numbers in a given range. 9. Write a program to check whether the year entered by the user is Leap year or not. 10. Write a program to print 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5

Questions for one Mark 1. What is method? 2. Define Encapsulation. 3. Define Concept of classification 4. What is Analysis? 5. What is Attribute? 6. What is Link? 7. Define Multiplicity. 8. What is Role? 9. Define Ordering. 10. What is propagation? 11. Give the use of delegation 12. Define candidate key 13. What is constraint :? 14. Define homomorphism 15. Which approach is to factor out the common code into a single method the is called by each method 16. What is factoring? 17. Which provides a proper mechanism to archive the desired code reuse 18. What is message passing? 19. Define dynamic binding 20. What is data hinding? 21. What is class? 22. Define encapsulation 23. What is Token? 24. Deifine keyword 25. What do you mean by reference variable? 26. Give purpose of manipulators 27. What is purpose of new operator. 28. Give syntax for accessing class members 29. How to create object of class? 30. Which two places define member function? 31. What is constructor? 32. Can constructor be virtual? 33. What is dynamic constructors? 34. Give the general forms of operator function 35. How many operand takes when we use operator as unary 36. Give three types of situation might arise in data conversion 37. What is inheritance? 38. Can a class be derived from another derived class which is known as multilevel inheritance? 39. Dose the derive class inherits some or all of the properties of the base class 40. What is containership? 41. item *ptr = new item[10]; is it possible? 42. this -> a = 123; is it correct? 43. Can a virtual function be a friend of another class? 44. What is input stream? 45. What is output stream? 46. Give syntax for display an entire line using write( ) 47. Write use of fill( )

48. Define Polymorphism

Answer the following (2 marks each) 1. Why do we need the preprocessor directive #include<iostream.h>? 2. Write a program to read two numbers from the keyboard and display the larger value on the screen. 3. Enlist the rules of naming the variable in C++. 4. Explain the data types in C++. 5. Why array is called a derived data type? 6. When do we need to use default arguments in a function? 7. What is the main advantage of passing arguments by reference? 8. What is a class? How does it accomplish data hiding? 9. What are objects? How are they created? 10. When do we declare a member of a class static? 11. How do we invoke a constructor function? 12. What is a parameterized constructor? 13. Describe the importance of destructors. 14. Why is it necessary to overload an operator? 15. When do we use the protected visibility specifier to a class member? 16. What is virtual base class? 17. What does this pointer point to? 18. Why do we need virtual functions? 19. What is the use of Templates? 20. What do you mean by Encapsulation? 21. Explain Multiplicity in brief. 22. Explain polymorphism in brief. 23. Give syntax of do- while loop. 24. Give syntax of while loop. 25. Give syntax of for statement. 26. Explain Dynamic Binding in brief. 27. Write down the benefits of OOPs. 28. Explain the special operators in C++. 29. Explain memory management operators in brief. 30. Give the characteristics of static data member variable. 31. Enlist the characteristics of friend functions. 32. Enlist the any 4 rules for virtual functions. 33. Explain getline() function. 34. Explain fill() function. 35. Explain class templates with multiple parameters with suitable example.

Questions for 6 Marks 1. What is aggregation? Compare and contrast aggregation and generalization. 2. Explain different object modeling techniques in brief. 3. Define constraints. Explain constraints on links. 4. What are candidate keys? Compare multiplicity with candidate keys for binary association. 5. What do you mean by State Diagram? Draw a state diagram describing the behavior of a telephone line. 6. What are Events? Explain how states and events are related with state diagrams. 7. What are states? Explain how state diagrams are useful in dynamic modeling. 8. Explain multiple inheritance with suitable example. 9. What are abstract classes? Compare abstract classes with concrete classes. 10. What is aggregation? Explain aggregation versus association. 11. What is object? Explain the relationship between objects and classes. 12. What are attributes? Explain how attributes are used in object and class diagrams with suitable example. 13. Explain Switch statement with example. 14. Explain the structure of C++ program. 15. Compare While and Do-While loops with examples. 16. Explain For statements in detail. 17. What are Functions? Explain function prototyping in detail. 18. What do you mean by call by reference and return by reference? 19. Explain Inline functions in brief. 20. Write a short note on : function overloading. 21. What are Constructors? Explain the special characteristics of constructors. 22. Can constructors be overloaded? If yes, how they are overloaded? 23. Explain Copy Constructors with suitable example. 24. Compare Constructors and Destructors. 25. Write a short note on : Operator Overloading. 26. What is Operator Overloading? Give the rules for operator overloading. 27. Write a program in C++ to concatenate two strings by + operator using the concept of operator overloading. 28. What are the advantages of function prototypes in C++? Describe different styles of writing prototypes. 29. Write a function to read a matrix of size m x n from the keyboard. 30. Can we have more than one constructor in a class? If yes, explain the need of each situation. 31. Define a class string? Use overloaded == operator to compare two strings. 32. A friend function cannot be used to overload the assignment operator =. Explain why? 33. A class alpha has a constructor as follows: 34. alpha(int a, double b); 35. We have two classes X and Y. If a is an object of X and b is an object of class Y. And we want to say a=b; What type of conversion routine should be used and where? 36. What do you mean by Inheritance in C++? What are different forms of Inheritance with suitable example for each.

37. What is Containership? How does it differs from Inheritance. 38. Explain with suitable example how you would create space for an array of objects using pointers. 39. What is a Virtual function? Explain its need. 40. When do we make a virtual function pure? What are the implications of making a function a pure virtual function. 41. What is the basic difference between manipulators and ios member functions in implementation? Give examples. 42. A template can be considered as a kind of macro. What is the difference between template and a macro. 43. A class(or function) template is known as a parameterized class (or function). Comment. 44. Write a function template for finding the minimum value contained in an array. 45. Write a class template to represent a generic vector. Include member functions to perform the following tasks: 46. To create a vector. 47. To modify the value of a given element. 48. To multiply by a scalar value. 49. To display the vector in the form(10,20,30, ) 50. Define two classes Polar and Rectangle to represent points in the polar and rectangle systems. Use conversion routines to convert from one system to the other. 51. Prepare an instance diagram for the class diagram in following figure for expression (x + y / 2) / ( x / 3 + y ) parenthesis are used in the expression for grouping but are not needed in diagram. First Operand Term Second operand Expresion Binary Operator Variable name constant value 52. Explain various object oriented styles in detail 53. What is robustness? Discuss robustness against user errors should never be sacrifice.

54. What is the use of main( ) function explain call by value and call by reference 55. Discuss in detail memory management operators 56. Explain various datatypes in C++ in detail 57. Define a class to represent a bank account including following Data members Member Function a. name of depositor a. to assign initial values b. account number b. to deposit an amount c. type of account c. to withdraw an amt after checking the values d. balance amount in account d. to display name and balance 58. Write a program for handling ten customers using array of object and above data 59. What is visibility mode? What are differences between inheriting class with public and private visibility mode, Explain with example 60. When do we make a virtual function pure? What are the implications of making a functions as pure virtual functions 61. Identify errors if any in the following statements:- 62. 1.catch(int a, float b) {------------} 2. try { throw 100;} 3. try { fun1( )} 4. try { throw x/y;} 5. catch(int x, --, float y) {------------------------} 6. try { if(!x) throw x;} catch(x) { cout<< x is zero \n ;}