Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program to print a business travel expenses attachment for an income tax

ID: 3584691 • Letter: W

Question

Write a program to print a business travel expenses attachment for an income tax return. The program should request as input the name of the organization visited, the dates 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 entertainment are deductible.) A possible form layout and run are shown in Figs. 3.22 and 3.23, respectively. Business Travel Expenses Trip to attend meeting of SIGCSE 2010 March 10

Explanation / Answer

Public Class Form1 Private Sub btnCalc_Click(ByVal sender As System.Object ByVal e As System.EventArgs) Handles btnCalc.Click Dim org, dates, location As String Dim meals, airline, lodging, taxi As Decimal Dim total, half As Decimal lstTotals.items.Clear() lstTotals.Visible = True org = txtOrg.Text dates = txtDate.Text location = txtLocation.Text meals = txtMeals.Text airline = txtAirFare.Text lodging = txtLodging.Text taxi = txtTaxi.Text total = airline + lodging + taxi half = meals 2 With lstTotals.items .add("Business Travel Expense") .add("") .add("Trip to attend meeting of") .add(org) .add(dates) .add("") .add("Meals and Entertainment " & Format(meals, "c")) .add("Airplane fare " & Format(airline, "c")) .add("Lodging " & Format(lodging, "c")) .add("Taxi fares " & Format(taxi, "c")) .add("") .add("Total other than meals and entertainment: " & Format(total, "c")) .add("50 of meals and entertainment: " & format(half,"c")) End With End Sub End Class I am aware the coding is maybe crap and I could have done improve things, but I need to receive this working (alignment wise) before I try to narrow down anything. I highlighted where I need padding. I just can not remember how receive receive it working, especially now that I converted them to currency down there. Update: Ok I just remembered that.Code snippet: With lstTotals.items .add("Business Travel Expense") .add("") .add("Trip to attend meeting of") .add(org) .add(dates) .add("") .add("Meals and Entertainment " & Format(meals, "c").PadLeft(20)) .add("Airplane fare " & Format(airline, "c").PadLeft(20)) .add("Lodging " & Format(lodging, "c").PadLeft(20)) .add("Taxi fares " & Format(taxi, "c").PadLeft(20)) .add("") .add("Total other than meals and entertainment: " & Format(total, "c").PadLeft(20)) .add("50 of meals and entertainment: " & Format(half, "c").PadLeft(20))

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote