Question

I need a Raptor Flowchart and a Java Source code for the following problem statement. Please...

I need a Raptor Flowchart and a Java Source code for the following problem statement. Please help!

Problem specifications:

You are tasked with developing an application that calculates the cost of a trip by a company salespeople consisting of the following type of expenses:

-lodging.

-meals.

-gas.

-tolls

The salesperson will be refunded the total cost minus the cost of meals.

Your application must prompt the user to enter all expenses, tally all expenses, and calculate how much, the company refund.

You need to display all expenses properly labeled (i.e. Gas, Lodging, …etc), total of all expenses, amount to be refunded.

You must use friendly variables (i.e. Lodging_Cost, CostofMeal, …etc and NOT a, b, c, d…)

You must print a ‘$’ sign next to all dollars’ figures.

You must set the precision for all amount to exactly two decimals

Homework Answers

Answer #1
Thanks for the question. Below is the code you will be needing. Let me know if you have any doubts or if you need anything to change. 

If you are satisfied with the solution, please leave a +ve feedback : ) Let me know for any help with any other questions.

Thank You!
===========================================================================


import java.util.Scanner;

public class RefundCalculator {

    public static void main(String[] args) {


        Scanner scanner = new Scanner(System.in);

        double lodgingExpenses, mealExpenses, gasExpenses, tollsExpenses;

        System.out.print("Enter expenses in lodging: ");
        lodgingExpenses = scanner.nextDouble();

        System.out.print("Enter expenses in meals: ");
        mealExpenses = scanner.nextDouble();

        System.out.print("Enter expenses in gas: ");
        gasExpenses = scanner.nextDouble();

        System.out.print("Enter expenses in tolls: ");
        tollsExpenses = scanner.nextDouble();

        double totalExpenses = lodgingExpenses + mealExpenses + gasExpenses + tollsExpenses;
        double refundAmount = totalExpenses - mealExpenses;

        System.out.printf("\nTotal Expense:  $%10.2f\n", totalExpenses);
        System.out.printf("Refund Amount:  $%10.2f\n", refundAmount);
    }
}

===========================================================

FLOWCHART IN RAPTOR

Thanks : )

Know the answer?
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
Similar Questions
EVERYTHING HAS TO BE DONE IN C#. (I need pseudocode and source code please) Problem Statement:...
EVERYTHING HAS TO BE DONE IN C#. (I need pseudocode and source code please) Problem Statement: Write an abstract class called Vacation that includes three class variables named: cost, budget, and destination. It has an abstract method, KeptToBudget, returning how much the vacation is over or under budget using cost. This class has two non-abstract subclasses, each with their own class variables: All-Inclusive Vacation: brand (such as ClubMed, Delta Vacations, etc.) rating (number of stars) total cost (all-inclusive means that...
CREATE AND TEST A FLOWCHART IN RAPTOR All our operands will be (float) numbers and for...
CREATE AND TEST A FLOWCHART IN RAPTOR All our operands will be (float) numbers and for a start, we shall use only two operators: + (plus) and - (minus) A sample run of the program would look like this. Welcome to your friendly neighborhood accumulator! Please input your expression, one token at a time, starting with an operand and type in '=' when completed. 3.0 + 2.0 - -5.0 = 10.0 Thank-you for using your friendly neighborhood accumulator! The problem...
C Programming: I am working on the problem below and have got all of the code...
C Programming: I am working on the problem below and have got all of the code down, except for one part I can't figure out. The logic for the calculation where the the total at each shop is giving after each iteration of the loop. this is the formula I've got: ingredientPrice += ingredient1; It calculates the total for the first shop properly, but for the shops that follow it gives a cumulative total rather than the singular total for...
I completed everything except for the last part. I know my answers are right because i...
I completed everything except for the last part. I know my answers are right because i double checked but i just dont know how to answer the last section. Problem 3-1 Schedule C (LO 3.1) Scott Butterfield is self-employed as a CPA. He uses the cash method of accounting, and his Social Security number is 644-47-7833. His principal business code is 541211. Scott's CPA practice is located at 678 Third Street, Riverside, CA 92860. Scott’s income statement for the year...
Textbook: Spiker Taxation of Individuals Comprehensive Problem 6-68 (LO 6-1, LO 6-2, LO 6-3) [The following...
Textbook: Spiker Taxation of Individuals Comprehensive Problem 6-68 (LO 6-1, LO 6-2, LO 6-3) [The following information applies to the questions displayed below.] Read the following letter and help Shady Slim with his tax situation. Please assume that his gross income is $172,900 (which consists only of salary) for purposes of this problem. December 31, 2017 To the friendly student tax preparer: Hi, it’s Shady Slim again. I just got back from my 55th birthday party, and I’m told that...
Beth R. Jordan lives at 2322 Skyview Road, Mesa, AZ 85201. She is a tax accountant...
Beth R. Jordan lives at 2322 Skyview Road, Mesa, AZ 85201. She is a tax accountant with Mesa Manufacturing Company, 1203 Western Avenue, Mesa, AZ 85201 (employer identification number 11-1111111). She also writes computer software programs for tax practitioners and has a part-time tax practice. Beth is single and has no dependents. Beth was born on July 4, 1972, and her Social Security number is 123-45-6789. She wants to contribute $3 to the Presidential Election Campaign Fund. The following information...
Tax Return Problem –?Decision Making Alice J. and Bruce M. Byrd are married taxpayers who file...
Tax Return Problem –?Decision Making Alice J. and Bruce M. Byrd are married taxpayers who file a joint return. Their Social Security numbers are 123-45-6789 and 111-11-1112, respectively. Alice's birthday is September 21, 1969, and Bruce's is June 27, 1968. They live at 473 Revere Avenue, Lowell, MA 01850. Alice is the office manager for Lowell Dental Clinic, 433 Broad Street, Lowell, MA 01850 (employer identification number 98-7654321). Bruce is the manager of a Super Burgers fast-food outlet owned and...
Note: This problem is for the 2018 tax year. David R. and Ella M. Cole (ages...
Note: This problem is for the 2018 tax year. David R. and Ella M. Cole (ages 39 and 38, respectively) are husband and wife who live at 1820 Elk Avenue, Denver, CO 80202. David is a self-employed consultant specializing in retail management, and Ella is a dental hygienist for a chain of dental clinics. David earned consulting fees of $145,000 in 2018. He maintains his own office and pays for all business expenses. The Coles are adequately covered by the...
Please show me how to apply CVP analysis for this case study. FLY ASH BRICK PROJECT:...
Please show me how to apply CVP analysis for this case study. FLY ASH BRICK PROJECT: FEASIBILITY STUDY USING CVP ANALYSIS S. K. Mitra and Shubhra Hajela wrote this case solely to provide material for class discussion. The authors do not intend to illustrate either effective or ineffective handling of a managerial situation. The authors may have disguised certain names and other identifying information to protect confidentiality. This publication may not be transmitted, photocopied, digitized or otherwise reproduced in any...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary rivals? How will the acquisition of Reebok by Adidas impact the structure of the athletic shoe industry? Is this likely to be favorable or unfavorable for New Balance? 2- What issues does New Balance management need to address? 3-What recommendations would you make to New Balance Management? What does New Balance need to do to continue to be successful? Should management continue to invest...