Microsoft Training Selector

Microsoft Training Selector

Assignment #2

Microsoft Training Selector

The following table shows Microsoft’s training courses, the number of days of each, and their registration fees.

Courses                                   Number of Days                     Registration Fee

C#                                           3                                  $800

VB                                           3                                  $500

.NET                                       2                                  $800

ASP.NET                                4                                  $1,500

SQL Server                             3                                  $900

Business Intelligence             3                                  $1,200

Oracle offers its training courses in the five locations shown in the following table. The table also shows the lodging fees per day at each location.

Location                                  Lodging Fees per Day

Atlanta                                                $150

Chicago                                               $220

Dallas                                      $120

Los Angeles                            $230

New York                               $280

When a customer registers for a training course, he/she must pay the registration fee plus the lodging fees for the selected location. For example, here are the charges to attend the ASP.NET course in Chicago:
Registration: $1,500
Lodging: $220 @ 4 days = $880
Total: $2,380 

Create a C# application (named TrainingSelector) that lets the user select a training course from a ListBox and a location from another ListBox. When the user clicks a button, the application should calculate and display the registration cost, the lodging cost, and the total cost on a Label.

(Hint: Use the SelectedIndex property to decide which item of a ListBox is selected. Also use an if-else if or switch statement to decide the number of days and registration fee and another if-else if or switch statement to choose the lodging fee. Then after the second if-else if or switch statement, calculate and display the registration cost, the lodging cost, and the total cost, which are chosen from the if-else if or switch statements).

Powered by