Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A tour company arranges tours to New York City or Minneapolis. The tour company requires that at least ten people register for the tour. The

image text in transcribed

A tour company arranges tours to New York City or Minneapolis. The tour company requires that at least ten people register for the tour. The cost per person is $500. However, if more than 20 people register, the cost per person will be reduced to $450. If more than 30 people register, the cost per person will be reduced to $400. Write a program that has one button. When the user clicks on the button, an InputBox should appear asking the user to enter the city chosen for the tour. If the user enters something different than New York or Minneapolis, the program should stop and display a message saying that the tours are offered only for these two cities. Note: the program should accept as input the name of the cities either lower-case or upper-case. For example, the user can type new york, New York or NEW YORK, and the program should still be able to recognize the city and accept the input. If the user enters one of the available cities, the program should continue and show to the user another InputBox, asking the user how many people will be registering for the tour. If the user enters a number lower than 10, the program should display a message saying that the number of participants should be at least 10. In this case, the user will need to start entering the inputs from the beginning (so from the city). For this program, you can assume the user will enter a number (that is, you do not need to check whether the input entered is a number of not; just if the number if lower than 10). If the user enters one of the available city and a number equal or greater than 10, the program should proceed calculating the total cost of the tour, using the prices specified above. The final cost should then be displayed in a text-box, which also shows the city picked by the user, all upper-case. The total cost should be properly formatted, have a currency sign and show only two decimals. See the picture below. In the example, I entered 40 participants. Tour Select Tour MINNEAPOLIS:$16,000.00 A tour company arranges tours to New York City or Minneapolis. The tour company requires that at least ten people register for the tour. The cost per person is $500. However, if more than 20 people register, the cost per person will be reduced to $450. If more than 30 people register, the cost per person will be reduced to $400. Write a program that has one button. When the user clicks on the button, an InputBox should appear asking the user to enter the city chosen for the tour. If the user enters something different than New York or Minneapolis, the program should stop and display a message saying that the tours are offered only for these two cities. Note: the program should accept as input the name of the cities either lower-case or upper-case. For example, the user can type new york, New York or NEW YORK, and the program should still be able to recognize the city and accept the input. If the user enters one of the available cities, the program should continue and show to the user another InputBox, asking the user how many people will be registering for the tour. If the user enters a number lower than 10, the program should display a message saying that the number of participants should be at least 10. In this case, the user will need to start entering the inputs from the beginning (so from the city). For this program, you can assume the user will enter a number (that is, you do not need to check whether the input entered is a number of not; just if the number if lower than 10). If the user enters one of the available city and a number equal or greater than 10, the program should proceed calculating the total cost of the tour, using the prices specified above. The final cost should then be displayed in a text-box, which also shows the city picked by the user, all upper-case. The total cost should be properly formatted, have a currency sign and show only two decimals. See the picture below. In the example, I entered 40 participants. Tour Select Tour MINNEAPOLIS:$16,000.00

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

Temporal Databases Research And Practice Lncs 1399

Authors: Opher Etzion ,Sushil Jajodia ,Suryanarayana Sripada

1st Edition

3540645195, 978-3540645191

More Books

Students also viewed these Databases questions

Question

2. How do they influence my actions?

Answered: 1 week ago