System Analysis and Design
LAB RECORD-INFS -280/L
kishore Thekkepushpakam Nambeesan
Student ID No: 25012245

LECTURER-IN - CHARGE

Mr. Kishore Nambeesan

Information Systems Department

University of Nizwa, Sultanate of Oman

University of Nizwa

College of Economics Management and Information Systems

Department of Information Systems

CERITFICATE

Certified that, this is the Bonafide Practical Record Work of Mr/Ms. Kishore Nambeesan ID No: 10025421,, Bachelor of Information Systems FALL-Semester student of College of Economics Management and Information Systems in the subject “System Analysis and Design (INFS-280/L)” for the Academic year 2014- 2015.

Dr. Arockiaswamy Mr. Kishore Nam Nambeesan

HOD – IS Department Lecturer –ICB-INFS-280/L

CEMIS CEMIS

Examiners

1.

2.

Table of Contents

Task. No: / Title / Page Nos. / Date
1)  / VB Text box and Message Button / 3-6 / 09.02.2014
2)  / VB Application to accept two numbers and to perform Simple Math-Arithmetic operations / 16.09.2014
3) 
4) 
5) 
6) 
7) 
8) 
9) 
10) 
11) 


TASK- 1 VB Text box and Message Button Date: 08.09.2014

Objective:

This VB program will ask the user to enter his/her name in the text box and gives the welcome message.

Code:

Public Class Welcome

Private Sub Btnwelcome_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnwelcome.Click

MsgBox("Welcome to University of Nizwa " & urname.Text)

End Sub

End Class

Output:

Date: 13.02.2014

Task2: VB Application to accept two numbers and to perform Simple Math-Arithmetic operations

Objective:

VB Application to accept two numbers and to perform Simple Math-Arithmetic operations such as Addition, Subtraction, Multiplication and Division.

Code:

Public Class MathCalculator

Private Sub cmdsum_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdsum.Click

Dim number1, number2, sum, difference, product, quotient As Single

number1 = num1.Text

number2 = num2.Text

sum = number1 + number2

MsgBox("The Sum of the two given numbers is=> " & sum)

End Sub

Private Sub cmdexit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdexit.Click

MsgBox("Thank you, Do you want to exit?", MsgBoxStyle.OkOnly)

Me.Close()

End Sub

Private Sub cmddifference_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmddifference.Click

Dim number1, number2, sum, difference, product, quotient As Single

number1 = num1.Text

number2 = num2.Text

difference = number1 - number2

MsgBox("The Difference of the two given numbers is=> " & difference)

End Sub

