Discount Get CIS 170A ALL WEEKS Solution ONLY $98.95 $131.93
CIS 170A Week 2 - Lab 2A - Input and Output with Variables - you ... [$15.99]
CIS 170A Week 2 - Lab 2B - You will create a program that will pr... [$15.99]
CIS 170A Week 3 - Lab 3 - Create a Windows Form application that ... [$19.99]
CIS 170A Week 4 - Lab 4 - Create a program that will calculate an... [$19.99]
CIS 170A Week 5 - Lab 5 - Hockey Player - The customer has decide... [$19.99]
CIS 170A Week 6 - Lab 6 - Create a program, using an array, which... [$19.99]
CIS 170A Week 7 - Lab 7 - Hockey Player The user shall be able to... [$19.99]
Get Selected Weeks Solution with ONLY NOT Add Selected Tutorials To Cart
CIS 170 CIS/170 CIS170 CIS170A Visual Basic Week 3 - iLab 3 - Lab 3 - create a Windows Form application that will calculate and display the money made by a drive-in movie theater each night
    CIS 170 CIS/170 CIS170 CIS170A Visual Basic Week 3 - iLab 3 - Lab 3 - create a Windows Form application that will calculate and display the money made by a drive-in movie theater each night

CIS 170 CIS/170 CIS170 CIS170A Visual Basic Week 3 - iLab 3 - Lab 3 - create a Windows Form application that will calculate and display the money made by a drive-in movie theater each night

$19.99

Lab 3 of 7: Decisions                               

Lab Overview – Scenario / Summary:

TCOs:

1. Given a set of program specifications for a simple business problem requiring one or more decisions, code and test a program that meets the specifications and employs best programming practices.

2. Given a program with syntax and logic errors, employ the debugger and other diagnostic tools to remove or correct the errors.

This lab will familiarize students with If/Else/EndIf statements and possible Select Cast statements by calculating the amount of money a drive-in movie theater makes in a single night.

Lab Steps:

Step 1: Create a New Project

Create a new Windows Forms project in VB.NET. Name your project CIS170A_Lab03.

Step 2: Program Description

In this program you will create a Windows Form application that will calculate and display the money made by a drive-in movie theater each night. The movie theater has two types of nights. A “Regular” night is where each person in a guest car has to buy a ticket, and each ticket costs $10. A “Car” night is a special promotion where there is one price per car of $15, no matter how many guests are in the car.

In addition to the cost of entry (either Regular or Car), the theater sells popcorn and candy but the price of the items depends on the type of night.  On a Regular night popcorn costs $1.50 per box and on a special Car night popcorn costs $2.00 per box. On a Regular night candy cost $2.25 per candy box, while on a special Car night candy cost $3.00 per box.

On any night, the maximum number of cars allowed in is 500 and the maximum number of individual tickets is 3,000; the theater can produce 4,500 bags of popcorn each night and has 4,000 candy items.

Once the total revenue is calculated, the program will display a summary message with the type of night, the total number of cars, the total ticket sales, the total popcorn sales, the total candy sales, and the total sales amount.

Consider using the following pseudocode as a guide in developing the main processing algorithm of the program:

Initialize program and create variables

Accept and validate NumberOfCars

Accept and validate TypeOfNight

If TypefNight = “R” Or “r”:

a)     Accept and validate Tickets

Accept and validate Popcorn

Accept and validate Candy

If TypeOfNight = “R” or “r”:

a)     Compute TotalPopcorn = Popcorn*1.5

b)     Compute TotalCandy = Candy* 2.25

c)     Compute Total = Tickets*10 + TotalPopcorn + TotalCandy

If strTypeOfNight = “C” or “c”:

a)     Compute TotalPopcorn = Popcorn*2

b)     Compute TotalCandy = Candy*3

c)     Compute Total = NumberOfcars*15 + TotalPopcorn + TotalCandy

Display the final message (TypeOfNight; NumberOfCars; TotalPopcorn; TotalCandy; and Total.)

