Trusted by Students Everywhere
Why Choose Us?
0% AI Guarantee

Human-written only.

24/7 Support

Anytime, anywhere.

Plagiarism Free

100% Original.

Expert Tutors

Masters & PhDs.

100% Confidential

Your privacy matters.

On-Time Delivery

Never miss a deadline.

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

Computer Science Oct 06, 2020

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.

Expert Solution

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

Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
Dim shrNetIncome As Integer

txtSalesTotal.Text = Format((nudQuantity.Value * nudSalesPerUnit.Value).ToString(),"Currency")
txtVarExpenses.Text = Format((nudQuantity.Value * nudVarExpensesPerUnit.Value).ToString(), "Currency")
txtCM.Text = Format((CDbl(txtSalesTotal.Text) - CDbl(txtVarExpenses.Text)).ToString(), "Currency")
txtCMPerUnit.Text = Format((nudSalesPerUnit.Value - nudVarExpensesPerUnit.Value).ToString(), "Currency")
shrNetIncome = Convert.ToInt32(CDbl(txtCM.Text) - nudFixedExpenses.Value)
txtNetIncome.Text = Format(Convert.ToString(shrNetIncome), "Currency")
txtCMRatio.Text = (CDbl(txtCM.Text) / CDbl(txtSalesTotal.Text)).ToString()
End Sub

please see the attached file

Archived Solution
Unlocked Solution

You have full access to this solution. To save a copy with all formatting and attachments, use the button below.

Already a member? Sign In
Important Note: This solution is from our archive and has been purchased by others. Submitting it as-is may trigger plagiarism detection. Use it for reference only.

For ready-to-submit work, please order a fresh solution below.

Or get 100% fresh solution
Get Custom Quote
Secure Payment