Private Sub cmdproduct_Click(ByVal sender As System.Object, ByV`al e As System.EventArgs) Handles cmdproduct.Click

Dim number1, number2, sum, difference, product, quotient As Single

number1 = num1.Text

number2 = num2.Text

product = number1 * number2

MsgBox("The Product of the two given numbers is=> " & product)

End Sub

Private Sub cmdquotient_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdquotient.Click

Dim number1, number2, sum, difference, product, quotient As Single

number1 = num1.Text

number2 = num2.Text

quotient = number1 / number2

MsgBox("The Quotient of the two given numbers is=> " & quotient)

End Sub

End Class

Output:

Date: 17.02.2014

Task3: VB Application to accept the marks and to calculate the Total, Percentage and Grade using Select..Case Control Structure

TASK- 4 VB Colour Play and Font Style Date: 24.02.2014

Objective:

This VB program will ask the user to enter any text into a text box and format the font using the three checkboxes that represent bold, italic and underline and also to change the form Back colour using he Radio Buttons(Red/Green/Blue)

Code

Public Class VBColourPlay

Private Sub cmdformat_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdformat.Click

If ChkBold.Checked Then

txtformat.Font = New Font(txtformat.Font, txtformat.Font.Style Or FontStyle.Bold)

Else

txtformat.Font = New Font(txtformat.Font, txtformat.Font.Style And Not FontStyle.Bold)

End If

If ChkItalics.Checked Then

txtformat.Font = New Font(txtformat.Font, txtformat.Font.Style Or FontStyle.Italic)

Else

txtformat.Font = New Font(txtformat.Font, txtformat.Font.Style And Not FontStyle.Italic)

End If

If ChkUnderline.Checked Then

txtformat.Font = New Font(txtformat.Font, txtformat.Font.Style Or FontStyle.Underline)

Else

txtformat.Font = New Font(txtformat.Font, txtformat.Font.Style And Not FontStyle.Underline)

End If

End Sub

Private Sub cmdcolour_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdcolour.Click

If RadioRed.Checked = True Then

Me.BackColor = Color.Red

Exit Sub

ElseIf RadioGreen.Checked = True Then

Me.BackColor = Color.Green

Exit Sub

ElseIf RadioBlue.Checked = True Then

Me.BackColor = Color.Blue

End If

End Sub

End Class:

TASK- 5 VB BODY MASS INDEX(BMI) CALCULATOR Date: 06.03.2014

Objective:

This VB program will ask the user to enter his/her height in meters (M) and weight in Kilograms (Kg) into a text box and will calculate the BMI of the person. The output will display whether he/she is underweight/over-weight/ Obese accordingly.

Code:

Public Class VBBMI

Private Sub cmdbmi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdbmi.Click

Dim height, weight, bmi As Single

height = ht.Text

weight = wt.Text

bmi = (weight) / (Height ^ 2)

lblbmi.Text = bmi

Select Case bmi

Case 0 To 18.4

lblbs.Text = "Under-Weight, Eat well!"

Case 18.5 To 24.9

lblbs.Text = "Normal-Weight, Maintain Your Diet!"

Case 25 To 29.9

lblbs.Text = "Over-Weight, Do Exercise Regularly!"

Case Else

lblbs.Text = "you have Obesity, Do dieting and Exercise!"

End Select

End Sub

End Class

Output:

TASK- 6: VB ATM Application using Multiple Forms Date: 03.04.2014

Objective:

This VB program will ask the user to enter his/her Login Authentication details to enter in to the ATM control panel where user can do the Deposit /Withdrawal/Balance Enquiry/Sign-Out Operations.

Code:


Public Class WelcomeFRM

Private Sub QUIT_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles QUIT.Click

End

End Sub

Private Sub Login_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Login.Click

Me.Hide()

LoginFrm.Show()

End Sub

Private Sub WelcomeFRM_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Me.TopMost = True

End Sub

End Class

Public Class LoginFrm

Private Sub exitbtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles exitbtn.Click

Close()

End Sub

Private Sub Signin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Signin.Click

If TextBox1.Text = "777" Then

Me.Hide()

ATMCPL.Show()

Else

MsgBox("Wrong pin number entered, TRY Again!!!")

TextBox1.Text = ""

TextBox1.Focus()

End If

End Sub

Private Sub LoginFrm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Me.TopMost = True

End Sub

End Class

Public Class ATMCPL

Private Sub Deposit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Deposit.Click

Depositfrm.Show()

Me.Hide()

End Sub

Private Sub Balance_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Balance.Click

Me.Close()

Balancefrm.Show()

End Sub

Private Sub Withdraw_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Withdraw.Click

Withdrawfrm.Show()

Me.Hide()

End Sub

Private Sub signout_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles signout.Click

MsgBox("Thank you for using the BANK Birkat-Al -Mouz ATM Service, GOOD DAY!!")

Me.Hide()

WelcomeFRM.Show()

End Sub

Private Sub ATMCPL_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Me.TopMost = True

End Sub

End Class

Public Class Depositfrm

Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click

Static Bal As Double = 0

Balance.Text = Balancefrm.NewBalance.Text

MsgBox("you are about to deposit!!, are you sure?")

Bal = Bal + TextBox1.Text

Balance.Text = Bal

Balancefrm.NewBalance.Text = Bal

TextBox1.Text = ""

End Sub

Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click

MsgBox("You are cancelling the deposit Operation and Go to ATM Main Menu?")

ATMCPL.Show()

Me.Hide()

End Sub

Private Sub Depositfrm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Me.TopMost = True

End Sub

End Class

Public Class Withdrawfrm

Private Sub CancelW_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CancelW.Click

MsgBox("You are cancelling the withdraw Operation and Go to ATM Main Menu?")

ATMCPL.Show()

Me.Hide()

End Sub

Private Sub Withdrawfrm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Me.TopMost = True

Balance.Text = Balancefrm.NewBalance.Text

End Sub

Private Sub OKWD_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OKWD.Click

Dim AvailBal As Double

If TextBox1.Text <= Val(Balancefrm.NewBalance.Text) Then

MsgBox("you are about to withdraw the above amount from your account!!, are you sure to proceed?")

AvailBal = Val(Balancefrm.NewBalance.Text) - Val(TextBox1.Text)

Balancefrm.NewBalance.Text = AvailBal

Balance.Text = AvailBal

TextBox1.Text = ""

Else

MsgBox("Sorry!,You have Insufficient Balance to proceed this Transaction!!, Please deposit some money")

ATMCPL.Show()

Me.Hide()

End If

End Sub

End Class

Public Class Balancefrm

Private Sub bkmenu_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OKW.Click

MsgBox("You are about to Proceed to ATM Main Menu?")

ATMCPL.Show()

Me.Hide()

End Sub

Private Sub Balancefrm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Me.TopMost = True

End Sub

End Class


TASK- 7: VB Web Browser Application Date: 21.04.2014

Objective:

This VB Program will be developing a Personal Web Browser through which we can surf the desired Websites.

Code:

Public Class MyWebBrowser

Private Sub Go_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Go.Click

WebBrowser.Navigate(URLBox.Text)

End Sub

Private Sub MyWebBrowser_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Me.TopMost = True

End Sub

End Class


TASK- 8: VB File Operation Date: 24.04.2014

Objective:

This VB Program will be developing a Text File Reader Utility Open, Read and display the Contents of a Simple Text File.

Code

Imports System.IO

Public Class Form1

Private Sub Openread_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Openread.Click

Dim FileReader As StreamReader

Dim results As DialogResult

results = OpenFileDialog.ShowDialog

If results = DialogResult.OK Then

FileReader = New StreamReader(OpenFileDialog.FileName)

destination.Text = FileReader.ReadToEnd()

FileReader.Close()

End If

End Sub

Private Sub Closebtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Closebtn.Click

MsgBox("Do you wanna Close File Reader")

End

End Sub

End Class

OUTPUT

TASK- 9: VB – Graphics Application Date: 28.04.2014

Objective:

This VB Program is to create a Graphics application which will generate some geometrical shapes such as Rectangle, Circle, and Ellipse.

Code

Public Class GraphicsFRM

Private Sub GraphicsFRM_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Me.TopMost = True

End Sub

Private Sub Rectangle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Rectangle.Click

Dim myPen As Pen

myPen = New Pen(Drawing.Color.Red, 5)

Dim myGraphics As Graphics = Me.CreateGraphics

myPen.DashStyle = Drawing.Drawing2D.DashStyle.Dot

myGraphics.DrawRectangle(myPen, 10, 100, 100, 50)

End Sub

Private Sub Ellipse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Ellipse.Click

Dim myPen As Pen

myPen = New Pen(Drawing.Color.Blue, 5)

Dim myGraphics As Graphics = Me.CreateGraphics

myGraphics.DrawEllipse(myPen, 150, 100, 200, 100)

End Sub

Private Sub Circle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Circle.Click

Dim myPen As Pen

myPen = New Pen(Drawing.Color.aqua, 7)

Dim myGraphics As Graphics = Me.CreateGraphics

myGraphics.DrawEllipse(myPen, 400, 100, 100, 100)

End Sub

End Class

OutPut

TASK- 10: VB – File Write Operation Date: 05.05.2014

Objective:

This VB Program will be developing a Text File Writer Utility which can edit and save the Contents in to a Simple Text File.

Code

Imports System.IO

Public Class writerFRM

Private Sub Closebtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Closebtn.Click

MsgBox("Do you wanna Close File Reader")

End

End Sub

Private Sub writerFRM_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Me.TopMost = True

End Sub

Private Sub savefile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles savefile.Click

Dim FileWriter As StreamWriter

Dim results As DialogResult

results = SaveFileDialog1.ShowDialog

If results = DialogResult.OK Then

FileWriter = New StreamWriter(SaveFileDialog1.FileName, False)

FileWriter.Write(destination.Text)

FileWriter.Close()

End If

End Sub

End Class

LAB RECORD SAD-INFS-280/LPage 6