Question: Budget Analysis Create an application that lets the user enter the amount that he or she has budgeted for a month. A loop should then
Budget Analysis
Create an application that lets the user enter the amount that he or she has budgeted for a month. A loop should then uses input boxes to prompt the user for his her expenses for the month, and keep a running total. When the loop finishes, the program should display the amount that the user is over or under budget.
The above is the problem____________________________________________________________________________
Below this line is my started but not finished / attempt and a solution to the above question.
How can I accomplish this with what I have started? I feel as though I may not have quiet understood the question and need to rearrange my almost complete answer.
All I am asking is can is how to finish the afore stated problem with the solution I have started.
Public Class Form1
Private Sub btnCalculate_Click(sender As Object, e As EventArgs) Handles btnCalculate.Click
Dim decMonthlyBudget As Decimal 'His or her established budget
Dim decMonthlyExpenses As Decimal 'His or her expenses
Dim decTotalExpenses As Decimal 'His or her total expense
'Input boxes for budget and expenses
decMonthlyBudget = CInt(InputBox("Enter monthly budget: ", "Monthly Budget Amount"))
decMonthlyExpenses = CInt(InputBox("Enter amount of expenses: ", "Monthly Expenses"))
'List box displays
lstDisplay.Items.Add("Monthly Budget: $ " & decMonthlyBudget.ToString())
lstDisplay.Items.Add("Monthly Expenses: $ " & decMonthlyExpenses.ToString())
lstDisplay.Items.Add("__________________________")
End Sub
Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click
'Close the form.
Me.Close()
End Sub
End Class
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