In all cases where validation fails, the program should terminate and return control to the user (i.e., exit the event handler immediately.)

 

Notice that this logic is a bit simple-minded and goes "straight through", without coming back to the beginning.  This is due to not yet having learned how to use the loop statements that will allow us to go back our logic to ask again for a value that was entered in error. (We cover that next week.)

Step 3: Suggested Form Design

You are free to experiment with form design and object colors as you see fit, even though as to colors we strongly recommend using the default colors for the form and all objects – this allows each user to see your form in their chosen Windows color palette.

The suggested form design is as follows:

Once the total sales are calculated, the program will display a summary message in a ListBox object with the following content:

type of night;

total number of cars;

total popcorn revenue;

total candy revenue; and

total revenue amount.

Step 4: Implement the Event Handlers

Consider using the following suggested TOE chart as guide in designing your program’s event handlers. As also noted in the pseudocode description above, the final calculation should NOT be completed unless all the input fields are validated as correct.

Task

Object

Event

Accept and validate NumberOfCars

Accept and validate TypeOfNight

If TypefNight = “R” Or “r”:

a)     Accept and validate Tickets

Accept and validate Popcorn

Accept and validate Candy

If TypeOfNight = “R” or “r”:

a)     Compute TotalPopcorn = Popcorn*1.5

b)     Compute TotalCandy = Candy* 2.25

c)     Compute Total = Tickets*10 + TotalPopcorn + TotalCandy

If strTypeOfNight = “C” or “c”:

a)     Compute TotalPopcorn = Popcorn*2

b)     Compute TotalCandy = Candy*3

c)     Compute Total = NumberOfcars*15 + TotalPopcorn + TotalCandy

Display the final message (TypeOfNight; NumberOfCars; TotalPopcorn; TotalCandy; and Total.)

 

btnCompute

Click

Clear all textboxes and listbox [Hint: use method Items.Clear()]

btnClear

Click

Close form.

btnExit

Click

[Hint: To comply with the desire to avoid computing the totals if we have some problem in validation, consider using the Exit Sub statement in suitable locations within your code.]

Programming notes:

 

To check if a textbox is empty, use the String.IsNullOrEmpty method, such as:

        If String.IsNullOrEmpty(txtName.Text) = True Then

To validate a numeric input (in the example below, intSeasons, an Integer value), consider the following suggested code:

        If Integer.TryParse(Me.txtSeasons.Text, intSeasons) = False Then

            MessageBox.Show("Seasons must be numeric", "Error", _

                            MessageBoxButtons.OK, MessageBoxIcon.Error)

            Me.txtSeasons.SelectAll()

            Me.txtSeasons.Focus()

            Exit Sub

        Else

            If intSeasons < 1 Or intSeasons > 20 Then

                MessageBox.Show("Seasons must be between 1 and 20", "Error", _

                                MessageBoxButtons.OK, MessageBoxIcon.Error)

                Me.txtSeasons.SelectAll()

                Me.txtSeasons.Focus()

                Exit Sub

            End If

        End If

Please remember to set Option Strict On and also to supply profuse internal documentation in your program.

Step 6: Deliverables

Zip up the top-level folder with your program (the complete set of project files) into a single file (please check Doc Sharing for details.)

Rename that .zip file as CIS170A_Lab03_LastName_FirstInitial.zip, or similar.

Place deliverables in the Dropbox.

END OF LAB

My solution contain Visual Basic projects.

Please using Visual Studio to open this project.

If you have more question or need help, please contact me via email support@extutorials.com. I will help you any time.

Thank you.

Attached Files

Move over [ preview ] file name to preview content in it!

Write a review

Your Name:


Your Review: Note: HTML is not translated!

Rating: Bad           Good

Enter the code in the box below:



PURCHASE SAVE
2 Tutorials 10%
3 Tutorials 13%
4 Tutorials 16%
5 Tutorials 19%
6 Tutorials 22%
7 Tutorials 25%
8 Tutorials 28%
9 Tutorials 31%
10 Tutorials 34%
add url more

9MZQASHWN73B