IT4302: Rapid Application Development: University of Colombo, Sri Lanka
IT4302: Rapid Application Development: University of Colombo, Sri Lanka
Important Instructions:
• The duration of the paper is 2(Two) hours.
• The medium of instruction and questions is English.
• The paper has 50 questions and 12 pages.
• All questions are of the MCQ (Multiple Choice Questions) type.
• All questions should be answered.
• Each question will have 5 (five) choices with one or more correct answers.
• All questions will carry equal marks.
• There will be a penalty for incorrect responses to discourage guessing.
• The mark given for a question will vary from –1 (All the incorrect choices are
marked & no correct choices marked) to +1 (All the correct choices are marked &
no incorrect choices are marked).
• Answers should be marked on the special answer sheet provided.
• Note that questions appear on both sides of the paper.
If a page is not printed, please inform the supervisor immediately.
• Mark the correct choices on the question paper first and then transfer them to the
given answer sheet which will be machine marked. Please completely read and
follow the instructions given on the other side of the answer sheet before
you shade your correct choices.
1
1) Select the option(s) which is/are incorrect.
(a) A variable name must begin with a letter.
(b) A variable name cannot contain a period.
(c) A variable name must not exceed 255 characters.
(d) A variable name cannot contain the ‘&’ character.
(e) A variable name must be unique within the same scope.
5) Identify the correct declaration(s) for an array in VB.Net to hold the names of at least 16
employees.
(a) Dim Names() as string (b) Dim Names(1 To 16) as string
(c) Dim Names(15) as Object (d) Dim Names()=15
(e) Dim Names as String(16)
(a) can be accessed from any Form in the project where myMod is declared.
(b) cannot be accessed from any Form in the project where myMod is declared.
(c) can be accessed from any Form in the project where myMod is declared only by using
myMod.myName.
(d) cannot be accessed from any class in the project where myMod is declared.
(e) can only be accessed from a private function in a Form where myMod is declared.
2
7) What is the output you expect by GetMyName(myName) function call?
9) A variable declared with the Dim statement in a Module has the same scope as
(a) can store numbers which take up 1 Byte of storage with 2 decimal points.
(b) can Store ASCII Character values in numeric form.
(c) can store Binary data.
(d) can hold an integer in the range of 0 to 255.
(e) can store large Floating Point numbers.
11) CLS and ADO in the .Net Framework respectively stand for
12) Assemblies
(a) is responsible for compiling code as one types in the code editor.
(b) converts code to the Microsoft Intermediate Language (MSIL).
(c) gets its name because it compiles at the last moment.
(d) is CPU independent.
(e) converts MSIL into machine code.
3
14) A member within a Enum…End Enum declaration
15) Which of the following statements is/are correct in respect of Properties and Property procedures?
(a) A Property must be implemented with both Get and Set Property procedures.
(b) A Property..End Property Declaration must be Public.
(c) When implementing a Readonly property, the Get property procedure is not needed.
(d) When one assigns a value to a property, the Set property procedure is executed.
(e) One can implement properties in classes but not in windows forms.
16) In a Visual Basic .net application, one requires to set startup.vb as the initial object which opens
when the application is run. Select correct answer(s) for setting up startup.vb as the initial object.
(a) Select tools of the main menu, go to options of project and select startup
object as startup.vb .
(b) Go to Project, select project properties and select initial load as the
startup.vb .
(c) Go to Project, select project properties and select startup object as the
startup.vb .
(d) Go to Project, select project properties, select startup object as Sub Main(), create a class
with Sub Main() and add the following code.
Shared Sub Main()
Application.EnableVisualStyles()
Application.Run(New startup)
17) Select the correct statement(s) about .resx file in Visual basic .net.
(a) Visual Basic .net stores information on bitmaps, icons and local specific strings in .resx
files.
(b) .resx files are actually XML files in which binary resources are base 64 encoded.
(c) Resource File generator (Resgen) converts .txt and .resx (XML based) files to Common
Language binary .resources files.
(d) .resx files store information on Data exchange between classes.
(e) Visual Basic .net applications have static .resx files.
4
18) Select the correct statement(s) about Sub Finalize() method in Visual Basic .net .
19) In (1) and (2), myString has been declared as string. Select the correct statement(s) about myString
not related to variable in (1) and (2).
(a) MessageBox.show (myString) will give pop up with a message “My string”.
(b) myString = myString & myString in (3) equals “My String” in myString.
(c) myString = myString & myString in (3) equals “My My” in myString variable.
(d) myString & = “string” in (3) equals “My string”.
(e) MessageBox.show (myString) in (3) will pop up with a message “ My string”.
21) Select the correct statement(s) about property procedures in Visual Basic .net.
(a) Property procedures are also known as Property Assessors.
(b) Property procedures are a series of Visual Basic statements which manipulate a custom
property on module, class or structure.
(c) There are two property procedures Let and Get.
(d) There are two property Procedure Set and Get.
(e) Set is read-only and Get, write- only.
5
22) Which of the following statements related to Structures in Visual Basic .net is/are true?
(a) They are similar to arrays.
(b) They can be declared inside a procedure.
(c) One can define one structure inside another.
(d) One must declare every data member of a structure.
(e) Structures support many of the same features as classes in Visual Basic .net.
(a) Declared with a Shared Keyword, the Shared elements are associated with a specific
instance of class or a structure.
(b) Declared with a Shared Keyword, the Shared elements are not associated with a specific
instance of a class or structure.
(c) The Shared keyword indicates that one or more declared programming elements are shared.
(d) Shared keyword is similar to Public keyword.
(e) Shared Keyword is similar to Private Keyword.
24) Select the differences between Structures and Classes in Visual Basic .net .
(a) Structures are reference types and classes are value types.
(b) Structures are value types and classes are reference types.
(c) Structures use stack allocation and Classes use heap allocation.
(d) Structure members can be declared as protected whereas class members cannot be declared
as protected.
(e) All structure members are public by default whereas class members are private by default.
(a) is optional.
(b) hides the locally declared element in a derived class.
(c) hides an identically named element or set of overloaded elements, in a base class.
(d) is not optional.
(e) is not an important keyword.
6
27) One has been provided with two databases which reside in Oracle and MS SQL Server 2000
respectively. He requires connecting to both databases using ADO.net. Select the correct
statement(s) from the following regarding connections to Oracle and MS SQL server 2000.
28) A student has been given a console application. Consider the following three statements which are
related to building of console applications in Visual Basic .net.
(i) Without any additional configuration, go to build option of the menu of the Visual Basic
.net complier and build the application.
(ii) Sub Main () has to be created either in a module or in a class.
(iii) In the Project Property of the application, he has to select Console application and startup
object as Sub Main and build the application.
29) Select the correct statement(s) regarding Exception handling in Visual Basic .net.
(a) There are three types of Exception handling in Visual Basic .net.
(b) There are two types of Exception handling in Visual Basic .net which are known as
Structured and Unstructured Exception handling.
(c) Try Catch and Finally are Unstructured Exception handlings whereas “On Error” is a
Structured Exception handling.
(d) Try Catch and Finally are Structured Exception handlings whereas “On Error” is an
Unstructured Exception handling.
(e) In Structured Exception handling, blocks of code are encapsulated, with each block
having one or more associated handlers whereas in unstructured Exception handling “On
error” statement is placed at the beginning of a block of code.
7
31) Which of the following phase(s) is/are part(s) of the RAD approach?
32) Which of the following statements is/are correct regarding the RAD model?
Refer to the following scenario and code when answering Questions 33-35.
One has selected a SqlDataAdapter object in ADO.net for inserting a row of data. The following
statement and lines of codes must be used for questions 33, 34, and 35. There are two textboxes,
Textbox1 and Textbox2 respectively where frmForm1. strSql is the SQL query string and myConn
is the connection object. Data base which is accessed in the MS SQL server is BitExam and the
table which is used is Names. Two attributes of the Names table are IndexNo and Lastname.
IndexNo is directly mapped to Textbox1 and Lastname to Textbox2. Two Data types for IndexNo
and Lastname are varchar (50) and varchar(50).
Dim da as SqlDataAdapter = new SqlDataAdapter ------- (1)
Dim cmd as SqlCommand ------- (2)
cmd = new SqlCommand (strSql,myConn) ------- (3)
-------------------------------- ------- (4)
--------------------------------- ------- (5)
-------------------------------- ------- (6)
------------------------------- --------(7)
33) In lines 4 and 5, parameters should be added to cmd object and they must be equaled to two
TextBoxes. Select correct syntax for Parameters of cmd.
(a) cmd.(“@IndexNo”,SqlDbType.VarChar,50,”IndexNo”)
cmd.(“@Lastname”,SqlDbType.VarChar,50, “Lastname”)
(b) cmd (“@IndexNo”,SqlDbType.VarChar, 50, “IndexNo”). Value = me.TextBox1.text
cmd (“@IndexNo”,SqlDbType.VarChar, 50, “IndexNo”). Value = me.TextBox1.text
(c) cmd.Parameters.Add (“@IndexNo”, SqlDbType.VarChar, 50,”IndexNo”). _
Value = me.TextBox1.text
cmd.Parameters.Add (“@IndexNo”, SqlDbType.VarChar, 50,”IndexNo”) _
=me.TextBox2.text
(d) cmd.Parameters.Add (“@IndexNo”, SqlDbType.VarChar, 50,”IndexNo”)
cmd.Parameters.Add (“@IndexNo”, SqlDbType.VarChar, 50,”IndexNo”)
(e) cmd.Parameters.Add (“IndexNo”, SqlDbType.VarChar, 50,”@IndexNo”). _
Value = me.Textbox1.Text
cmd.Parameters.Add (“Lastname”, SqlDbType.VarChar, 50,”@Lastname”). _
Value = me.Textbox2.Text
8
34) Select the correct lines of code for Line numbers 6 and 7 related to the above SqlDataAdapter
declared in (1).
(a) da = cmd (b) da.InsertCommand =cmd
cmd.Excute () cmd.ExecuteXMLReader
(c) da.InsertCommand =cmd (d) da.InsertCommand = cmd
cmd.ExecuteNonQuery cmd.ExcuteReader()
(e) da.InsertCommand = cmd
cmd.ExcuteScaler ()
35) Given that the above strSql query string is Insert Query, select from among the following the
correct value for strSql.
37) Select the correct statement(s) regarding (3), (4) and (5).
9
38) RAD Model is preferred when the project
Refer to the following lines of code for Question Numbers 39 and 40.
strSql variable has been given and myConn is the Database connection to MS SQL server 2000.
40) Select correct syntax for creating DataView and accessing the first row of LastName if one
requires to view the data.
10
41) Select the Correct statement(s) regarding DataSets.
(a) DataReader objects can be created by using ExecuteReader() with SqlCommand object .
(b) A DataReader object is a fast mechanism for retrieving forward only and read –only
streams of data.
(c) A DataReader object must be closed as soon as it has been used, for otherwise, you will
tie up your connection objects so that no other operation will execute against it.
(d) DataReader objects consume considerable memory cache.
(e) DataReader objects are very slow for retrieval of data when compared with
SqlDataAdapter.
(a) It has characters from almost all major languages which are spoken today in the world.
(b) Each character is represented by 2 bytes.
(c) Unicode stands for Unique Code
(d) Although Tamil is included, Sinhala is not part of Unicode.
(e) Each character is represented by a single Byte.
44) Select the correct statement(s) which describes function keys F10 and F11 in Debugging with a
breakpoint.
(a) F10 key places break points and F11 steps through procedures.
(b) F11 places breakpoints and F10 steps through the code.
(c) F11 key steps through the code but will step into any procedures which are called, whereas
F10 key steps over the procedure calls, running them all and returning to the original spot.
(d) F10 key steps through the code but will step into any procedures which are called, where
as F11 key steps over the procedure calls, running them all and returning to the original
spot.
(e) F10 traces the stack, whereas F11 removes the breakpoint.
11
46) Select the correct statement(s) regarding Hash table Collection and ArrayList Collections.
50) MSIL and CLR in the .net Framework respectively stand for
*****
12