Sei sulla pagina 1di 1

Seventh

Semester

B.E. Degree

~ of ~~

aRM Institute of Tschnotog'l

",".8Dd

&toP. BAN~&-1"

Examination,

Dec.

07 I Jan.

CS761

08

C # Programming and .NET Concepts

.Note:

1. Answer

2. Diagrams

any FIVE full

if any,

must

.

questions.

be neatly

drawn.

~ax.~arks:lOO

1

a. What is .NET? With a neat diagram explain the important building blocks of .NET platform. (10 Marks)

b. Explain with a neat diagram the workflow that takes place between your source code, a given

.NET compiler and the .NET execution engine.

 

(05 Marks)

2

c. What are the key features of C#?

(05 Marks)

a. Explain the following aspects ofVS.NET

IDE:

 

i) Solution Explorer

ii) Referencing external assemblies

 

Hi) Running and debugging iv) Documenting code via XML.

 

(12 Marks)

b. Write a program to count the objects created for a class. Define your own class.

(08 Marks)

3

a. Differentiate between the following with an example:

 

i)

Singlefile and Multifile Assembly

ii) Value types and Reference types

 

Hi)

Boxing and Unboxing

iv)

Shallow copy and Deep copy.

(10 Marks)

b. Write a C# application which defines a class shape, with four data members length, breadth, height and radius, appropriate constructors and methods to calculate the volume of cube, cone

and sphere. Also write shapeapp,

which creates these 3 objects i.e., cube, cone and sphere

'Using appropriate

methods

constructors

and calculates their volume with the help of the above class

(10 Marks)

4

What are the two ways of enforcing encapsulation?

Give examples for

a. What is encapsulation? both methods.

(08Marks)

b. Write a program to define a class vehicle and a class engine. Let the vehicle class contain engine. The engine should be started at the source and stopped after reaching the destination.

Let the speed and the distance

be read. The program should throw

an exception when the

vehicle tries to travel beyond destination. Develop the application in C #. (12 Marks)

5

a. What

do you understand

by the terms

errors,

bugs

and exceptions?

Give the important

members of the System.

Exception class. Illustrate the use of tbis class in throwing generic

exceptions.

(10 Marks)

b. When do you override

the

virtual System.

Object.

Finalise

(

)

method?

How do you

implement it using destructors? Why do we avoid using destructors in C # application? (06 Marks)

c. Explain how garbage collection is optimized in .NET.

 

(04 Marks)

6

a. How are interfaces different from abstract classes?

(04 Marks)

b. Explain the polymorphic behaviour of interfaces with example. (06 Marks)

c. Design an Employee class which is derived from Person class having common behaviour of

the employees. The employees can exhibit different behaviours like C # experts, Java expert or expert in both. Develop an application which accepts an employee.array and counts the number

of employee expert in C #, expert in Java and experts in both. Make

suitable assumptions. (10 Marks)

7

a. What

is a Delegate?

Differentiate

between

synchronous

and asynchronous

delegates with

suitable examples.

b. What is an Indexer? Explain

with an example.

Differentiate between

(12 Marks) indexer and property. (08 Marks)

8

a. Explain the two conceptual

views of a .NET assembly with neat diagrams.

What are the core

benefits

of this format?

(12 Marks)

b. Is cross language inheritance

possible on .NET platform? If yes, explain

with an example.

how it is achieved (04 Marks)

c. Explain how do you make use of shared assembly ***** in your application.

(04 Marks)