loakuwait.comloakuwait.com/wp-content/uploads/2018/05/class-12-eng... · web viewinternal...

28
Class 12 Holiday Homework English: Solve three years question papers from CBSE website CBSE Examination Materials: www.cbse.nic.in/newsite/examination.html Read novel ‘The Invisible Man (Chapter 11 to 29) and summarize all chapters in your own language in 150 to 200 words. Read Lost Spring, An Elementary School of Slum, Keeping Quiet and do QA given in the book. Read Novel Ch 1 to 15 and write the summary of all the chapters. Biology: Draw the following diagrams 2 times (to be done in assignment sheet) 1. Fig 1.2 (a) and (b),1.4. 2. Fig 2.1, 2.2, 2.3(a), 2.7(d), 2.8(c), 2.14 3. Fig 3.1(b), 3.3(b), 3.6, 3.7, 3.8(a) & (b), 3.9, 3.10, 3.12 4. Fig 5.1, 5.15(only peptide) 5. Fig 6.2, 6.3, 6.4(a), 6.5, 6.7, 6.8, 6.9, 6.10 structure of TRNA, 6.13, 6.14 6. Fig 7.8 7. Fig 8.1, 8.4, 8.6 8. Table 9.1, 9.2 9. Fig 10.2(a)&(c), 10.3(b), 10.8 10. Fig 11.1, 11.2, 11.4, 11.6, 11.7(a)&(b) 11. Fig 12.3 12. Fig 13.3, 13.4, 13.5 13. Fig 14.2, 14.4(a), (b), (c), (d), 14.5, 14.7 14. Fig 15.2 15. Fig 16.1, 16.3, 16.5(only flow chart), 16.6 16. Fig 15.13(supplementary material) Physics: A: WORKSHEET (to be answered in paper) ELECTROSTATICS:

Upload: others

Post on 31-Dec-2019

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: loakuwait.comloakuwait.com/wp-content/uploads/2018/05/Class-12-Eng... · Web viewInternal resistance of a cell Resistance The resistance of a copper wire at 27 0C was found to be

Class 12 Holiday HomeworkEnglish:

Solve three years question papers from CBSE website CBSE Examination Materials:

www.cbse.nic.in/newsite/examination.html Read novel ‘The Invisible Man (Chapter 11 to 29) and summarize

all chapters in your own language in 150 to 200 words. Read Lost Spring, An Elementary School of Slum, Keeping Quiet

and do QA given in the book. Read Novel Ch 1 to 15 and write the summary of all the chapters.

Biology:Draw the following diagrams 2 times (to be done in assignment sheet)

1. Fig 1.2 (a) and (b),1.4.2. Fig 2.1, 2.2, 2.3(a), 2.7(d), 2.8(c), 2.143. Fig 3.1(b), 3.3(b), 3.6, 3.7, 3.8(a) & (b), 3.9, 3.10, 3.124. Fig 5.1, 5.15(only peptide)5. Fig 6.2, 6.3, 6.4(a), 6.5, 6.7, 6.8, 6.9, 6.10 structure of TRNA, 6.13,

6.146. Fig 7.87. Fig 8.1, 8.4, 8.68. Table 9.1, 9.29. Fig 10.2(a)&(c), 10.3(b), 10.810. Fig 11.1, 11.2, 11.4, 11.6, 11.7(a)&(b)11. Fig 12.312. Fig 13.3, 13.4, 13.513. Fig 14.2, 14.4(a), (b), (c), (d), 14.5, 14.714. Fig 15.215. Fig 16.1, 16.3, 16.5(only flow chart), 16.616. Fig 15.13(supplementary material)

Physics: A: WORKSHEET (to be answered in paper)

ELECTROSTATICS:1.State Gauss’s theorem in electrostatics. Apply this theorem to derive an

expression for electric field intensity at a point near an infinitely long straight charged wire.

2.Explain the underlying principle of working of a parallel plate capacitor3.A 20 µF capacitor is charged by a 30 V d.c. supply and then connected

across an uncharged 50 µF capacitor. Calculatei. the final potential difference across the combination.ii. Initial and final energies. How will you account for the

