#include <iostream.h>
#include <iomanip.h>
using namespace std;
int Get_Number_of_days(int);
void Get_Time (double&, double&);
double Get_AirFare(double);
double Get_CarRental_Fee (double);
double Get_Vehicle_Expenses(double);
void Get_Parking_Fee(double&,double&);
void Get_Taxi_Fee(double&,double&);
double Get_Reg_Fee(double);
void Hotel_Fee(double&,double&);
void Meal_Expenses (double&,double&);
int main()
{
int number_of_days;
double Arrival_Time;
double Departure_Time;
double AirFare;
double Rental_Car_Fee;
double Vehicle_Expense;
double Car_Milage = .38;
double Parking_Fee;
double Taxi_Fee;
double Registration_Fee;
double Total_Spent;
double Total_Allowed;
double Total_From_Company;
double Total_Meal_Expense;
double Total;
double Parking_Allowed;
double Taxi_Fee_Allowed;
double Hotel_Expense;
double Night_Rate;
double Hotel_Expense_Allowed;
double Hotel_Expense_Total;
double Breaksfast_Charges_Allowed;
double Lunch_Charges_Allowed;
double Dinner_Charges_Allowed;
double Breaksfast_Charges;
double Lunch_Charges;
double Dinner_Charges;
double TOTALMeal_Expense_Allowed;
string Name_of_Employee;
int d;
double Spent_on_Parking;
double Spent_on_Taxi;
double spentTotal_Meal_Expense;
cout<<"Employee Expense Report"<<endl;
cout<<"====================="<<endl<<endl;
cout<<"Name of the Employee: ";
cin >>Name_of_Employee;
cout<<endl;
number_of_days = Get_Number_of_days(number_of_days);
d = static_cast<int>(number_of_days);
cout<<endl;
Get_Time (Departure_Time,Arrival_Time);
cout<<endl;
cout <<"TRAVEL "<<endl;
cout <<"==========="<<endl;
AirFare = Get_AirFare(AirFare);
Rental_Car_Fee = Get_CarRental_Fee(Rental_Car_Fee);
Parking_Allowed = 6 * number_of_days;
Get_Parking_Fee(Spent_on_Parking, Parking_Allowed);
Taxi_Fee_Allowed = 10 * number_of_days;
Get_Taxi_Fee (Spent_on_Taxi,Taxi_Fee_Allowed);
cout <<endl;
cout <<"FEE"<<endl;
cout <<"============="<<endl;
Registration_Fee= getRegistration_Fee(Registration_Fee);
Hotel_Expense_Total = number_of_days * Night_Rate;
Hotel_Expense_Allowed = 90 * number_of_days;
Hotel_Fee (Hotel_Expense_Total,Hotel_Expense_Allowed);
cout<< endl;
cout <<"MEAL"<<endl;
cout <<"============"<<endl;
Breaksfast_Charges_Allowed = 9.00 * number_of_days;
Lunch_Charges_Allowed = 12.00 * number_of_days;
Dinner_Charges_Allowed = 16.00 * number_of_days;
TOTALMeal_Expense_Allowed = Breaksfast_Charges_Allowed+Lunch_Charges_Allowed+Dinner_Charges_Allowed;
Total_Meal_Expense= Breaksfast_Charges +Lunch_Charges +Dinner_Charges;
Meal_Expenses (TOTALMeal_Expense_Allowed,spentTotal_Meal_Expense);
cout<<endl;
//Calculating Total Spendings
Total_Spent=AirFare+Rental_Car_Fee+Vehicle_Expense+Parking_Fee+Taxi_Fee+Registration_Fee+Hotel_Expense+Car_Milage+Total_Meal_Expense;
Total_Allowed= AirFare+Car_Milage+Rental_Car_Fee+Parking_Allowed+Taxi_Fee_Allowed+TOTALMeal_Expense_Allowed+Hotel_Expense_Allowed;
//Totals for the Employee Travelling
cout <<"Employee Expense Report for "<<Name_of_Employee<<endl<<endl;
cout << "Total Number_of_days of trip: "<<number_of_days<<endl;
cout << fixed << setprecision(2);
cout << "Departure time: "<< Departure_Time<<"Arrival time: "<<Arrival_Time<<endl;
cout<<setprecision(2)<<showpoint<<fixed;
cout<<endl;
cout<<"Spent”<< "Allowed"<<endl;
cout <<"Airfare”<<AirFare<<AirFare<<endl;
cout <<"Car Rental”<<Rental_Car_Fee<<Rental_Car_Fee<<endl;
cout <<"Milage"<<Car_Milage<<Car_Milage<<endl;
cout <<"Parking"<<Parking_Fee<<Parking_Allowed<<endl;
cout <<"Taxi”<<Taxi_Fee<<Taxi_Fee_Allowed<<endl;
cout <<"Registration"<<Registration_Fee<<Registration_Fee<<endl;
cout <<"Hotel"<<Hotel_Expense_Total<<Hotel_Expense_Allowed<<endl;
cout<<"Meal"<<spentTotal_Meal_Expense<<TOTALMeal_Expense_Allowed<<endl;
cout <<"TOTALS"<<setw(21)<<Total_Spent<<otal_Allowed<<endl;
cout <<endl<<endl;
system ("pause"); //It will pause the system for some time until you press any key.
return 0;
}
//Asking employee about number of days spent on the trip
int Get_Number_of_days(int number_of_days)
{
cout << "How many number_of_days were spent on the trip?" << endl;
cin >> number_of_days;
while (number_of_days < 1)
{
cout << "Please enter a number greater than 1" << endl;
cin >> number_of_days;
}
return number_of_days;
}
//Function to ask the employee about departure time of the trip
void Get_Time (double &Departure_Time, double &Arrival_Time)
{
cout << "At what time did you depart for the trip? Kindly enter in 00.00 format." ;
cin >> Departure_Time;
cout <<endl;
while ( Departure_Time <0 || Departure_Time > 23.59)
{
cout << "Error: Please enter a number between 00.00 and 23.59";
cin >> Departure_Time;
}
cout << "At what time did you arrive for the trip? (Kindly enter in 00.00 format)" ;
cin >> Arrival_Time;
while ( Arrival_Time <0 || Arrival_Time > 23.59)
{
cout << "Kindly provide a number between range 00.00 and 23.59";
cin >> Arrival_Time;
}
}
//Function to get expenses for airplane travel
double Get_AirFare (double AirFare)
{
cout << "What was the Total cost of the air fare?" << endl;
cin >> AirFare;
while (AirFare < 0) //Validating airfare
{
cout << "Kindly provide a number greater than 0." << endl;
cin >> AirFare;
}
return AirFare;
}
//Car Rental Function
double Get_CarRental_Fee (double Rental_Car_Fee)
{
cout << "What was the Total cost of any car rentals?" << endl;
cin >> Rental_Car_Fee;
while (Rental_Car_Fee < 0) //Validating rental amount
{
cout << "Error:Please enter a number greater than 0. Try Again!" << endl;
cin >> Rental_Car_Fee;
}
return Rental_Car_Fee;
}
//Function to total parking fee
void Get_Parking_Fee(double &Spent_on_Parking, double &Parking_Allowed)
{
int number_of_days;
double Parking_Fee;
cout << "How much was spent on parking?" << endl;
cin >> Parking_Fee;
while (Parking_Fee < 0) //Validating parking fee total
{
cout << "Error:Please enter a positive number. Try again!" << endl;
cin >> Parking_Fee;
}
Spent_on_Parking = number_of_days * Parking_Fee;
Parking_Allowed = number_of_days * 6;
}
//Function for taxi fees total
void Get_Taxi_Fee (double &Spent_on_Taxi, double &Taxi_Fee_Allowed)
{
double Taxi_Fee;
int number_of_days;
cout << "How much was spent on taxi fare?" << endl;
cin >> Taxi_Fee;
while (Taxi_Fee < 0) Validating data from employee
{
cout << "Only positive numbers are allowed!" << endl;
cin >> Taxi_Fee;
}
Spent_on_Taxi = number_of_days * Taxi_Fee;
Taxi_Fee_Allowed = 6 * number_of_days;
}
//Function for Employee’s conference fees
double getRegistration_Fee (double Registration_Fee)
{
cout << "How much was spent on conference fees?" << endl;
cin >> Registration_Fee;
while (Registration_Fee < 0)
{
cout << "Only positive numbers are allowed!" << endl;
cin >> Registration_Fee;
}
return Registration_Fee;
}
//Total cost of the hotel
void Hotel_Fee (double &Hotel_Expense_Allowed, double &Hotel_Expense_Total)
{
int number_of_days;
double Hotel_Expense;
cout << "How much did you spend on hotel rooms?" << endl;
cin >> Hotel_Expense;
while (Hotel_Expense < 0)
{
cout << "Only positive numbers are allowed!" << endl;
cin >> Hotel_Expense;
}
Hotel_Expense_Allowed = 90 * number_of_days;
Hotel_Expense_Total= Hotel_Expense * number_of_days;
}
//Calculating Meal expenses total
void Meal_Expenses(double &TOTALMeal_Expense_Allowed,double &spentTotal_Meal_Expense)
{
int number_of_days;
int numNumber_of_days;
double Breakfast;
double Lunch;
double Dinner;
double Day_First;
double Day_Last;
double Departure_Time;
double Arrival_Time;
double Breaksfast_Charges_Allowed;
double Lunch_Charges_Allowed;
double Dinner_Charges_Allowed;
double BreakfastFee;
double Lunch_Charges;
double Dinner_Charges;
for(int number_of_days = 1; number_of_days <= numNumber_of_days; number_of_days++)
{
cout << "Day:" << number_of_days << endl;
if (number_of_days < 2 && Departure_Time > 00.00 && Departure_Time <= 7.00)
{
cout << "Enter the cost of Breakfast: ";
cin >> BreakfastFee;
cout << "Enter the cost of Lunch: ";
cin >> Lunch_Charges;
cout << "Enter the cost of Dinner: ";
cin >> Dinner_Charges;
}
if (number_of_days < 2 && Departure_Time > 7.00 && Departure_Time <=12.00)
{
cout << "Enter the cost of Lunch: ";
cin >> Lunch_Charges;
cout << "Enter the cost of Dinner: ";
cin >> Dinner_Charges;
}
if (number_of_days < 2 && Departure_Time > 12.00 && Departure_Time <=18.00)
{
cout << "Enter the cost of Dinner: ";
cin >> Dinner_Charges;
}
if (number_of_days > 1 && number_of_days < numNumber_of_days )
{
cout << "Enter the cost of Breakfast: ";
cin >> BreakfastFee;
cout << "Enter the cost of Lunch: ";
cin >> Lunch_Charges;
cout << "Enter the cost of Dinner: ";
cin >> Dinner_Charges;
}
if (number_of_days == numNumber_of_days && Arrival_Time > 8.00 && Arrival_Time <= 13.00)
{
cout << "Enter the cost of Breakfast: ";
cin >> BreakfastFee;
}
if (number_of_days == numNumber_of_days && Arrival_Time > 13.00 && Arrival_Time <= 19.00)
{
cout << "Enter the cost of Breakfast: ";
cin >> BreakfastFee;
cout << "Enter the cost of Lunch: ";
cin >> Lunch_Charges;
}
if (number_of_days == numNumber_of_days && Arrival_Time > 19.01)
{
cout << "Enter the cost of Breakfast: ";
cin >> BreakfastFee;
cout << "Enter the cost of Lunch: ";
cin >> Lunch_Charges;
cout << "Enter the cost of Dinner: ";
cin >> Dinner_Charges;
}
cout <<endl;
}
Breaksfast_Charges_Allowed = 9.00 * number_of_days;
Lunch_Charges_Allowed = 12.00 * number_of_days;
Dinner_Charges_Allowed = 16.00 * number_of_days;
TOTALMeal_Expense_Allowed = Breaksfast_Charges_Allowed+Lunch_Charges_Allowed+Dinner_Charges_Allowed;
spentTotal_Meal_Expense= BreakfastFee +Lunch_Charges +Dinner_Charges;
}
Please help, need to code for this business assignment using c++. Business Expense Reimbursements Calculator Probl...
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...
Just need help with the first two questions, please! Accounting Cycle Review Project C. Brown recently expanded to open a 2nd fly fishing shop, CB's Fly Shop2. In order to finance the 2nd shop, C. Brown contributed $20,000 and raised another $50,000 from friends and family. With the additional cash, he is able to get his 2nd fly shop open and operational in June 2015. He is too busy with it being prime fishing season to do the accounting and...
Need help on questions 3 and 4 please! Accounting Cycle Review Project C. Brown recently expanded to open a 2nd fly fishing shop, CB's Fly Shop2. In order to finance the 2nd shop, C. Brown contributed $20,000 and raised another $50,000 from friends and family. With the additional cash, he is able to get his 2nd fly shop open and operational in June 2015. He is too busy with it being prime fishing season to do the accounting and has...
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");...
Please see attached Pictures. This is a homework assignment for Legal environment of Business that i need help solving. Stacy mails Jennifer an offer to sell Jennifer 43 bags of rice for $107.00. Jennifer replies to Stacy by mail, stating, " agree to pay $105.75 for 43 bags of rice. Neither Stacy nor Jennifer are merchants. What is the status of Stacy's offer. 1. a. Jennifer has accepted it b. Jenifer has rejected it and counteroffered c, Jennifer has breached...
Gleim 6 Deductions from AGI [1] Which one of the following expenses does not qualify as a deductible medical expense? A. Cost of long-term care for a developmentally disabled person in a relative’s home. B. Special school for a deaf child to learn lip reading. C. Cost of elevator installed for individual who had heart bypass surgery (in excess of increase in value of individual’s home). D. Cost and care of guide dogs used by a blind person in his...