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

A local recording studio rents its facilities for $200 per hour. Management char

ID: 3651930 • Letter: A

Question

A local recording studio rents its facilities for $200 per hour. Management charges only for the number of minutes used. Create a project in which the input is the name of the group and the number of minutes it used the studio. Your program calculates the appropriate charges, accumulates the total charges for all groups, and computes the average charge and the number of groups that used the studio.
Form: use labeled text boxes for the name of the group and the number of minutes used. The charges for the current group should be displayed formatted in a text box. Create a group box for the summary info. Inside the group box, display the total charges for all groups, the number of groups, and the average charge per group. Format all output appropriately. Include buttons for calculate, clear, print, and exit.
Code: Use a constant for the rental rate per hour; divide that by 60 to get the rental rate per minute. Do not allow bad input data to cancel the program.

TEST DATA

Group Minutes

Pooches 95
Hounds 5
Mutts 480

CHECK FIGURES

Total Charges for Group Total # of Groups Average Charge Total Groups for All Groups
$316.67 1 $316.67 $316.67
$16.67 2 $166.67 $333.33
$1600.00 3 $644.44 $1,933.33

Explanation / Answer

public Class Studio 02 'Declare the constants. 03 Private TotalNumberSumInteger, AveragesumInteger As Integer 04 Private GroupSumInteger, MinCountInteger As Integer 05 Const STUDIO_RENT_INTEGER As Integer = 200 06 07 08 Private Sub PrintButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrintButton.Click 09 'Print the form. 10 PrintForm1.PrintAction = Printing.PrintAction.PrintToPreview 11 PrintForm1.Print() 12 13 End Sub 14 15 Private Sub CalculateButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CalculateButton.Click 16 'Calculate charges for all groups. 17 Dim TotalNumber As Integer 18 Dim GroupCharges As Integer 19 Dim TotalNumberInteger, AverageInteger, TotalChargesInteger, GroupInteger, MinInteger As Integer 20 21 22 'Convert input values to numeric variables. 23 GroupInteger = Integer.Parse(GroupChargesTextBox.Text) 24 25 MinInteger = Integer.Parse(MinTextBox.Text) 26 27 ' Calculate Value.

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