difference in energies?4. The battery remains connected to a parallel plate capacitor and a

dielectric slab is inserted between the plates. What will be the effect on its:

Page 2: loakuwait.comloakuwait.com/wp-content/uploads/2018/05/Class-12-Eng... · Web viewInternal resistance of a cell Resistance The resistance of a copper wire at 27 0C was found to be

i. capacityii. chargeiii. potential differenceiv. electric fieldv. energy stored?

5.An electric dipole is held in a uniform electric fieldi. Show that no translatory force acts on it.ii. Derive an expression for the torque acting on it.iii. The dipole is aligned parallel to the field. Calculate the work

done in rotating it through 1800

6.If two similar plates, each of area A having surface charge densities +σ and –σ are separated by a distance ‘d’ in air, write the expressions for

i. The electric field at points between the two plates.ii. The potential difference between the plates.iii. The capacitance of the capacitor so formed.

7.Define the term electric potential due to a point charge. Calculate the electric potential at the centre of a square of side √2 m, having charges 100 µC, -50µC, and 20µC and-60µC at the four corners of a square.

8.Two-point charges, q1 =10×10-8 C and q2 = -2×10-8 C are separated by a distance of 60 cm in air.

i. Find at what distance from the 1st charge, q1, would the electric potential be zero.

ii. Also calculate the electrostatic potential energy of the system.9.Two capacitors of capacitance 6µF and 12µF are connected in series with

a battery. The voltage across the 6µF capacitor is 2V. Compute the total battery voltage.

10. An electric dipole is free to move in a uniform electric field. Explain its motion when it is placed

i. parallel to the field,ii. perpendicular to the field.

11. An electric dipole of length 10 cm having charges ± 6×10-3 C, placed at 300 with respect to a uniform electric field experiences a torque of 6√3 N-m. Calculate

a. magnitude of electric fieldb. the potential energy of the dipole.

12. Electric charge is distributed uniformly on the surface of a spherical rubber balloon. Show how the value of electric intensity and potential vary

a. on the surfaceb. inside andc. outside?

13. Draw an equipotential surface for a system, consisting of two charges Q, -Q separated by a distance ‘r’ apart.

14. Show graphically the variation of charge ‘q’ with time’t’ when a condenser is charged.

15. What orientation of an electric dipole in a uniform electric field would correspond to stable equilibrium?

Page 3: loakuwait.comloakuwait.com/wp-content/uploads/2018/05/Class-12-Eng... · Web viewInternal resistance of a cell Resistance The resistance of a copper wire at 27 0C was found to be

CURRENT ELECTRICITY1.Define the following terms

i. Electromotive forceii. Drift velocityiii. Relaxation timeiv. Internal resistance of a cellv. Resistance

2.The resistance of a copper wire at 27 0C was found to be 100Ω and at 127 0C was found to be 105Ω. Find the temperate coeff of resistance

3.An aluminium wire has a resistance of 10Ω at 27 0C. The wire is heated to a temp of 527 0C. Find its new resistance if α = 10-3

4.Explain how a potentiometer can be used to compare the emf of 2 primary cells.

5.A potentiometer of length 4m is connected across 100V Power supply. It is then used to compare the emf of 2 primary cells. The balance point obtained with cell E1 is 1.5m and with cell E2 is 2m. Find the ratio E1/E2. How can a potentiometer be made more sensitive?

6.Potentiometer wire is of length 4m and has a resistance of 10ohms. It is connected in series with a resistance of 90 ohm to 200V power supply. Balance length for an unknown emf E is found to be 3m. Find the unknown value E.

7.A student while performing the potentiometer experiment could not obtain a null point. Mention two possible mistakes that he could have made

8.Two wires A and B are made of the same material, have the same area but lengths are in the Ratio 2:1. What will be ratio of current flowing through them when the same potential is applied across each of them?

9.Resistors of 2,3 and 6 ohm are connected in parallel across a 20 Volts power supply. Find the current, voltage and power loss in each resistance.

10. Explain the balancing condition for a wheatstones bridge. Explain the working of meterbridge to find the value of unknown resistance.

MAGNETIC EFFECTS OF CURRENT1.A current of 10 A flows through a straight wire. Calculate the magnitude

