Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Design and code a project to calculate the amount due for rentals. Movies may be

ID: 3532349 • Letter: D

Question

Design and code a project to calculate the amount due for rentals. Movies may be in VHS format or DVD format. Videotapes rent for $1.80 each and DVDs rent for $2.50. New releases are $3 for DVD and $2 for VHS.


On the form include a text box to input the movie title and radio buttons to indicate whether the movie is in DVD or VHS format. Use one check box to indicate whether the person is a member; members receive a 10 percent discount. Another check box indicates a new release.


Use buttons for Calculate, Clear for Next Item, Order Complete, Summary, Print, and Exit. The Calculate button should display the item amount and add to the subtotal. The Clear for Next Item button clears the check box for new releases, the movie title, and the radio buttons; the member check cannot be changed until the current order is complete. Include validation to check for missing data(try catch error handling). If the user clicks on Calculate button without first entering the movie title and selecting the movie format, display a message box.


For the Order Complete button, first confirm the operation with the user and clear the controls on the form for a new customer.


The Summary button displays the number of customers and the sum of the rental amounts in a message box. Make sure to add to the customer count and rental sum for each customer order.



***note: please try to write the code in visual basic 2010, and this is only in chapter 4 in Programming In Visual Basic 2010

so if you could try to make it as simple as possible and provide simple naming variables. I found here a similar question/answer to this problem but I find it hard to understand. Also, Im not sure if it's possible but if you could provide a solution/design so i know how it looks like that would be great. Thanks a lot.

Explanation / Answer

I like to jot down on a piece of paper in note form (or pseudo-code) what needs to be done. That way I don't forget anything and I can order things where they are supposed to happen. I find it's handy for programs that you have to write a lot of code for or programs that get tangly. It's a good way to organize thoughts.

The calculate button is the only button that requires calculations. The others either clear, display data, or exit the program. Since it is the calculations you are having trouble with, I will talk about that one here. But let me know if you have trouble with the others!

I don't wanna tell you too much, as it would defeat the purpose of learning. So I will give you a kind of pseudo-code. It says in your problem that the calculate button will display the item amount and add to the subtotal. In order to do this, we have to determine which radio button is selected and which, if any, check boxes are checked. This will affect how much the item is worth. Let's review the information we are given:

VHS - $1.80 DVD - $2.50
VHS - $2.00 (New Release) DVD - $3.00 (New Release)

Members receive 10% discount.

Pseudo-code:

find which radio button is selected (VHS or DVD?)
if selected radio button is VHS
if new release check box is checked
price is $2.00
else
price is $1.80
else if selected radio button is DVD
if new release check box is checked
price is $3.00
else
price is $2.50
End if

if member check box is checked
discount priceby 10%
end if

display price to the form in a small label so the user can see

add price to subtotal (subtotal being a global variable declared outside the subs)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote