Explore BrainMass
Share

Explore BrainMass

    Run Time Errors

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Using the following table test the application of the attached Visual Basic program

    Quantity Price (sales in $ per unit) Variable Expenses per unit Fixed Expenses

    300 $300 $125 $34,000
    300 $300 $125 $1,000
    0 $200 $100 $40,000
    500 $0 $20 $22,000
    200 $150 $0 $20,000
    500 $200 $175 $35,000

    1. Run the attached project. Use the first and second rows of test data in the above table to test the application. The second set of data results in a run time error.

    2. Return to design mode and open the code window for the form 1 form. Set Option Strict On for the form. Several Syntax errors result from setting Option Strict to On. Open the task list to view the errors resulting from setting Option Strict to On.

    3. Declare all necessary variables and perform the necessary data conversions in the code to perform the calculations properly without Syntax errors.

    4. Correct the run-time error that results from the data in row 2 of the above table. Do not modify the range of the NumericUpDown controls to fix the error. Rather, use the proper data types in the code and perform the necessary data conversions to handle the numeric data properly.

    5. Format all output to the Textbox controls to currency where currency values are used. Ratios are not currency values.

    See attached file for full problem description.

    © BrainMass Inc. brainmass.com October 9, 2019, 7:06 pm ad1c9bdddf
    https://brainmass.com/computer-science/visual-basic/run-time-errors-108067

    Attachments

    Solution Preview

    Code changed in Form1.vb in btnCalculate_Click
    --------------------------------------------------------------------------------------------------------------

    Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ...

    Solution Summary

    Run Time Errors are highlighted.

    $2.19