of magnetic field at a point 2 cm away from the wire. 2.A long straight wire carries a current of 35 A. What is the magnitude of

the field B at a point 20 cm from the wire?3.A current of 10 A flows through a circular coil of 1000 turns and radius

0.1m. Find the magnitude of magnetic field at the centre of coil and at the end of coil.

4.A circular coil of wire consisting of 100 turns, each of radius 8.0 cm carries a current of 0.40 A. What is the magnitude of the magnetic field B at the centre of the coil?

5.A long straight wire in the horizontal plane carries a current of 50 A in north to south direction. Given the magnitude and direction of B at a point 2.5 m east of the wire.

Page 4: loakuwait.comloakuwait.com/wp-content/uploads/2018/05/Class-12-Eng... · Web viewInternal resistance of a cell Resistance The resistance of a copper wire at 27 0C was found to be

6.A horizontal overhead power line carries a current of 90 A in east to west direction. What is the magnitude and direction of the magnetic field due to the current 1.5 m below the line?

7.What is the magnitude of magnetic force per unit length on a wire carrying a current of 8A and making an angle of 30º with the direction of a uniform magnetic field of 0.15 T?

8.A 3.0 cm wire carrying a current of 10 A is placed inside a solenoid perpendicular to its axis. The magnetic field inside the solenoid is given to be 0.27 T. What is the magnetic force on the wire?

9.A closely wound solenoid 80 cm long has 5 layers of windings of 400 turns each. The diameter of the solenoid is 1.8 cm. If the current carried is 8.0 A, estimate the magnitude of B inside the solenoid near its centre.

10. A current of 10 A flows in a circular coil of 1000 turns and radius 0.1 m. Find the magnitude of the magnetic field at the centre of the coil

B: RECORD WORKComplete the practical record for section A (7 experiments), Section B (8 experiments) and activities (5)C: PROJECT

Prepare a working model based on any of the following topic: Electricity Magnetism Optics Electronics

Make a project report (of the model) comprising: Acknowledgement Declaration Index Aim of the project Materials used Circuit diagram/ construction Theory Procedure Uses Scope for improvisation Bibliograph

Chemistry: Chemistry Practical Record Completion Salt Analysis-7 Volumetric Analysis -4 Organic Analysis-5 Preparation of Compound-4 Investigatory Project Based on The Topic Prescribed in The CBSE

Curriculam-1Business Studies:

Page 5: loakuwait.comloakuwait.com/wp-content/uploads/2018/05/Class-12-Eng... · Web viewInternal resistance of a cell Resistance The resistance of a copper wire at 27 0C was found to be

A handwritten project of 30 pages on any one of the following topics:

Marketing Principles of Management Stock Exchange Business Environment

Economics: Do the Project on any of the given topics:

Production Possibility Curve Demand & its Determinants Cost

Physical Education: Any one game of your choice out of the list above. Labelled

diagram of field and equipment rules. Terminologies and skills. Procedure for administering senior citizen fitness test for 5

elderly family members Procedure for Asanas, benefits and contraindication for any two

Asanas each lifestyle disease Conduct Barrow 3 item test on 10 students Modified AAHPER administration for all items

Informatics Practices – XII

1. a. Define the term Polymorphism. What are the two ways polymorphism is demonstrated in Java?

b. What is the importance of abstract classes in programming?

c. Write a short note on Operator overloading and Method Overloading citing examples for both.

d. Carefully study the code given below: String Message = "Hello! How are you?", Msg1, Msg2; Msg1 = Message.substring(7); Msg2 = Message.substring(0,5); What will be the contents of the variables Msg1 and Msg2 after the above statements are executed?

2 a. Zia is working with list box. She has placed a list control on her form to display thelist of all items available in her shop. She wants to allow the user to select multiple items from her list control. Which

Page 6: loakuwait.comloakuwait.com/wp-content/uploads/2018/05/Class-12-Eng... · Web viewInternal resistance of a cell Resistance The resistance of a copper wire at 27 0C was found to be

property of jList should she use to do the same?

b. Differentiate between Procedural Programming paradigm and the Object Oriented Programming paradigm

