VISUAL BASIC
Design and develop a simple application System that determine the most economical quantity to be stocked for each product that a manufacturing company has in its inventory this quantity called economics order quantity (EOQ) is calculated as following
EOQ = sqrt (2RS/I)
Where
R = total yearly Production Requirement
S = Set up Cost per order
I = inventory carrying cost per unit
Note: After the user enter the total year production Requirements (R) its set up cost per oder (S) and inventory carrying cost per unit (I) at text baxes 1,2 & 3 expectively the user should Click button (with a compute caption) before the resulting computed value will be displayed at the text box 4
Use the Convert.TextString(Math.Eqrt(intNum1)); mathematical function to get the square root value
where intNum1 is the number of square root
Public Class Form1
Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
Dim R As Double = Double.Parse(txtR.Text)
Dim S As Integer = Integer.Parse(txtS.Text)
Dim I As Double = Double.Parse(txtI.Text)
Dim EOQ As Double = Math.Sqrt(2 * R * S / I)
txtEOQ.Text = Convert.ToString(EOQ)
End Sub
End Class
Comments
Leave a comment