KENDRIYA VIDYALAYA TIRUMALAGIRI,SECUNDERABAD UNIT TEST II

Similar documents
(a) Differentiate between a call by value and call by reference method.

(d) Rewrite the following program after removing all the syntax error(s), if any. [2] include <iostream.h> void main ( )

KENDRIYA VIDAYALAYA PANGODE MONTHLY TEST AUGUST 2015

Downloaded from

vinodsrivastava.com Consider the following c++ code and answer the questions from (i) to (iv): class Personal protected: public:

SAMPLE PAPER-2015 CLASS-XII COMPUTER SCIENCE. Sample paper-i. Time allowed: 3 hours Maximum Marks: 70 Name : Roll No.:

Sample Paper, Subject: Computer Science Class 12 th Time Allowed : 3 Hr. M.M.: 70

Constructor & Classes Questions

Q2 Based on Class Concept and features Total Marks 10. Q2(A) Theory Based on Class Concept Marks :2

91/1 COMPUTER SCIENCE. Series SHC/1. dksm ua- jksy ua- Code No. Roll No. Candidates must write the Code on the title page of the answer-book.

KENDRIYA VIDYALAYA SANGATHAN MODEL QUESTION PAPER-5 BLUE PRINT CLASSS XII COMPUTER SCIENCE (083) TIME: 03:00 Hrs. MAX. MARKS: 70 S.No.

Computer Science, Class XII ( ) (Autumn Break-2015) (Holiday H.W) Chapter No.4 to 6, 11 to 13

KENDRIYA VIDYALAYA NO.02 AFS HINDAN G.BAD Holiday Homework Class XII Computer Science

(i) get single character using keyboard. This function is available in stdio.h. (ii) to check whether given character is alphabet or digit or not.

Code No. 083 Time allowed: 3 hours Maximum Marks: 70 Instructions: (i) All questions are compulsory. (ii) Programming language: C++

SAMPLE PAPER. Class: XII SUBJECT COMPUTER SCIENCE. Time: 3 Hours MM: 70

SAMPLE PAPER-2015 CLASS-XII COMPUTER SCIENCE Time allowed: 3 hr. MM: 70

KENDRIYA VIDYALAYA NO-1 ARMAPUR

public : int min, hour ; T( ) //here constructor is defined inside the class definition, as line function. { sec = min = hour = 0 ; }

INTERNATIONAL INDIAN SCHOOL, RIYADH. Ch 1 C++ Revision tour

KENDRIYA VIDYALAYA IIT CAMPUS CHENNAI 36 COMPUTER SCIENCE. Half Yearly

KENDRIYA VIDYALAYA SANGATHAN BHUBANESWAR REGION SECOND PREBOARD EXAMINATION FOR CLASS XII SUBJECT: COMPUTER SCIENCE

3.Constructors and Destructors. Develop cpp program to implement constructor and destructor.

Programming Fundamentals II (C++ II) Final Exam June 17 th, Sun, 2007

I BCS-031 BACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination. June, 2015 BCS-031 : PROGRAMMING IN C ++

Babaria Institute of Technology Computer Science and Engineering Department Practical List of Object Oriented Programming with C

COMPUTER APPLICATIONS

THE EMIRATES NATIONAL SCHOOL SHARJAH THIRD MODEL EXAMINATION 2015 COMPUTER SCIENCE ( Code : 083) CLASS : XII MAX MARKS: 70

KUWAIT SAHODAYA EXAMINATION FIRST TERM SUBJECT : COMPUTER SCIENCE (083) : CLASS - XII SET - 3 Time : 3 Hours

Sample Paper COMPUTER SCIENCE (Theory) Class-XII Time Allowed: 3hours Maximum Marks: 70

Computer Science 330 Assignment

Downloaded-From:-

vinodsrivastava.com Constructor and Destructor

List of Practical for Class XII Computer Science

A506 / C201 Computer Programming II Placement Exam Sample Questions. For each of the following, choose the most appropriate answer (2pts each).

HOLIDAYS HOMEWORK CLASS : XII. Subject : Computer Science

