Question

Use Visual Basic language(only basic no, C# or others). Use of Try-Catch Blocks In retail sales,...

Use Visual Basic language(only basic no, C# or others).

Use of Try-Catch Blocks

In retail sales, management needs to know the average inventory figure and the turnover of merchandise. Create a project that allows the user to enter the beginning inventory, the ending inventory and the cost of goods sold.

Form: Include labeled text boxes for the beginning inventory, the ending inventory, and the cost of goods sold. After calculating the answers. Display the average inventory and the turnover formatted in text boxes.

Include buttons for Calculate, Clear, and Exit. The formulas for the calculations are:

        Average Inventory = (Beginning Inventory + Ending Inventory)/2

      Turnover = Cost of Goods Sold/ Average Inventory

Note: The average inventory is expressed in dollars.: The turnover is the number times the inventory turns over: Format in Decimal to one decimal point

Include procedures for the click event of each button, Display the results in textboxes. Format the average inventory as currency and the turnover as a number with one digit to the right of the decimal. Make sure to catch any bad input and display a message to the user.    Test data should be negative numbers and/or characters

Use the following data to test the calculations for your project.

Test Data

Beginning

Ending

Cost of Goods Sold

Average Inventory

Turnover

58500

47000

400000

$52,750.00

7.6

75300

13600

515400

44,450.00

11.6

3000

19600

48000

11,300.00

4.2

0 0
Add a comment Improve this question Transcribed image text
Answer #1

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace HomeworkLib_4_2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void calc_Click(object sender, EventArgs e)
{
int a;
if (int.TryParse(b_inv.Text, out a) && int.TryParse(e_inv.Text, out a) && int.TryParse(cost.Text, out a))
{
if (Convert.ToInt32(b_inv.Text) <= 0 || Convert.ToInt32(e_inv.Text) <= 0 || Convert.ToInt32(cost.Text) <= 0)
{
MessageBox.Show("Enter Beganing and end inventory greater then zero");
}
else
{
double avg =( Convert.ToDouble(b_inv.Text) + Convert.ToDouble(e_inv.Text)) / 2;
avg_inv.Text = "$" + Convert.ToString(avg);
double turnover_ = Convert.ToDouble(cost.Text) / avg;
  
float roundedTurnover = (float)(Math.Round((double)turnover_, 1));
turnover.Text = Convert.ToString(roundedTurnover);
}
}
else
{
MessageBox.Show("Enter Numeric data only");
}
}

private void exit_Click(object sender, EventArgs e)
{
this.Close();
}

private void clear_Click(object sender, EventArgs e)
{
b_inv.Text = e_inv.Text = avg_inv.Text = turnover.Text = cost.Text = "";
}
}
}