c. What is a class?

d. Name the 3 essential class libraries that we need to import for setting up the connection with the database and retrieve data from the database.

e. Design a GUI application in which the user enters a number in the text field and on clicking the button the sum of the digits of the number should be displayed in a label. Hint : Suppose user enters 123 the output should be 6(1+2+3).

3. a. Design a GUI application to accept a character in a text field and print in a label if that character is a vowel: a, e, i, o, or u. The application should be case sensitive.

b. Design a GUI application to reverse the given number and also find out whether the number is a palindrome or not.

c. Write the output produced by the following SQL commands:1. SELECT POW(4,3), POW(3,4);2. SELECT ROUND(543.5694,2), ROUND(543.5694), ROUND(543.5694,-1);3. SELECT TRUNCATE(543.5694,2), TRUNCATE(543.5694,-1);4. SELECT LENGTH("Prof. M. L. Sharma");5. SELECT CONCAT("SHEIKH", " HAROON") "FULL NAME";6. SELECT YEAR(CURDATE()), MONTH(CURDATE()), DAY(CURDATE());7. SELECT DAYOFYEAR(CURDATE()), DAYOFMONTH(CURDATE()), DAYNAME(CURDATE());8. SELECT LEFT("Unicode",3), RIGHT("Unicode",4);9. SELECT INSTR("UNICODE","CO"), INSTR("UNICODE","CD");10. SELECT MID("Informatics",3,4), SUBSTR("Practices",3);

4. a. Rewrite the following code using while loop:int a,b;for(a=10,b=4;a<=16;a++,b+=2){jTextArea1.append(""+a++);}JOptionPane.showMessageDialog(null,"Finished!!!");

Page 7: loakuwait.comloakuwait.com/wp-content/uploads/2018/05/Class-12-Eng... · Web viewInternal resistance of a cell Resistance The resistance of a copper wire at 27 0C was found to be

b. What will be displayed in jTextArea1 after the execution of the following loop? for (int I=5; I>=2;I– –) jTextArea1.setText(jTextArea1.getText() + " "+Integer.toString(I*I));

c. What will be the values of num and num1 after execution of the following code?int num, num1=0;for(num=100;num<=101;num++){num1= num+2;--num1;}

d. What will be the value of count and x after execution of the following code?int count=0,x=9;count=x- -;do{count+=x - -;}while(x>6);System.out.println("Count # " + count + " X # "+ x);

5 a. What will be the contents of jTeftField1 after executing the following code:String str = “Mahatma”; jTextField1.setText( str.substring(4));

b. The following code has some error(s). Rewrite the correct code underlining all the corrections madeint z; z = 14;do; z = z-2; System.out.displayln(z);}while z >= 2;

c. Raman has typed the following code:int ch=Integer.parseInt(jTextField1.getText());switch(ch){case 1:jTextField2.setText("Service");case 2: jTextField2.setText("Complaint");case 3: jTextField2.setText("Operator");

Page 8: loakuwait.comloakuwait.com/wp-content/uploads/2018/05/Class-12-Eng... · Web viewInternal resistance of a cell Resistance The resistance of a copper wire at 27 0C was found to be

break;default: jTextField2.setText("Not a valid entry");}On entering the value 1, 2 or 3, he is getting the same output. Mention the possible reason for the same.

6 a. Richika is a programmer at Alpha Builders. To calculate wages to be paid to labourers she has developed the following GUI in Netbeans.

Male and Female labourers are respectively paid at the rate of Rs. 140/- per day and Rs. 160/-per day. Skilled labourers are paid extra at the rate of Rs. 50/- per day002E

i What should be done so that only one of the radio buttons (Male and Female) can be selected at a time?

ii Write Java code to do the following.a. Calculate and display the Total Wages in the corresponding label when the “Calculate Wages” button is pressed.b. Clear the Name and No. of Days worked Text Fields.c. Close the application when the “Stop” button is pressed.

b Mr. Rangaswami works at a Recreation Park as a system analyst. He has created the following GUI. When a group arrives at the Recreation Park, the number of people in the group and whether the group wants to enjoy the Water Park or not is entered. Entry fees is < 500 per person. The person can choose to play at Water Park by selecting thecheckbox. Rides of Water Park will cost < 250 extra per person.

