System Analysis and Design

Similar documents
Revision for Final Examination (Second Semester) Grade 9

Mr.Khaled Anwar ( )

A Complete Tutorial for Beginners LIEW VOON KIONG

DO NOT COPY AMIT PHOTOSTUDIO

CALIFORNIA STATE UNIVERSITY, SACRAMENTO College of Business Administration. MIS 15 Introduction to Business Programming. Programming Assignment 3 (P3)

C4.3, 4 Lab: Conditionals - Select Statement and Additional Input Controls Solutions

Code: Write a Program for perform Money Conversion. Public Class Form1

S.2 Computer Literacy Question-Answer Book

ATM Use Cases. ID: CIS Title: Check Balance Description: Customer aims to know the balance in his/her account

Member Management System

Objectives. After completing this topic, the students will: Understand of the concept of polymorphism Know on How to implement 2 types of polymorphism

In this tutorial we will create a simple calculator to Add/Subtract/Multiply and Divide two numbers and show a simple message box result.

Else. End If End Sub End Class. PDF created with pdffactory trial version

Visual Basic: Opdracht Structuur

Code: Week 13. Write a Program to perform Money Conversion. Public Class Form1

DRAWING AND MOVING IMAGES

Disclaimer. Trademarks. Liability

PROGRAMMING ASSIGNMENT: MOVIE QUIZ

OVERLOADING METHODS AND CONSTRUCTORS: The Ball Class

1. Create your First VB.Net Program Hello World

VISUAL BASIC PROGRAMMING (44) Technical Task KEY. Regional 2013 TOTAL POINTS (485)

Visual Programming (761220) First Exam First Semester of Date: I Time: 60 minutes

Programming with Microsoft Visual Basic.NET. Array. What have we learnt in last lesson? What is Array?

VISUAL BASIC II CC111 INTRODUCTION TO COMPUTERS

Disclaimer. Trademarks. Liability

(0,0) (600, 400) CS109. PictureBox and Timer Controls

โปรแกรมช วยทดสอบหม อแปลงกระแส

Introduction to. A revised course with - Concise concepts - Hands on class work. - Plenty of examples - Programming exercises

Tutorial 03 understanding controls : buttons, text boxes

Herefordshire College of Technology Centre Edexcel BTEC Level 3 Extended Diploma in Information Technology (Assignment 1 of 3)

Déclaration du module

Lecture 10 OOP and VB.Net

FOR 240 Homework Assignment 4 Using DBGridView and Other VB Controls to Manipulate Database Introduction to Computing in Natural Resources

User Manual. <MacBank ABM> for. Contents. Prepared by. Version <2.0> Group Name: Group 304. Instructor: Dr. Kamran Sartipi Course:

Unit 4. Lesson 4.1. Managing Data. Data types. Introduction. Data type. Visual Basic 2008 Data types

Decision Structures. Start. Do I have a test in morning? Study for test. Watch TV tonight. Stop

VARIABLES. 1. STRINGS Data with letters and/or characters 2. INTEGERS Numbers without decimals 3. FLOATING POINT NUMBERS Numbers with decimals

Visual Basic 2008 The programming part

Learning VB.Net. Tutorial 19 Classes and Inheritance

Learning VB.Net. Tutorial 10 Collections

IMS1906: Business Software Fundamentals Tutorial exercises Week 5: Variables and Constants

Learning VB.Net. Tutorial 16 Modules

Unit 4 Advanced Features of VB.Net

Menus, Common Dialog Controls, Context Menus, Sub Procedures, and Functions

Lab 4: Adding a Windows User-Interface

Design Of Human Computer Interfaces Assignment 1- Hello World. Compliance Report

Check out the demo video of this application so you know what you will be making in this tutorial.

Final Exam 7:00-10:00pm, April 14, 2008

Instructor s Notes Programming Logic Printing Reports. Programming Logic. Printing Custom Reports

2. Write a program to convert 69F into its equivalent centigrade temperature.

Introduction to Excel 2007

Adding and Subtracting Integers

IT3101 -Rapid Application Development Second Year- First Semester. Practical 01. Visual Basic.NET Environment.

Programming with visual Basic:

Lab ACN : C++ Programming Exercises

TRAINING GUIDE FOR OPC SYSTEMS.NET. Simple steps to successful development and deployment. Step by Step Guide

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Label1.Text = Label1.

I101/B100 Problem Solving with Computers

To enter the number in decimals Label 1 To show total. Text:...

ก Microsoft Visual Studio 2008

UNIT 1: PROGRAMMING ENVIRONMENT

Techniques for Adding Value

Click E Money Laravel Application

Programming with Visual Studio Higher (v. 2013)

Santiago Canyon College Computer Science

"!#... )*! "!# )+, -./ 01 $

ARITHMETIC EXPRESSION

LAMPIRAN. Universitas Sumatera Utara

Translating VBA into Assembly Language

Third Grade Math: I Can Statements

Common Core Math Curriculum Map

A Second Visual BASIC Application : Greetings

MapWindow Plug-in Development

User guide Handelsbanken s card reader

MARK SCHEME for the May/June 2012 question paper for the guidance of teachers 9691 COMPUTING. 9691/23 Paper 2 (Written Paper), maximum raw mark 75

DRAFT EAST POINSETT CO. SCHOOL DIST. - GRADE 4 MATH

MATH 211 FINAL EXAM REVIEW PROBLEMS. c. Illustrating 12-7 for the take away concept of subtraction

UNIT 2 USING VB TO EXPAND OUR KNOWLEDGE OF PROGRAMMING

