You are on page 1of 5

SELECTION STRUCTURE

OBJECTIVES
• Create the Covington Resort Application
• Use the If-Then-Else statement
Covington Resort Application
Create a reservation application for Covington Resort. The
application should allow the user to enter the following
information:
the number of rooms to reserve
the length of stay (in nights)
the number of adult guests
the number of child guests
Each room can accommodate a maximum of 6 guests
The resort charges 10,000 per room per night.
The application should display the total room charge, the
sales and lodging tax, the resort fee, and the total due.
If…Then…Else Statement TRUE
DECISION
• Syntax
If condition Then FALSE

statement block to be processed when the


condition is true
[Else
statement block to be processed when the
condition is false]
End If
MessageBox.Show Method
MessageBox.Show(text, captions,buttons,icon[,defaultButton])
ARGUMENT MEANING
text Text to display in the message box; use sentence capitalization

caption Text to display in the message box’s title bar; use book title capitalization

buttons buttons to display in the message box; can be one of the following constants:
MessageBoxButtons.AbortRetryIgnore
MessageBoxButtons.OK (default setting)
MessageBoxButtons.RetryCancel
MessageBoxButtons.YesNo
MessageBoxButtons.YesNoCancel
icon icon to display in the message box, typically, one of the following constants:
MessageBoxIcon.Eexclamation
MessageBoxIcon.Information
MessageBoxIcon.Stop
defaultButton button automatically selected when the user presses Enter; can be one of the following:
MessageBoxDefaultButton.Button1(default setting)
MessageBoxDefaultButton.Button2
MessageBox.DefaultButton.Button3

You might also like