Total Pages—7 KNU/19/BCA/6th Sem/C602
2019
6th Semester
BCA
PAPER—C602
(Honours)
Full Marks : 80 Time : 4 Hours
The figures in the right-hand margin indicate full marks.
Candidates are required to give their answers in their
own words as far as practicable.
Illustrate the answers wherever necessary.
C#.NET
1. Answer any ten questions : 1×10
(a) How do your convert string to a number in C# ?
(b) What is MSIL ?
(c) What is CLR ?
(d) How does ReadLine() method works ?
(e) Why do we use the ‘using’ directive in a C# program ?
(f) What is output parameter ?
(g) Write statement to declare a variable size array.
(h) Write the use of String Builder class.
KNU/19/BCA/6th Sem/C602 TB—425 (Turn Over)
2 7
(i) When do we use Syestem. Text namespace ? Write a driver program to generate an array of three
(j) How concatenation achieved in C# ? ordinary empolyee and another array of three
(k) What is read-only property ? specialist and display information about them.
5+5
(l) What is finalization ?
(m) What is private constructor ?
(n) What is a virtual method ?
(o) How late binding is achieved in C# ?
(p) What is thread pool ?
2. Answer any ten questions : 2×10
(a) How is C# better than Java ?
(b) What is .NET framework ?
(c) What is an alias ? Where and how it is used ?
(d) How does the Write() method differ from WriteLine()
method ?
(e) State the rules that govern the naming of variable.
(f) What do you mean by explicit conversion ?
(g) Given the value of a variable, write a C# statement
(without using if construct) that will produce the
absolute value of the variable.
(h) What is ‘fallthrough’ in switch statement ? How is
achieved in C# ?
KNU/19/BCA/6th Sem/C602 (Continued) KNU/19/BCA/6th Sem/C602 (Turn Over)
6 3
(c) What is an Interface ? What are the major differences (i) Write the difference between ‘for’ and ‘foreach’
between interface and class ? Given an example statement.
where interfaces can be used to support multiple (j) What is a label ? How and when a label is used in a
program ?
inheritance.
(k) How would you create a mutable string ? How does it
(d) Define a class called MyString with the following differ from creating an immutable string ?
features : (l) What is enumeration ? How it is useful in C#
programming ?
• An overloaded binary + operator that concatenate
two MyString objects and create a third object. (m) What is a delegate ? What is it use for ?
(n) What is format string ? How does it help produce
• An overloaded comparison operator == to compare outputs ?
two strings.
(o) List at least four exceptions that occur commonly in
• An overloaded unary ‘−’ (minus) operator that C# program.
returns true if the MyString object is empty, (p) What do you mean by language interoperability in
otherwise false. C# ?
(e) Define a Person class with three data members : age, 3. Answer any six questions : 5×6
name and sex. (a) What are the various forms of ‘if’ statement and their
specific uses ?
• Define a class called Employee from Person that (b) Write a program to print the following Floyd’s triangle :
adds a data member code to store employee code. 1
2 3
• Derive another class Specialist from Employee. 4 5 6
7 8 9 10
• Add a method to each derived class to display the 11 … … … 15
information about what it is. …
…
79 … … … … … …91
KNU/19/BCA/6th Sem/C602 (Continued) KNU/19/BCA/6th Sem/C602 (Turn Over)
4 5
(c) What are reference parameters ? When do we use Radio Button the back color of Text Box will change
them ? Give an Example. to YELLOW and If we select the 3rd Radio Buton the
back color of the Text Box will change to RED.
(d) Write a method Prime() that returns true if its
argument is prime and returns false otherwise. Speed Checker Alarm
Below 60 Km/Hr
(e) Wrtie a void type method that takes two int type value
Above 60 below 100 Km/Hr
parameters and one int type out parameter that
returns the product of two value parameters through 100 KM/Hr or above
the output parameter. Write a program to test its
Text Box showing Color change
working.
4. Answer any two questions : 10×2
(f) How does an array of Array List class differ from an
array of Array class ? Explain with an example.
(a) Develop a program to calculate the standard deviation
of an array of values. Use methods ‘Standard()’ and
(g) State the differences between classes and structs ?
‘Mean()’ to calculate standard deviation and mean of
In what ways are they similar ?
the values.
(h) What is a properly ? Why are they referred to as smart
(b) Design a class Date with the following members :
field ? List some features of properties.
• Data members day, month and year.
(i) Write a console C# program to check the number is
• A constructor to provide values to the data
strong or not.
members (using three parameters).
(j) Write the proper code in C# for the given design in • A method to display the date in the format day/
which if we select the 1st Radio Buton the back color month/year.
of Text Box will change to GREEN, If we select the 2nd Write a program to inplement the class Date.
KNU/19/BCA/6th Sem/C602 (Continued) KNU/19/BCA/6th Sem/C602 (Turn Over)