Hello, I recently submitted this project and I made the mistake of rating it bef
ID: 3628057 • Letter: H
Question
Hello,
I recently submitted this project and I made the mistake of rating it before running it and unfortunately it is not running.
Here is the assignment. Please help. I would really appreciate a step by step explanation (click on button and write following code, etc). I need to understand what I'm doing.
"Write a program to generate a business travel expense attachment for an income-tax return. The program should request as input the name of the organization visited, the date and location of the visit, and the expenses for meals and entertainment, airplane fare, lodging, and taxi fares. (Only 50% of the expenses for meals and entertainmet are deductible). The output is displayed in a list box that becomes visible when the button is clicked. Sub procedures should be used for the input and output.
It should include the following:
-organization
-date
-location
-Food and Entertainment
-Airplane Fare
-Lodging
-Taxi Fare
then button to Display business travel expenses
thank you
Explanation / Answer
Option Explicit On Option Strict On Public Class Form1 Const MealPercentage As Double = 50 '//50% Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim fmtStr As String = "{0, -26} {1, -10:C2}" Dim meals As Double = CType(TxtMeals.Text, Double) Dim airline As Double = CType(TxtAirLine.Text, Double) Dim lodging As Double = CType(TxtLodging.Text, Double) Dim taxi As Double = CType(TxtTaxi.Text, Double) Dim sum As Double = 0 '//Total Dim meals2 As Double = 0 Dim SumIncludingPercentageAddition As Double = 0 With LstResults.Items sum = CType(TxtAirLine.Text, Double) + CType(TxtLodging.Text, Double) + CType(TxtTaxi.Text, Double) meals2 = (meals * (MealPercentage / 100)) SumIncludingPercentageAddition = sum + meals2 .Clear() .Add("Business Travel Expense") .Add("") .Add("Trip to attend meeting of") .Add(TextBox1.Text) .Add(TextBox2.Text & " in " & TextBox3.Text) .Add("") .Add(String.Format(fmtStr, "Meals and entertainment", meals)) .Add(String.Format(fmtStr, "Airplane fare", airline)) .Add(String.Format(fmtStr, "Lodging", lodging)) .Add(String.Format(fmtStr, "Taxi fares", taxi)) .Add("") .Add(String.Format(fmtStr, "Total other than meals and entertainment:", sum)) .Add(String.Format(fmtStr, "50% of meals and entertainment:", meals2)) .Add(String.Format(fmtStr, "Total Including Meals:", sum + meals)) .Add(String.Format(fmtStr, "Total Including Meals + 50%:", sum + meals + meals2)) End With LstResults.Visible = True End Sub End Class
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.