Вы находитесь на странице: 1из 2
Pe Oct 4 82 CAF - Dork ROW/Z702-06. Note: 1@) (b) © @ © 24a) (b) & @ 3.@) (by © 4.(a) ) (©) 0-2493 (9 Hours) [Total Marks : 400 1. Q.Lis compulsory. 2. All questions carry equat marks. 34 Figures on the right indicate maximum marks. 4y Attempt any four questions from Q.2. to Q.7. What is nesting of methods? Give an example of me:hod nesting. 4 Explain how an array of ArrayList class differs from an array of Array class. 4 ‘What is early binding? Explain it with an example. 4 What is an exception? Distinguish between parameterless catch and catch (Exception ¢) statements, 4 What is operator overloading? What is the need to overload an operator? 4 State fourteen significant differences between C# and Sava. 7 What is method overloading? Give two examples where method overloading is applicable. a ‘Write the syntax for each of the following: 3 () Delegate Invocation. (ii) Event Declaration. (ii) Delegate instantiation, ‘Write the general form of the following: 3 (i) Interface Defination. Gi) Operator method. What is a class? Explain with an example. When do we use static variables and static methods? 1 Explain with example exception handling mechanism. List any five common CH exceptions. 7 What is inheritance? Deseribe the visibility of class members declared with the following modifiers. 6 (i) private. Gi) protected. (iii) protected internal, Given a list of marks ranging from 0 to 100, write a C# program to compute and print the number « students who have obtained motks, 1 () inthe range 81 to 100. Gi) in the range 61 to 80. (iii) inthe range 41 to 60 and (iv) _ in the range 0 to 40, Write a niethod Prime that returns ¢rue if argument is a prime number and returns false otherwise, 7 Explain with syntax and example the following methods of string class. 6 (Substring) (ii) indexOfD Pr, 02) oF 83 (CROU/2702-CD-2493-04, 2 5a) Define an interface power that contains three methods viz. @ tocalculate the square of the given number. (ii) to calculate cube of the given number. Gil) to calculate power of ‘m” raised to ‘n’ Define a class Demo that implements this interface. Write a main method to check your code. (b) Write a C# program that will take 10 integer numbers from command line and then print all the numbers that are divisible by 5 and 7. Also print the sum of all these numbers. (©) Explain the following ArrayList methods. @ Addo (i RemoveAt() Gi) Sort (iv) Count 64a) What is a delegate? Explain with an example, What is multicast delegate? Write the conditions that multicast delegates must satisfy. (b) Write a C# program that will read the value of *x’ and evaluate the value of ‘y’ as follows : y= for x>0 y=0 for x=0 1 for x<0 y using elseif statement. (©) “We cannot apply a sealed modifier to abstract class”. Comment. (@ Write a program {o covert the given temperature in Fahrenheit to Celsius, (Formula: C= -32)/18] 7.) Explain what is constructor? Explain the following types of constructors, (Static Constructor. i) Private Constructor. (ii) Copy Constructor. (b) Write a class Date that includes data members day, month and year and methods that could in alement the following tasks. () Read a date frum keyboard. Gi) Display a date. (ii) Increment a date by one day. (iv) Compare two cates to sce which is greater. ‘Write a main method to check your code. (©) Distinguish between Write and WriteLine methods with examples.

Вам также может понравиться