Page 9: loakuwait.comloakuwait.com/wp-content/uploads/2018/05/Class-12-Eng... · Web viewInternal resistance of a cell Resistance The resistance of a copper wire at 27 0C was found to be

Help him to write code for the following :i On the click of command button ‘Calculate’, textfield for

‘Entry Fees’ should display Entry Fees per person X Number of people. If ‘Water Park’ checkbox is selected, textfield for ‘Water Park Charges’ should display Water Park Charges per person X Number of people. Textfield for ‘Total Amount’ should display sum of Entry Fees and Water Park Charges for all the people in the group.Write Java code to clear all Textboxes on the click of ‘Clear’ button.

ii Write Java code to close the application on the click of ‘Exit’ button.

c Ms. Rakhi works in an International Bank as an IT Head. She designed a simpleinterest calculator program as shown below:

Page 10: loakuwait.comloakuwait.com/wp-content/uploads/2018/05/Class-12-Eng... · Web viewInternal resistance of a cell Resistance The resistance of a copper wire at 27 0C was found to be

i The interest rate is given based on the account type as shown below:ACCOUNT TYPE INTEREST RATE %SAVING 4%RECURRING DEPOSIT 6%FIXED DEPOSIT 8%

Write the code required for ‘INTEREST RATE’ button to display interest rateas per the above given criteria.

ii Write the code required for ‘SI’ button to calculate and display ‘SimpleInterest’ based on the given formulae:SI=(amount*interest_rate*duration)/100;

iii Write the code required for ‘CLEAR ALL’ to clear all the textfields.

d. Ms. Sheela works in a shopping mall. To calculate net payable amount she has developed the following GUI in NetBeans. The shop accepts payments in three modes- Cash, Debit Card, Credit Cards. The discount given as per mode of payment is as follows:

Mode of payment DiscountCash 12%Debit Card NilCredit Card 8%

Page 11: loakuwait.comloakuwait.com/wp-content/uploads/2018/05/Class-12-Eng... · Web viewInternal resistance of a cell Resistance The resistance of a copper wire at 27 0C was found to be

If the Member check box is checked then the customer gets an additional discount of 5% on net payable amount.

i Write the code to make the textfields for Discount ( txtDiscount ) and Net Payable (txtNetPayable) uneditable.

ii Write code to do the followinga) When Calculate button is clicked the discount and net payable amount is calculated as per the given criteria and displayed in discount and net payable text boxes.b) When Clear button is clicked all the text boxes should be clear.c) Close the application when Exit button is pressed.

e. Shekhar is a junior programmer at ducom Enterprises. He created the following GUI in Netbeans.

Help him to write code for the following:i To calculate Income Tax to be paid and display in jTextField4

on the click of the Command Button “Calculate Income Tax” as per the following condition:If the Basic is less than 50000 then IncomeTax = Basic*0.2And if it is greater than or equal to 50000 then IncomeTax=Basic *0.3

ii To calculate Salary and display in jTextField5 on the click of Command Button “Calculate_Salary”.Hint:Salary=(Basic + DearnessAllowance + HouseRentAllowance) - IncomeTax

iii To Clear all Text Fields on the click of Command Button “Clear”.

Page 12: loakuwait.comloakuwait.com/wp-content/uploads/2018/05/Class-12-Eng... · Web viewInternal resistance of a cell Resistance The resistance of a copper wire at 27 0C was found to be

f. Read the following case study and answer the questions that follow.

i TeachWell Public School wants to computerize the employee salary section. The School is having two categories of employees: Teaching and Non-Teaching. The Teaching employees are further categorized into PGTs, TGTs and PRTs having different Basic Salary. The School gives addition pay of 3000 for employees who are working for more than 10 years.

ii Write the code to calculate the Basic salary, deductions, gross salary and net salary based on the given specification.Add 3000 to net salary if employee is working for more than 10 years. Gross salary=Basic salary + DA + HRANet salary = Gross salary – deductions