Mathematics Georgia Standards of Excellence for Grade 4 Correlated to Moving with Math Math-by-Topic Level B

PNB KIOSK BANKING SOLUTION KBS MANUAL FOR BCAs

Common Core Standards 4 th Grade - Mathematics

Lab 3 The High-Low Game

AIM To analyze, design and develop code for Online Course Reservation System using Rational Rose software

Fast Food Store Group Boxes and Other User Controls

Summary of the Lecture

To start we will be using visual studio Start a new C# windows form application project and name it motivational quotes viewer

Drawing Graphics in C Sharp

Form Adapter Example. DRAFT Document ID : Form_Adapter.PDF Author : Michele Harris Version : 1.1 Date :

SPOTCASH MOBILE APPLICATIONS USER GUIDE

Unit 3. Lesson Designing User Interface-2. TreeView Control. TreeView Contol

COPYRIGHTED MATERIAL. Visual Basic: The Language. Part 1

Interacting with External Applications

STUDENT SOLUTIONS MANUAL

Chapter 2 Exploration of a Visual Basic.Net Application

Common Core Math Curriculum Map

Sequence of Grade 4 Modules Aligned with the Standards

Computer measurement and control

Academic Vocabulary CONTENT BUILDER FOR THE PLC MATH GRADE 5

Darshan Institute of Engineering & Technology for Diploma Studies

Minnesota. Plainfield Public Schools Plainfield, New Jersey Grade 3 Pacing Guide. Volumes 1 and 2. Grade 3

Transcription:

System Analysis and Design LAB RECORD-INFS -280/L Information Systems Department University of Nizwa, Sultanate of Oman

Table of Contents Task. No: Title Page Nos. Date 1) VB Text box and Message Button 3-6 2) VB Application to accept two numbers and to perform Simple Math-Arithmetic operations 3) 4) 5) 6) 7) 8) 9) 10) 11) LAB RECORD SAD-INFS-280/L Page 1

TASK- 1 VB Text box and Message Button Date: 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) Output: LAB RECORD SAD-INFS-280/L Page 2

Date: 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) 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() 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) 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) 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) LAB RECORD SAD-INFS-280/L Page 3

Output: LAB RECORD SAD-INFS-280/L Page 4

Date: Task3: VB Application to accept the marks and to calculate the Total, Percentage and Grade using Select..Case Control Structure LAB RECORD SAD-INFS-280/L Page 5

TASK- 4 VB Colour Play and Font Style Date: 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) chkbold txtformat chkitalics cmdformat chkunderline radred cmdcolour radgreen radblue 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) LAB RECORD SAD-INFS-280/L Page 6

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 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 LAB RECORD SAD-INFS-280/L Page 7

TASK- 5 VB BODY MASS INDEX(BMI) CALCULATOR Date: 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 Output: LAB RECORD SAD-INFS-280/L Page 8

TASK- 6: VB ATM Application using Multiple Forms Date: 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: LAB RECORD SAD-INFS-280/L Page 9

LAB RECORD SAD-INFS-280/L Page 10

Public Class WelcomeFRM Private Sub QUIT_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles QUIT.Click End Private Sub Login_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Login.Click Me.Hide() LoginFrm.Show() Private Sub WelcomeFRM_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.TopMost = True Public Class LoginFrm Private Sub exitbtn_click(byval sender As System.Object, ByVal e As System.EventArgs) Handles exitbtn.click Close() 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 Private Sub LoginFrm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.TopMost = True LAB RECORD SAD-INFS-280/L Page 11

Public Class ATMCPL Private Sub Deposit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Deposit.Click Depositfrm.Show() Me.Hide() Private Sub Balance_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Balance.Click Me.Close() Balancefrm.Show() Private Sub Withdraw_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Withdraw.Click Withdrawfrm.Show() Me.Hide() 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() Private Sub ATMCPL_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.TopMost = True 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 = "" Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click LAB RECORD SAD-INFS-280/L Page 12

MsgBox("You are cancelling the deposit Operation and Go to ATM Main Menu?") ATMCPL.Show() Me.Hide() Private Sub Depositfrm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.TopMost = True 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() 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 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 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?") LAB RECORD SAD-INFS-280/L Page 13

ATMCPL.Show() Me.Hide() Private Sub Balancefrm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.TopMost = True LAB RECORD SAD-INFS-280/L Page 14

TASK- 7: VB Web Browser Application Date: 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) Private Sub MyWebBrowser_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.TopMost = True LAB RECORD SAD-INFS-280/L Page 15

TASK- 8: VB File Operation Date: 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) End If destination.text = FileReader.ReadToEnd() FileReader.Close() 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 LAB RECORD SAD-INFS-280/L Page 16

OUTPUT LAB RECORD SAD-INFS-280/L Page 17

TASK- 9: VB Graphics Application Date: 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 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) 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) LAB RECORD SAD-INFS-280/L Page 18

Private Sub Circle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Circle.Click Dim mypen As Pen OutPut mypen = New Pen(Drawing.Color.aqua, 7) Dim mygraphics As Graphics = Me.CreateGraphics mygraphics.drawellipse(mypen, 400, 100, 100, 100) LAB RECORD SAD-INFS-280/L Page 19

TASK- 10: VB File Write Operation Date: 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 Private Sub writerfrm_load(byval sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.TopMost = True 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) End If FileWriter.Write(destination.Text) FileWriter.Close() LAB RECORD SAD-INFS-280/L Page 20

LAB RECORD SAD-INFS-280/L Page 21