VTU Previous Question Papers BE CS Seventh Semester
C # Programming and .Net Dec 2010
1 a. What are the building blocks of.Net frame works? Show their relationship, with a neat block diagram. Explain CTS, in detail.
b. What is .Net assembly? What does it contain? Explain each of them.
2 a. Explain with a neat diagram, the workflow that takes place between your source code, a given .Net compiler and the .Net execution engine.
b. What is cordbg.exe? List and explain any five command line flags recognized by crdbg.exe while running .Net assemblies under debug mode.
c. What is csc.rsp file? Where is it located?
3 a. Why System .Object is called master node? List and explain any three instance methods and static methods of System Object.
b. What are the method parameter modifiers? Explain any two C# method parameter modifiers, with an example.
c. With an illustrative example, explain what happens when reference type is passed by value and when reference type is passed by reference.
4 a. What are the three pillars of object oriented programming in C#? Differentiate between “is-a” and “has-a” relationships.
b. What is a property in C#? Why is it used? What is the advantage of using property over traditional accessor and mutator methods?
C. Define a person class with three data members : age, name and sex.
- Create appropriate constructor.
- Derive a class called employee from person that adds a data member code to store employee code.
- Derive another class called specialist from employee.
- Add a method to each of the derived class to display information about what it is.
Write a driver program to generate an array of three ordinary employees and another array of three specialist and display information about them. Also display the information of the specialist by balling the method inherited from employee class.
5 a. List and explain with code, the core members of system. Exception type.
b. Define a method that would sort an array of integers. Incorporate exception handling mechanism for “index out of bounds” situation. Develop a main program that employs this method to sort a given set of integers.
6 a. What is an interface? Why they are used in C# programming? With an example, explain any four interfaces of System . Collection.
b. Write a C# program which contains the following:
- An interface called dimension with the methods length ( ) and width ( ), which returns length and width in centimeters.
- Another interface called metric dimension with the methods lengthinches ( ) and widthinches (), which returns length and width in inches.
- A class box that implements both the above said interfaces. This class has two data members lenghtinches and widthinches.
Define appropriate constructor for the class box. Write a main program to create an instance of box and to display the box length and width in inches and centimeters by invoking the appropriate methods of two interfaces.
7 a. What is a delegate? Differentiate between synchronous and asynchronous delegate, with examples.
b. Write a complete C# program to calculate and display simple interest by writing appropriate methods which could be called through delegate method of programming.
8 a. Explain the two conceptual views of .Net assembly with a neat diagram benefits of this?
b- Write short notes on the following:
i) Classic COM binaries versus .Net assemblies
ii) Cross language inheritance.