Page 13: loakuwait.comloakuwait.com/wp-content/uploads/2018/05/Class-12-Eng... · Web viewInternal resistance of a cell Resistance The resistance of a copper wire at 27 0C was found to be

i Write the code to clear all TextFields, uncheck checkbox and set non-teaching as the default category.

ii Write the code to exit the application. Also display a message “Thank you” before exiting the application.

iii Write the code to disable Text Fields for gross salary, deductions and net salary.

7 a Write a Java code that takes one integer type value from jTextField1. If value is negative then make it positive and replace that in the jTextField1. If value is positive then display the message using a label with suitable message: “Value is Positive”.

b Write Java code that takes the price of a pencil from jTextField1 and quantity of pencils from jTextField2 and calculates total amount as price * quantity to be displayed in jTextField3 and also find 10% tax amount to be displayed in jTextField4.

c. Write Java code that takes the price of a pencil from jTextField1 and quantity

Page 14: loakuwait.comloakuwait.com/wp-content/uploads/2018/05/Class-12-Eng... · Web viewInternal resistance of a cell Resistance The resistance of a copper wire at 27 0C was found to be

of pencils from jTextField2 and calculates total amount as price * quantity tobe displayed in jTextField3 and also find 10% tax amount to be displayed injTextField4.

8 a The following code has error(s). Rewrite the correct code underlining all the corrections made:String str1 = SeemaSurakshabal;int b;for (int b = 0; b < 3, b++) {jTextArea1.showText(str1+"\n");str1 = str1 + b ;}

b. What is the output produced by following code fragment?float x = 9;float y = 5;int z = (int) (x/y);switch(z){case 1: x = x + 2;case 2: x = x + 3;default: x = x + 1;}System.out.println(“Value of x: “+ x );

b. Fill in the blanks:Class.forName("java.sql.DriverManager");_________ con= (Connection)DriverManager.getConnection("jdbc:mysql://____________/database","user","abcd");Statement stmt=(Statement) con._______________;stmt.____________________("SELECT * FROM ITEMS';");

c What is JDBC? What is the importance of JDBC in establishing database connectivity?

d Define inheritance with reference to object oriented programming.

Page 15: loakuwait.comloakuwait.com/wp-content/uploads/2018/05/Class-12-Eng... · Web viewInternal resistance of a cell Resistance The resistance of a copper wire at 27 0C was found to be

9 a If a database "Student" exists, which MySql command helps you to start working in that database?

b. Sahil created a table in Mysql. Later-on he found that there should have been another column in the table. Which command should he use to add another column to the table?

c. Pooja, a student of class XI, created a table "Book". Price is a column of this table. To find the details of books whose prices have not been entered she wrote the following query: Select * from Book where Price = NULL; Help Pooja to run the query by removing the errors from the query and rewriting it.

d. The LastName column of a table "Directory" is given below: LastNameBatra SehgalBhatia SharmaMehta

Based on this information, find the output of the following queries:

i. SELECT lastname FROM Directory WHERE lastname like "_a%";

ii SELECT lastname FROM Directory WHERE lastname not like "%a";

e. A table "Stock" in a database has 5 columns and contains 17 records. What is the degree and cardinality of this table?

f. Write an SQL query to create the table 'Item' with the following structure:

Computer Science – C++

Page 16: loakuwait.comloakuwait.com/wp-content/uploads/2018/05/Class-12-Eng... · Web viewInternal resistance of a cell Resistance The resistance of a copper wire at 27 0C was found to be

1. Which C++ header file (s) will be included to run /execute the following C++ code?void main( ){float Last =26.5698742658; cout<<setw(5)<<setprecision(9)<<Last;}

2. Identify the errors in the following program code:#include<iostream.h> void main( )int A[10]; A=[3,2,5,4,7,9,10];for( p = 0; p<=6; p++){ if(A[p]%2==0)int S = S+A[p]; } cout<<S;}

3. Give the output of the following program:#include<iostream.h> int global=10;void func(int &x, int y){x=x-y ; y=x*10;cout<<x<<’,’<<y <<”\n”;}void main(){int global=7 ;func( ::global,global) ; cout<<global<<’,’<<::global<<”\n”; func(global,::global) ; cout<<global<<’,’<<::global<<”\n”;}

