Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The application should display the number of round tables needed to seat only the guests at a wedding reception. (In other words, the bridal party

  • image text in transcribedThe application should display the number of round tables needed to seat only the guests at a wedding reception. (In other words, the bridal party does not need to be included in this calculation.)
  • Each round table can accommodate a maximum of 8 guests.
  • When the text box receives the focus, its existing text should be selected.
  • The text box should accept only numbers and the Backspace key.
  • The output should be cleared when a change is made to the contents of the text box.
  • Code the application. Save the solution and then start and test the application.
  • (If the number of guests is 235, the number of required tables is 30.)
Toolbox Main Form.vb Main Formvb [Design) Solution Explorer ttGuests Toolbox Wedding Project General KeyPress Search Solution Explore VB Wedding Project D References Public Class frmMain 19 Private Sub btnCalc Click(sender As Object, e As EventArgs) Handles btnCalc.Click There are no usable controls in this group Drag an iten onto this text to add it to the toolbox. ' Calculate and display the number of required tables. My Project 12 13 14 15 16 17 18 19 20 21 Const intGUESTS-PER-TABLE As Integer Dim intGuests As Integer Dim intTables As Integer Dim intRemaining As Integer 8 App.config DMain Formvb Integer.TryParse(txtGuests.Text, intGuests) intTablesintGuests intGUESTS_PER_TABLE intRemaining ntGuests - intTables intGUESTS-PER-TABLE Properties If intRemaining Then End If IblRound . Text intTables . ToString 23 24. 25 26 27 28 29 30 31 32 intTables 1 End Sub Private Sub btnExit Click(sender As 0bject, e As EventArgs) Handles btnExit.Click End Sub Private Sub txtGuests_KeyPress (sender As Object, e As KeyPressEventArgs) Handles txtGuests.KeyPress Me.Close) 34 35 36 37 38 39 10 41 42 Accept only numbers and th Backspace Key If (e.KeyChar"0" OrElse e.KeyChar >-9") AndAlso e.KeyChar ControlCharsBack Then End If e.HandledTrue End Sub End Class 00% Output Show output from: Error List Debug 7 Ready Ln 39 Col 12 Ch 12 INS Add to Source Control

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions