VB Exercise 5.4 - Exercise 5-4 .In this exercise you are...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Exercise 5-4 ….In this exercise you are create a Report program to display Hotel Rooms occupied by Floor, calculate Occupancy by floor, and finally calculate total Hotel Occupancy. It uses a For…Next Loop to allow the user to input data, checks for invalid data, displays the results and completes the calculations. Start Program Code Imports Microsoft.VisualBasic.ControlChars Imports Microsoft.VisualBasic.Constants Public Class Form1 Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click Me.Close() End Sub
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click lstHotData.Items.Clear() lblRmsOcc.Text = "" lblOvrOccRate.Text = "" End Sub Private Sub btnReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReport.Click Dim count As Integer Dim ocRate As String Dim RmNum As Integer = 0 Dim strRmNUM As String = "" Dim totRmNum As Integer = 0 Dim FloorNum As String = ""
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/23/2011 for the course COP 1332 taught by Professor Ryland during the Spring '11 term at American College of Computer & Information Sciences.

Page1 / 3

VB Exercise 5.4 - Exercise 5-4 .In this exercise you are...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online