4. Find the output of the following program :#include<iostream.h>void switchover(int A[ ],int N, int split){for(int K = 0; K<N; K++) if(K<split)A[K] += K;else A[K]*= K;}void display(int A[ ] ,int N){for(int K = 0; K<N; K++)(K%2== 0) ?cout<<A[K]<<"%" : cout<<A[K]<<endl;}void main( ){int H[ ] = {5,10,20,50,40,30};

Page 17: loakuwait.comloakuwait.com/wp-content/uploads/2018/05/Class-12-Eng... · Web viewInternal resistance of a cell Resistance The resistance of a copper wire at 27 0C was found to be

switchover(H,6,3); display(H,6);}

5. Answer the questions (i) and (ii) after going through the following program:#include<iostream.h> #include<string.h> class AirIndia{char flno[20]; int Nop; public:AirIndia() //function1{strcpy(flno,” ”); Nop=0;}AirIndia( char *str,int n) //function2{strcpy(flno,str); Nop=n;}void input( ) //function3{cin>>flno; cin>>Nop;}~AirIndia() //function4{cout<<”counter closed”<<endl;}};In Object Oriented Programming, which concept do Function1 and Function2 illustrate together? Write the statement to call these functions.What is the scope of two data members of the class AirIndia? What does the scope of data members depend upon?

6. Define a class cricket in C++ with the following description: Private members:Target_score of type integerOvers_bowled of type integerExtra_time of type integerPenalty of type integerCal_penalty() a member function to calculate penalty as follows: If extra_time<=10, penalty=1If extra_time>10 but <=20 penalty=2, otherwise, penalty=5Public members:A function Enterdata () to allow user to enter values for Target_score, Over_bowled, Extra_time and a statement to call Cal_penalty( ).A function DispData( ) to allow user to view the contents of all data members.

7. Consider the following and answer the questions given below:

Page 18: loakuwait.comloakuwait.com/wp-content/uploads/2018/05/Class-12-Eng... · Web viewInternal resistance of a cell Resistance The resistance of a copper wire at 27 0C was found to be

class MNC{char Cname[25]; protected:char Hoffice[25]; public:MNC();char Country[25]; void EnterDate ( ); void DisplayData ( );};class Branch:public MNC{long NOE;char Ctry[25]; protected:void Association( ); public:Branch( ); void Add( ); void Show( );};class Outlet: public Branch{char State[25]; public:Outlet( ); void Enter (); void Output();};Which class’s constructor will be called first at the time of declaration of an object of class Outlet?How many bytes an object belonging to class Outlet require?Name the member function(s), which are accessed from the object(s) of class Outlet.Name the data member(s), which are accessible from the object(s) of class Branch

8. Observe the program segment given below carefully and fill the blanks marked statement1 and statement 2 using seekg( ) and tellg( ) function for performing the required task.#include<fstream.h> class Employee{int Eno;char Ename[30]; public:int Countrec( ); //Function to count the total number ofrecords};int Employee:: Countrec( ){fstream File; File.open(“Emp.Dat”,ios::binary||ios::in);// Statement 1 int Bytes = // Statement 2 int count = Bytes/sizeof(Employee); File.close( );return count;}

9. Find the syntax error(s), if any, in the following program :#include (iostream.h) void main( )

Page 19: loakuwait.comloakuwait.com/wp-content/uploads/2018/05/Class-12-Eng... · Web viewInternal resistance of a cell Resistance The resistance of a copper wire at 27 0C was found to be

{int X, Y; cin >> X;for (Y = 0; y < 10, Y++)If X == Ycout << Y+X; elsecout >> Y;}

10. Write the output of the following program :#include<iostream.h>void Execute(int &B, int C = 100){int TEMP = B+C; B += TEMP; if(C != 200)cout << TEMP << B << C << endl;}void main ( ){int M = 90, N = 10;Execute(M);cout << M << N << endl; Execute(M, N);cout << M << N << endl;}