Computer Science. Practical File

CLASS XII COMPUTER SCIENCE(083) TimeAllowed : 3 HrsMax Marks : 70

INDIAN SCHOOL MUSCAT FIRST TERM EXAMINATION

I Mid Semester May 2012 : Class XII : Computer Science Max Mark 50 : Time 2 Hrs. 1. a) What is macro in C++? Give example 2

Exam Duration: 2hrs and 30min Software Design

Padasalai.Net s Model Question Paper

C++ 8. Constructors and Destructors

KENDRIYA VIDYALAYA SANGATHAN, CHENNAI REGION COMPUTER SCIENCE (083)

Session Chapter 4: Classess & Object

THE NAME OF THE CONSTRUCTOR AND DESTRUCTOR(HAVING (~) BEFORE ITS NAME) FUNCTION MUST BE SAME AS THE NAME OF THE CLASS IN WHICH THEY ARE DECLARED.

Series SHC COMPUTER SCIENCE. Code No. 91. Roll No.

Classes and Objects. Instructor: 小黑

KENDRIYA VIDYALAYA SANGATHAN TINSUKIA REGION PRE BOARD EXAMINATION SUBJECT COMPUTER SCIENCE

Q2) Define a class candidate in C++ with following Description: Private Members 4 Number) of type long

JAVA GUI PROGRAMMING REVISION TOUR III


Downloaded from

Object Oriented Programming is a programming method that combines: Advantage of Object Oriented Programming

MARKING SCHEME COMPUTER SCIENCE (083)_XII

Mock Test Paper-3. Computer Science. Duration : 3hrs Max Marks : 70

Short Notes of CS201

(Note: 1. Each Question Carries 5 marks. 2. Solve any two questions) SET-I

CS201 - Introduction to Programming Glossary By

(i) case (ii) _delete (iii) WHILE (iv) 21stName

VPM s Joshi-Bedekar College of Arts and Commerce TYBCOM Practical Exam Practice Questions MYSQL

KENDRIYA VIDYALAYA SANGATHAN (KOLKATA REGION) Second Pre Board Examination ( ) COMPUTER SCIENCE (Theory) Class-XII Marking Scheme

JB Academy, Faizabad Half Yearly Examination Subject: Computer Science (083) Class XII

Review Questions for Final Exam

Introduction to Programming Using Java (98-388)

Time: 3 HOURS Maximum Marks: 100

COMPUTER APPLICATIONS

COMPUTER APPLICATIONS

