Академический Документы
Профессиональный Документы
Культура Документы
Development
Pass Paper
J.Thavaruban BAT/IT/2017/F/021
M.Sajithkumar BAT/IT/2017/F/042
Content
2015 passpaper & Answer
2016 passpaper & Answer
2017 passpaper & Answer
Answer
Q1
I. Writing the code
Checking the syntax
errors Compiling and
interpreting
Debugging
Running the application
iii. True
v. Butto
n
Label
Text Box
Combo Box
List Box
Rich Text Box
List view
Picture box
Q2
i.
Risks associated with teams.
If a team of developers, end
users, and systems maintainers have not
worked together before and do not learn to
communicate effectively, they are not likely to
develop a successful system without schedule
delays or cost overruns. Other risks are
associated with the lack of well-defined or well-
understood processes.
Disadvantages of RAD :
iv.
v.
Using the right mix of methodologies, tools,
personnel and management and the correct
use of best practices.
The optimal is a team of users and
developers who can communicate
effectively and successfully develop their
products without schedule delays or cost
over runs.
Experience counts. An experienced team,
developing a similar system to one that it has
previously developed, with a customer and end
user with whom it can communicate well, is much
more likely to produce high-quality software
intensive systems on time and at cost.
Having a well-trained, fully collaborative team is
an essential ingredient for success in a RAD
project.
• The core of the team
– should be full participants in project planning.
– should stay together from start to finish.
– Support tools should be provided to those
who have skills in using them
Q3
sum += count ^ 2
count += 2
Loop
MessageBox.Show(counterIndex)
counterIndex -= 1
Loop
ii
total = 0
Console.Write("Enter a value")
number = Console.ReadLine()
Do Until number = -1
total += number
Console.WriteLine("Enter a value")
number = Console.ReadLine()
Loop
Console.WriteLine(total)
b) Errors: The counter is never incremented,
resulting in an infinite loop. The repetition
condition
uses the wrong comparison operator.
Keywords While End are used instead of keyword
Loop.
iii a) True.
e) True
Q4
i.
Disconnected data architecture
Data cached in Datasets
Supports scalability by working with Dataset
Data transfer in XML format
Interaction with the database is done
through data command
ii.
VB.NET
Application
Data
Accessing retrieved data Retrieve
Provider Data
Databa
se
Dataset
iv.
v.
Q6
i.
Class : Generic name that describe the set
of objects
Object : Instance of a class that perform
task
Namespace : Organization of the system
ii.
amount
accountHolder
Value
iii.
(a)
Create class library name BankAccount
Create windows Form Application
BankAccountClient Add Reference class library
to windows form application
(b)
PrivateSub btnDisplay_Click(sender As
System.Object, e As System.EventArgs)Handles
btnDisplay.Click
Dim account As New BankAccount.BAccount
account.Name = "HNDIT"
account.Deposit(100.0)
txtName.Text = account.Name()
txtBalance.Text = account.balance
End Sub
Answer
Q1
a) Usable systems are built within a short period of
time.
b)
Cost and schedule overruns
Product not fit for business
High workload
Projects get cancelled
Friction among managers, developers and
customers
c)
People related
Product related
Technology related
Process related
d)
Visual studio dot net
Netbeans
EasyEclipse
Jbuilder
b)
Not
Or
And
Xor
c) Dim a As
Integer Dim b
As Integer
Dim t As
Integer Dim d
As Integer
a= InputBox(“Enter first number:”)
b =InputBox(“Enter second
number:”) if(a>b)Then
t=a
a=b
b=t
End if
d = b-a
MsgBox(“The positive differencr is “ & d)
d)
i. IbIUnits,txtUnits
btnCalculate
IbIAmount,txtAmo
unt
ii. Private Sub btnCalculate_click
Dim units As
Integer Dim
amount As Double
units = txtUnits.Text
If(units <= 30 )Then
amount = units * 5
Elseif (units <= 60) Then
amount = 30*5+(units-30)*7.5
Elseif (units <= 90) Then
amount = 30*5+30*7.5+(units-60)*11
Else
Amount=
30*5+30*7.5+30*11(units-90)*15 End
if
txtAmount.Text=amount
End Sub
Q3
a) The while loop is run until condition is
true once condition false loop is
terminate. until loop is run until condition
is false and once condition become true
loop is terminate.
b) Dim p , n, I As Integer
P=1
Print(“Prime numbers 1-100 are :”)
For n= 1 to 100
For i = 2 to n-1
If n mod I =0 Then
P=0
Exit for
Else
P=1
End if
Next
If p =1 Then
TextBox1.Text=TextBox.Text & n & vbcrlf
End if
Next
c)
i. *
**
***
****
*****
ii. textbox1=
>30
textbox
2=>55
Q4
b)
Keyword Definition
Q5
a) A class is a blue print that describes as object and
defines attributes and operations for the object
As object is instance of a class
b) connection.Open()
Dim cmsql As New SqlCommand
Cmsql.connection = connection
Cmsql.commandText = “INSERT INTO
VALUES (‘ “ &txtStNo.Text & “ ‘,’” &
txtStFName.Text & “ ‘, “ & val(txtAge.Text)&”,”&
cboCourse.SelectedValue.ToString & “,”&
cboDiA.Value.Date & “)”
Cmsql.ExecuteNonquery()
MsgBox(“Data inserted”)
c) connection.Open()
Dim cmsql As New
SqlCommand
Cmsql1.connection =
connection
Cmsql1.commandText=”UPDATE
studentReg SET Course= “ +
cboCourse.SelectedItem+ “ WHERE
StNo=”+txtStNo.Text + “”
cmsql1.ExecuteNonQuery()
MsgBox(“Data updated”)
d) connection.open()
Dim cmsql2 As New SqlCommand
Cmsql2.connection=connection
Cmsql2.CommandText=”SELECT * from
studentReg
WHERE stNo=”+
txtStNo.Text + “”
adeptor = New01eDbDataAdapter(cmsql2)
dataset = NewDataSet()
adaptor.fill(dataset,”ST”)
txtStFname.Text=dataset.Tables(0),Rows(0),Item(“st
Fname”)
txtAge.Text=dataset.Tables(0),Rows(0),Item(“Ag
e”)
cmbCource.Text =
dataset.Tables(0).Rows(0),Item(“Course”)
cboDoA.Value=
dataset.Tables(0).Rows(0),Item(“DoA”)
cmsql2.Excw=ecuteNonQuery()
2017
Question-01
a) Give four (04) characteristics of rapid application
development
RAD uses hybrid teams
RAD Uses specialized tools that can support
RAD uses “Time boxing”
RAD uses iterative, evolutionary prototyping
RAD uses iterative, evolutionary prototyping
(contd...)
Question-02
b) Give three (03) rules you follow when you define a variable.
A variable name must be of the form $name or ${name}.
The string name can consist of letters (a-z and A-Z),
numbers (0-9), and underscore characters (_).
The first character of name must be an alphabetic character
(a-z or A-Z).
If the ${name} form is used, spaces can also appear in
name. This allows you to use multiple word names without
the underscore character
c) What is the difference implicit type conversion and explicit type
conversion?
Explicit
Implicit Conversion Conversion
Conversio
Implicit Conversion is done automatically. Explicit n is
done programmatically.
In Implicit conversion, no data loss take place In explicit conversion, data loss may
during the or may
not be take place during data
data conversion. conversion.
Hence there is a risk of information
loss.
No possibility of throwing exception during It might throw error if
the tried to do
without type
conversion and therefore is called type safe. casting.
Implicit conversion do not require any special conversi require
syntax. Explicit on do cast
operator to perform
conversion.
Example: Example:
Conversion of smaller number to larger number Conversion large
is implicit of r number to smaller
number is explicit
conversion. conversion.
float
Conversion of integer type data to float. k=123.45
int i= (int)
float I=0; k
int j= 10;
// This is implicit conversion since float
is larger
than integer, hence no loss of data & no
exception.
Name = (3) . . . . . . .
Ati = (4) . . . . . . . .
Category Control Property Value
Text Name
Text Sex
Text Age
Text Name
Text Name
/
A/MP/IT/2/0/17/F/000
Mask 0
Text Male
checked Ture
radFemale Name dtpFemale
Text Female
checked False
Item Ampara
Anuradapura
Badula
Batticaloa
btnSubm
Button it Name btnSubmit
Text Submit
If radMale.
(5) . . . . . . . Then
Sex =
“Male”
ElseIf RadFemale.(6) . . .
..... Then
Sex = “Female”
End If
Dob =
(7) . . . . . . . ..
Age =
(8) . . . . . . . . .
Regno =
(9) . . . . . ....
(10) . . . . . .
... . (“Student Information”)
.........
... (“-------------------”)
.........
... (“Student name:” & name)
.........
... (“ATI/ATI Section:” & ati)
. . . . . . . . . . . . (“Sex:” & sex)
. . . . . . . . . . . . (“Date of birth:” & dob)
. . . . . . . . . . . . (“Age:” & age)
. . . . . . . . . . . . (“Reg number:” & regno)
d.
1.date
2.int
3.txtname.Text
4.cmbAti.SelectedItem
5.True
6.True
7.dtp.Dob
8.Txtage
9.TxtRego
10. Message.show()
Message.show()
Message.show()
Message.show()
Question-03
End Sub
End Class
Gampaha 2500
Kurunegala 3000
Jaffna 2800
Kandy 1500
d) Write a VB.NET code segment to display the content of
above multidimensional array in a textbox as shows in
following figure
Hint: use for loop
Question-04
a) Write the syntaxes for VB.NET functional and sub procedure.
Function
Attributelist
Accessmodifier
Proceduremodifier
Sub procedure
Declaration.00
Calling
c = (a - b)
txtresult.Text = c
End Sub
c = (a * b)
txtresult.Text = c
End Sub
c = (a / b)
txtresult.Text = c
End Sub
Question-05
a) Consider the following two programs and answer the
questions given below.
Program A
Public class form4
Private sub button_click (ByVal sender As System.object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim objv As New Toyota
Objv.drive (“driving a Toyota
car . . .”)
End sub
End class
performed
Method overloading is within class.
Method overriding occurs in two classes that have IS-A
(inheritance)
relationshi
p.
method overloading, parameter differen
In case of must be t.
In case of method overriding, parameter must be same.
b.realNum = Val(TextBox2.Text)
c = c.Addition(a, b)
TextBox3.Text = c.realNum
End Sub
End Class
Addition = result
End Function
End Class
b.realNum = Val(TextBox2.Text)
c = c.power(a, b)
TextBox3.Text = c.realNum
End Sub
End Class
Public Class ComplexNumber
Public realNum As Integer
Public Function reminder(num1 As
ComplexNumber, num2 As ComplexNumber) As
ComplexNumber
Dim result As New ComplexNumber
result.realNum = (num1.realNum ^
num2.realNum)
reminder = result
End Function
End Class
b.realNum = Val(TextBox2.Text)
c = c.reminder(a, b)
TextBox3.Text = c.realNum
End Sub
End Class
Public Class ComplexNumber
Public realNum As Integer
reminder = result
End Function
End Class
Question-06
Imports
System.Data.SqlClient