Add a comment
Know the answer?
Add Answer to:
Use Visual Basic language(only basic no, C# or others). Use of Try-Catch Blocks In retail sales,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I don't get 2nd part help!(The three red boxes are incorrect) Sales Cost $60,000 $52,000 May...

    I don't get 2nd part help!(The three red boxes are incorrect) Sales Cost $60,000 $52,000 May 1 5 9 13 24 27 30 Beginning inventory Sale Purchase Purchase Sale Sale Purchase 150 units 100 units 50 units 200 units 200 units 50 units 75 units $22,000 $96,000 $112,000 $32,000 $39,600 (a1) Your answer is correct. Calculate Saddlery Company's cost of goods sold, gross margin, and ending inventory using FIFO. Cost of goods sold Gross margin 42000 Ending Inventory 63600 SHOW...

  • Use the following Information: $245,eee 176,eee 54,eee 44, eee Net sales Cost of goods sold Beginning...

    Use the following Information: $245,eee 176,eee 54,eee 44, eee Net sales Cost of goods sold Beginning inventory Ending inventory a. Calculate the Inventory turnover ratio. (Round your answer to 1 decimal place.) Inventory turnover ratio times b. Calculate the average days In Inventory. (Assume 365 days in a year. Round your intermediate calculationss and final answer decimal place.) Average days in inventory days c. Calculate the gross profit ratio. (Round your answer to 2 decimal place.) Gross profit ratio

  • Brief Exercise 6-16 Calculate inventory ratios (L06-7) Use the following information: Net sales Cost of goods...

    Brief Exercise 6-16 Calculate inventory ratios (L06-7) Use the following information: Net sales Cost of goods sold Beginning inventory Ending inventory $235,000 168,000 52,000 42,000 a. Calculate the inventory turnover ratio. (Round your answer to place.) int Inventory turnover ratio times erences b. Calculate the average days in inventory. (Assume 365 days in a year. Round your intermediate calculations and final answer to 1 decimal place.) Average days in inventory days c. Calculate the gross profit ratio. (Round your answer...

  • Laker Company reported the following January purchases and sales data for its only product Units Required...

    Laker Company reported the following January purchases and sales data for its only product Units Required at Cost 240 unitat $16.50 - $3.960 Units sold at Retail Date Activities Jan. 1 Beginning inventory Jan. 10 Sales Jan. 20 Parehase Jan. 25 Sales Jan. 30 Purchase Totale 170 unital $15.50 - 2,635 190 units $25.50 190 units e $25.50 $15.00 - 380 units 790 units 5,700 $12,295 380 units The Company uses a perpetual Inventory system. For specific identification, ending Inventory...

  • Brief Exercise 6A-4 The following is a record of Windsor Company's transactions for the month of...

    Brief Exercise 6A-4 The following is a record of Windsor Company's transactions for the month of May 2017 May 1 12 Balance 410 units @ $22 Purchase 570 units @ $25 May 10 20 Sale 300 units @ $39 Sale 510 units @ $39 Compute the cost of ending inventory using the moving-average method. (Round average cost per unit to 3 decimal places, Ending inventory $ LINK TO TEXT Brief Exercise 6A-3 The following is a record of Teal Company's...

  • Please write it in Java language 2. (Myinterface.java) The program description below was found waaaaay back...

    Please write it in Java language 2. (Myinterface.java) The program description below was found waaaaay back in the archives of the Equinox history database. It is the specification for a simply "computer store storefront". Even though computer stores are now extinct, you find the idea charming and decide to use the specification as inspiration to write an interface for one of the Equinox systems. Read carefully: write your own GUI for one of the Equinox systems, drawing inspiration from the...

  • Traditional Format Sales Cost of goods sold $12,000 Selling and administrative expenses: Selling Administrative Net operating...

    Traditional Format Sales Cost of goods sold $12,000 Selling and administrative expenses: Selling Administrative Net operating income $3,100 1,900 Contribution Format $12,000 Sales 6,000 Variable expenses 6,000 Cost of goods sold $6,000 Variable selling 600 Variable administrative 400 5,000 Contribution margin $ 1,000 Fixed expenses: Fixed selling 2,500 Fixed administrative 1,500 Net operating income 7,000 5,000 4,000 $ 1000 For a manufacturing company, the cost of goods sold would include some variable costs, such as direct materials, direct labor, and...

  • Laker Company reported the following January purchases and sales data for its only product Date Activities...

    Laker Company reported the following January purchases and sales data for its only product Date Activities Units Sold at Retail Units Acquired at Cost 180 units 56.40 = $ 1,152 Jan. 1 Beginning 120 units @ $15.80 inventory Jan. 10 Sales Jan.20 Purchase Jan. 25 Sales 100 units 20 = 540 100 units @ $15.80 Jan. 30 Purchase 220 unitsga.90 1,078 Totals 500 units $2,770 220 units The Company uses a periodic inventory system. For specific identification, ending inventory consists...

  • laker company reported the following January purchases and sales data for its only product Required information...

    laker company reported the following January purchases and sales data for its only product Required information [The following information applies to the questions displayed below.) Laker Company reported the following January purchases and sales data for its only product. Units Acquired at Cost 160 units @ $8.50 = $1,360 Units sold at Retail 120 units $17.50 Date Activities Jan. 1 Beginning inventory Jan. 10 Sales Jan. 20 Purchase Jan. 25 Sales Jan. 30 Purchase Totals 100 units @ $7.50 =...

  • Laker Company reported the following January purchases and sales data for its only product. Units sold...

    Laker Company reported the following January purchases and sales data for its only product. Units sold at Retail Units Acquired at Cost 145 units @ $ 7.00 = $ 1,015 105 units @ $16.00 Date Activities Jan. 1 Beginning inventory Jan. 10 Sales Jan. 20 Purchase Jan. 25 Sales Jan. 30 Purchase Totals 70 units @ $6.00 = 420 85 units @ $16.00 @ $5.50 = 190 units 405 units 1,045 $2,480 190 units The Company uses a perpetual inventory...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT