Question

Travel Expenses Create a GUI in C# Visual Studios application that calculates and displays the total...

Travel Expenses

Create a GUI in C# Visual Studios application that calculates and displays the total travel expenses of a business person on a trip.

Here is the information that the user must provide:

• Number of days on the trip

• Amount of airfare, if any

• Amount of car rental fees, if any

• Number of miles driven, if a private vehicle was used

• Amount of parking fees, if any

• Amount of taxi charges, if any

• Conference or seminar registration fees, if any

• Lodging charges, per night The company reimburses travel expenses according to the following policy:

• $37 per day for meals

• Parking fees, up to $10.00 per day

• Taxi charges up to $20.00 per day

• Lodging charges up to $95.00 per day

• If a private vehicle is used, $0.27 per mile driven The application should calculate and display the following:

• Total expenses incurred by the businessperson

• The total allowable expenses for the trip

• The excess that must be paid by the businessperson, if any

• The amount saved by the businessperson if the expenses were under the total allowed

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

********************** This is a draft version *********************************

-----------------------------------------------------------------------------------------------

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 Expense
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void TextBox3_TextChanged(object sender, EventArgs e)
{

}

private void Button2_Click(object sender, EventArgs e)
{

}

private void TextBox6_TextChanged(object sender, EventArgs e)
{
double days = Convert.ToDouble(txtDays.Text);
double airfare = Convert.ToDouble(txtAirfare.Text);
double carrental = Convert.ToDouble(txtCar.Text);
double miles = Convert.ToDouble(txtMiles.Text);
double parking = Convert.ToDouble(txtParking.Text);
double taxi = Convert.ToDouble(txtTaxi.Text);
double conference = Convert.ToDouble(txtConference.Text);
double lodge = 95;

double lodgeperday = 95;
double meal = 37;
double park = 10;
double taxiperday = 20;
double mile = 0.27;

var totallodge = lodge * days;
var totalmeal = meal * days;
var totalmiles = miles * mile;
var totalpark = days * park;
var totaltaxi = days * taxiperday;


var Total = totallodge + totalmeal + totalmiles + totalpark + conference + airfare + carrental + totaltaxi;

txtTotal.Text = Total.ToString();

}
}
}

Add a comment
Know the answer?
Add Answer to:
Travel Expenses Create a GUI in C# Visual Studios application that calculates and displays the total...
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
  • creat a GUI APPLICATION that calculates and displays the total travel expenses of...continues

    creat a GUI APPLICATION that calculates and displays the total travel expenses of a business person on a tripmhere is the information that a user provide:-number ofdays on the trip,amount of airfare,amount of car rental fees,if any,number of miles driven,if the private vehicle was used,amount of parking fees,amount of taxicharges,conference or seminar fees,lodging charges per night.The company reimburses trevel expenses according to following policy:$37 per day for meals,parking fees,upto $10 per day,taxi charges up to$ 20.00per week.lodging charges up to...

  • Please help, need to code for this business assignment using c++. Business Expense Reimbursements Calculator Probl...

    Please help, need to code for this business assignment using c++. Business Expense Reimbursements Calculator Problem statement: Business trip is part of the enterprise culture. Suppose a businessperson just completed a business trip for your company. Now, you are tasked to write a program that calculates and displays the total travel expenses, allowable expenses for the trip, and the excess that must be paid by the businessperson, if any The program should prompt the user for the following . The...

  • Create an application that calculates the total cost of a hospital stay. The application should accept...

    Create an application that calculates the total cost of a hospital stay. The application should accept the following input: the number of days spent in the hospital (as an integer), the amount of medication charges, the amount of surgical charges, the amount of lab fees, and the amount of physical rehabilitation charges. The hospital charges $350 per day. Create the following functions. A. CalcStayCharges- Calculates and returns the base charges for the hospital stay. This is computed as $350 times...

  • JAVA Hello I am trying to add a menu to my Java code if someone can...

    JAVA Hello I am trying to add a menu to my Java code if someone can help me I would really appreacite it thank you. I found a java menu code but I dont know how to incorporate it to my code this is the java menu code that i found. import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.ButtonGroup; import javax.swing.JCheckBoxMenuItem; import javax.swing.JFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JRadioButtonMenuItem; public class MenuExp extends JFrame { public MenuExp() { setTitle("Menu Example");...

  • Need to fill out 1040 form and 1040 with schedule C Questions and Problems Group 5:...

    Need to fill out 1040 form and 1040 with schedule C Questions and Problems Group 5: Cumulative Software Problem 1. The following additional information is available for the Albert and Allison Gaytor family from Chapters 1 and 2. On September 1, Allison opened a retail store that specializes in sports car accessories. The name of the store is "Toge Pass." The store is located at 617 Crandon Boulevard, Key Biscayne, FL 33149. The store uses the cash method of accounting...

  • total itemized deductions are given - $12,300 using the information, fill out SCHEDULE A 2018 FORM...

    total itemized deductions are given - $12,300 using the information, fill out SCHEDULE A 2018 FORM 1:9-72 George Large (SSN 000-11-1111) and his wife Marge Large (SSN 000-22-2222) live at 2000 Lakeview Drive, Cleveland, OH 49001 and want you to prepare their 2017 income tax return based on the information below: George Large worked as a salesman for Toyboat, Inc. He received a salary of $80,000 ($8,500 of federal income taxes withheld and $1,800 of state income taxes withheld) plus...

  • please answer #2 The Stratton Township Park The Stratton Township Park is located on a piece...

    please answer #2 The Stratton Township Park The Stratton Township Park is located on a piece of property that contains two golf courses, a swimming pool, and 800 acres of woods and open spaces. Three years ago, the Stratton Parks Department (Stratton) carved out miles of trails to allow visitors to hike the property and enjoy nature. To make that experience more enjoyable for visitors and available to school groups, Stratton decided to offer guided tours that have proven popular....

  • please answer #5 The Stratton Township Park The Stratton Township Park is located on a piece...

    please answer #5 The Stratton Township Park The Stratton Township Park is located on a piece of property that contains two golf courses, a swimming pool, and 800 acres of woods and open spaces. Three years ago, the Stratton Parks Department (Stratton) carved out miles of trails to allow visitors to hike the property and enjoy nature. To make that experience more enjoyable for visitors and available to school groups, Stratton decided to offer guided tours that have proven popular....

  • 1. Financial Statements: Develop an Income Statement for 20XX, Cash Flow Statement for 20XX, and Balance Sheet as of the end of 20XX based on the data provided below for year 20XX. All sales are colle...

    1. Financial Statements: Develop an Income Statement for 20XX, Cash Flow Statement for 20XX, and Balance Sheet as of the end of 20XX based on the data provided below for year 20XX. All sales are collected when the sale is made and all expenses are paid when the expense is incurred. Explain the purpose of each financial statement. a. Income Statement Data for 20XX: • Units produced and sold = 420 • Sales ($80 per unit selling price) = $33600...

  • please answer question #4 The Stratton Township Park The Stratton Township Park is located on a...

    please answer question #4 The Stratton Township Park The Stratton Township Park is located on a piece of property that contains two golf courses, a swimming pool, and 800 acres of woods and open spaces. Three years ago, the Stratton Parks Department (Stratton) carved out miles of trails to allow visitors to hike the property and enjoy nature. To make that experience more enjoyable for visitors and available to school groups, Stratton decided to offer guided tours that have proven...

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