VTU Previous Question Papers BE CS Seventh Semester
C# Programming and .Net June 2010
Note: Answer any FIVE full questions, selecting at least TWO questions from each part.
1 a. Briefly explain the history of .NET. Explain the building components of .NET and their responsibilities.
b. Explain Jitter, along with its benefits. Explain how CLR host an application on .NET platform. Give the block diagram. c. What is an assembly? Explain each component of an assembly. Differentiate between single file assembly and multifile assembly.
2 a. Explain how CSC. exe computer is used to build C # application. Explain any five flags with appropriate examples.
b. Write a program to count the number of objcct instances created inside or outside of an assembly.
c. With a program, demonstrate, how an assignment operation, between value types and reference types differ.
3 a. Explain the method parameter modifiers. Demonstrate with a function definition and function call for each modifier.
b. Explain the functions of system, object class. Give overrided definition for Tostring() and equals ( ).
c. Write a program in C# to read a Jagged array and display the sum of all the elements of three inner arrays.
4 a. Explain how encapsulation is enforced in C#, with a small program for cach method.
b. Implement the following hierarchy of classes to demonstrate abstract functions in CU.
Class employee : [Fields : name, Emp_id, Basic sal, Methods : abstract method compute-Bonus() virtual method calculate – Sal()]Class manager : Derived from employee [ Fields: TotalSales Methods : comute_Bonus() to give
– 5 % of basicSal as bonus if Total_Sales> 10,000
– 2 % of basic Sal as bonus if TotalSales < 10,000
Calculate Sal () to calculate the salary as basic + 12 % DA + Bonus.]
Write driver program to create an array of 3 managers and display their total salary. Use appropriate constructors.
5 a. Explain the process of finalizing objects in .NET environment. Give the members of system. GC and explain their usage, with examples.
b. Write a program in C# to throw and handle the following exceptions in banking application. Minimum Balance Exception : when balance is lets than 1000
Argument Out Range Exception : If the amount deposited is greater than the capacity of an int. which in an argument to deposit function. Display the details of each exception. Use required members and methods to support the logic.
6 a. What is an interface? With a program demonstrate the implicit and explicit access of interfaces.
b. Write a program in C# to sort an array of student objects having rollno, name and marks in two subjects.
– display the array sorted on names
– display the array based on average marks.
7 a. What are delegates? Explain the members of system. Multicast Delegatcs : Give a small program to implant multicasting.
b. W’rite a program in C# to implant operator over loading of + and – for adding subtracting two square matrices.
8 Write short notes on :
a. Interfaces of system collection
c. Shared assemblies
d. Mutable and immutable strings.