11. Consider the following declarations and answer the questions given below :class WORLD{int H; protected : int S; public :void INPUT(int); void OUTPUT();};class COUNTRY : private WORLD{int T; protected : int U; public :void INDATA( int, int) void OUTDATA();};class STATE : public COUNTRY{int M; public :void DISPLAY (void);};Name the base class and derived class of the class COUNTRY.Name the data member(s) that can be accessed from function DISPLAY().Name the member function(s), which can be accessed from the objects of class STATE.Is the member function OUTPUT() accessible by the objects of the class COUNTRY ?

Page 20: loakuwait.comloakuwait.com/wp-content/uploads/2018/05/Class-12-Eng... · Web viewInternal resistance of a cell Resistance The resistance of a copper wire at 27 0C was found to be

12. Find syntax error(s), if any, in the following program :#include<iostream.h> void main(){int x, y; cin >> x;for (x=0; x<5; << ++x) cout y else cout << x << y;}

13. Consider the following declarations and answer the questions given below :class living_being{char name[20]; protected: int jaws; public:void inputdata(char, int); void outputdata();}class animal : protected living_being{int tail; protected: int legs; public:void readdata(int, int); void writedata();};class cow : private animal{char horn_size;public:void fetchdata(char); void displaydata();};Name the base class and derived class of the class animal.Name the data member(s) that can be accessed from function displaydata.Name the data member(s) that can be accessed by an object of cow class.Is the member function outputdata accessible to the objects of animal class.

Page 21: loakuwait.comloakuwait.com/wp-content/uploads/2018/05/Class-12-Eng... · Web viewInternal resistance of a cell Resistance The resistance of a copper wire at 27 0C was found to be

14. Will the following program execute successfully? If not, state the reason(s).#include<iostream.h> void main(){int x, sum = 0; cin<<n;for (x=1, x<100, x+=2) if x % 2= =0sum+=x; cout<<"SUM=">>sum;}

15. Give the output of the following program segment(Assume all required header files are included in the program) :char *s = "GOODLUCK";for (int x = 0;x<strlen(s)–1 ; x>=0; x––){for ( int y=0; y<=x; y++) cout<<s[y]; cout<<endl;}

16. Write the output of the following program :#include<iostream.h> int a=3;void demo(int x, int y, int &z){a += x+y; z = a+y; y += x;cout<<x<<y<<z<<endl;}void main(){int a=2, b=5; demo(: :a, a, b);cout<<: : a <<a<<b<<endl;demo(: : a , a, b ); }

17. Define a class report with the following specification : Private members :adno 4 digit admission numbername 20 charactersmarks an array of 5 floating point valuesaverage average marks obtainedgetavg() to compute the average obtained in five subjectsPublic members :readinfo() function to accept values for adno, name, marks, and invoke the function getavg().displayinfo() function to display all data members on the screen you should give function definitions.

18. Consider the following and answer the questions given below :

Page 22: loakuwait.comloakuwait.com/wp-content/uploads/2018/05/Class-12-Eng... · Web viewInternal resistance of a cell Resistance The resistance of a copper wire at 27 0C was found to be

class A{void anyval();protected :int x, y;public :void getvalA();void putvalA();};class B : protected A{int a, b;protected :int c, d;void getvalB;public :void putvalB( );};class C : public B{int P;protected :int q;void getval( );public :void showval( );};(i) Name all the member functions, which are accessible by the objects of class C.(ii) Name all the protected members of class B.(iii) Name the base class and derived class of class B.(iv) Name the data members, which are accessible from member functions of class C.

19. Consider the following class declaration :class employee{int code;char name [20];float salary;public :void input( ){cin>>code>>name>>salary;}void show( )

Page 23: loakuwait.comloakuwait.com/wp-content/uploads/2018/05/Class-12-Eng... · Web viewInternal resistance of a cell Resistance The resistance of a copper wire at 27 0C was found to be

{cout<<code<<name<<salary<<endl;}float retsal(){return salary;}};Give function definitions to do the following:Write the objects of employee to a binary file.Read the objects of employee from a binary file and display all the objects on the screen where salary is between Rs. 10,000 and Rs. 20,000.

20. Identify the syntax error(s), if any, in the following program. Also, give reason for errors.void main(){const int i = 20;const int * const ptr = &i; (*ptr)++;int j = 15; ptr = &j;}