Example : class Student { int rollno; float marks; public: student( ) //Constructor { rollno=0; marks=0.0; } //other public members };

OOP THROUGH C++(R16) int *x; float *f; char *c;

SAMPLE PAPER: 2015 Class :XII Subject : Informatics Practices. Time: 3 hrs. M.M. 70. Section A

Object Oriented Programming 2012

6.096 Introduction to C++ January (IAP) 2009

Sample Paper 2013 SUB: COMPUTER SCIENCE GRADE XII TIME: 3 Hrs Marks: 70

JAVA MOCK TEST JAVA MOCK TEST II

Course Text. Course Description. Course Objectives. StraighterLine Introduction to Programming in C++

University of Palestine. Mid Exam Total Grade: 100

cout<< \n Enter values for a and b... ; cin>>a>>b;

THE EMIRATES NATIONAL SCHOOL SHARJAH THIRD MODEL EXAMINATION COMPUTER SCIENCE ( Code : 083) ANSWER KEY

OBJECT ORIENTED PROGRAMMING USING C++ CSCI Object Oriented Analysis and Design By Manali Torpe

KENDRIYA VIDYALYA CLRI CHENNAI AUTUMN BREAK HOLIDAY HW MARKS QUESTIONS : DATA STRUCTURE

COMPUTER SCIENCE 1998 (Delhi Board)


JB ACADEMY HALF-YEARLY EXAMINATION 2016 CLASS XII COMPUTER SCIENCE. Time: 3:00 Hrs. M.M.: 70

2016 COMPUTER SCIENCE

Downloaded S. from Kiran, PGT (CS) KV, Malleswaram STRUCTURES. Downloaded from

KENDRIYA VIDYALAYA SANGATHAN ERNAKULAM REGION FIRST COMMON PRE BOARD EXAMINATION CLASS:XII - (COMPUTER SCIENCE )

Class and object Holiday Homework

CS2141 Software Development using C/C++ C++ Basics

91/1 COMPUTER SCIENCE. Series SHC/1. dksm ua- jksy ua- Code No. Roll No. Candidates must write the Code on the title page of the answer-book.

SECTION A [Only for candidates, who opted for C++]

KENDRIYA VIDYALAYA ALIGANJ SHIFT-II HOLIDAY HOME WORK XII COMPUTER SCIENCE ARRAY AND STRUCTURES

Fundamentals of Programming Data Types & Methods

Constructor - example

Seat No. Total No. of Questions : 6] [Total No. of Printed Pages : 2 [4189]-101. P. G. D. C. M. (Semester - I) Examination

Data Structures using OOP C++ Lecture 3

B.Sc. (Hons.) Computer Science I B.Sc. (Hons.) Electronics. (i) Runtime polymorphism and compile time polymorphism

Object Oriented Design: Identifying Objects

Object-Oriented Programming (OOP) Fundamental Principles of OOP

22316 Course Title : Object Oriented Programming using C++ Max. Marks : 70 Time: 3 Hrs.

Transcription:

KENDRIYA VIDYALAYA TIRUMALAGIRI,SECUNDERABAD UNIT TEST II SUB : COMPUTER SCIENCE CLASS : XII TIME : 90 MINS M.M: 40 1.a. Differentiate between default & parameterized constructor with suitable example. -2 b. What is the significance of private, protected and public access specifiers in a class? -2 c. Answer the questions (i) and (ii) after going through the following class. -2 class player int health; int age; player( ) health=6; age=18; } //Function 1 player(int s, int a) health =s; age = a ; } // Function 2 player( player &p); // Function 3 ~player( ) cout<< Memory Deallocate ; } // Function 4 void main( ) player p1(7,24); //Statement1 player p3 = p1; //Statement3 } (i) When p3 object created specify which constructor invoked and why? Write complete definition for Function 3? (ii) Which concept of C++ is demonstrated by Function 1, 2 and 3? Write the calling statement of Function 1. d. Define a class BALANCED_MEAL in C++ with following description: - 4 Private Members: Access_no Integer Name_of_Food String of 25 characters Calories Integer Food_type String Cost Float AssignAccess( ) Generates random numbers between 0 to 99 and return it. Public Members A function INTAKE( ) to allow the user to enter the values of Name_of_Food, Calories, Food_type, cost and call function AssignAccess( ) to assign Access_no. A function OUTPUT( ) to allow user to view the content of all the data members, if the Food_type is Fruit. e. Define a class Employee in C++ with the following specification: - 4 Private Members: ename an array of char of size[50] ( represent employee name) deptname an array of char of size[20] ( represent department name) salary integer ( represent total salary of an employee) bonus float CalBonus() This function calculate the total bonus given to an employee according to following conditions Deptname Bonus Accounts 4 % of salary

HR 5% of salary IT 2% of salary Sales 3% of salary Marketing 4% of salary Public Members: Constructor to initialise ename and deptname to NULL and salary and bonus to 0. A function read_info to allow user to enter values for ename, deptname,salary & Call function CalBonus() to calculate the bonus of an employee. A Function disp_info() to allow user to view the content of all the data members. 2. a. Define a class POWER in C++ with following description: -4 Private Members: MNO of type long (Meter Number) Name of type string (Consumer s Name) Units of type long (Power Unit s Consumed) Charges of type float (Charges to be paid by Consumer) A member function CALCCHARGE( ) to calculate Charges according to the following conditions: Units Charges Below 100 Units Rs. 2.00 per Unit Below 200 Units and > = 100 Units Rs. 3.00 per Unit > = 200 Units Rs. 5.00 per Unit For Example: If the Units are 132, Charges should be calculated as Charges = 99 * 2 + (Units 99 ) * 3; If the Units are 392, Charges should be calculated as Charges = 99 * 2 + 100 * 3 + (Units 199) * 5; Public Members A Function Enterdata( ) to allow user to enter values for Mno, Name, Units & call the function CAlCCHARGES( ) to calculate the Charges. A Function ShowBillI( ) to allow user to view the content of all the data members. b. Answer the questions (i) to (iv) based on the following code: -4 class Car char Model[10]; char Date_of_purchase[10]; char Company[20]; public( ); Car( ); void entercardetail( ); void showcardetail( ); class Accessories : public Car protected: char stereo_tape[30]; char sheet_cover[20]; float Price; Accessories( ); void enteraccessoriesdetails( ); void showaccessoriesdetails( );

class Dealer : public Accessories int No_of_dealers; char dealers_name[20]; int No_of_products; Dealer( ); void enterdetails( ); void showdetails( ); (i) How many bytes will be required by an object of class Car and an object of class Dealer. (ii) Write names of all the data members which are accessible from the objects of class Dealer. (iii) Write names of all the members accessible from member functions of class Accessories. (iv) Write names of all the member functions which are accessible from objects of class Dealer. c. Answer the questions (i) to (iv) based on the following code : -4 class Employee int id; char name[20]; char doj[20]; Employee(); ~Employee(); void get(); void show(); class Daily_wager : protected Employee int wphour; int nofhworked; void getd(); void showd(); class Payment : private Daily_wager char date[10]; int amount; Payment(); ~Payment(); void show(); (i) Name the type of Inheritance depicted in the above example. (ii) (iii) Name the member functions accessible through the object of class Payment. From the following, Identify the member function(s) that can be called directly from the object of class Daily_wager class

(iv) show(), getd(),get() Name the base & derived class of Daily_wager class. d. Define a class Book with the following specification: -4 Private members Book_No integer type Book_title 20 character Price float(price per copy) Total_cost( ) A function to calculate the total cost for N number of copies, where N is passed to the function as argument. Public members: INPUT ( ) function to reed Book_no, Book_title, price. PURCHASE ( ) function to ask the user to input the number of copies to be purchased. It invokes total_cost and prints the total cost to be paid by the user. e. Answer the questions (i) to (iv) based on the following code: -4 class Trainer char TNo [5], TName [20], Specialisation [10]; int Days; float Remuneration; void AssignRem (float); Trainer ( ) ; void TEntry ( ); void TDisplay ( ); class Learner char Regno [10], LName [20], Program [10]; Protected : int Attendance, Grade; Learner ( ); void LEntry ( ); void LDisplay ( ); class Institute : public Learner, public Trainer char ICode[10], IName [20];

Institute ( ); void IEntry ( ); void IDisplay ( ); (i) Which type of Inheritance is depicted by the above example? (ii) Identify the member function(s) that cannot be called directly from the objects of class Institute from the following TEntry( ), LDisplay(), IEntry() (iii) Write name of all the member(s) accessible from member functions of class Institute. (iv) If class Institute was derived privately from class Learner and privately from class Trainer, then, name the member function(s) that could be accessed through Objects of class Institute. 3.(a) Differentiate between Constructor and Destructor function in context of Classes and Objects. 2 (b) Answer the questions (i) and (ii) after going through the following class. 2 class Maths char Chapter [20]; int Marks; Maths (int x, char ch[ ]) //Function 1 ---------------- } Math (Math & A1 ) //Member Function 2 ----------------- } (i) Complete the definitions of Member Function 1 and Member Function 2 in the above example. (ii) How would Member Function 1 and Member Function 2 get executed? c. Answer the questions (i) and (ii) after going through the following class : -2 class Computer char C_name[20]; char Config[100]; Computer(Computer &obj); // function1 Computer(); //function 2 Computer(char *n,char *C); // function3

(i) Complete the definition of the function 1. ii)name the specific feature of the OOPs shown in the above example....end...