Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I already have some of the code, but I am getting an error in the checks. Create a program named TipCalculation that includes two overloaded

I already have some of the code, but I am getting an error in the checks.
Create a program named TipCalculation that includes two overloaded methods named DisplayTipInfo.
One should accept a meal price and a tip as doubles (for example, 30.00 and 0.20, where 0.20 represents a 20 percent tip).
The other should accept a meal price as a double and a tip amount as an integer (for example, 30.00 and 5, where 5 represents a $5 tip).
Each method displays the meal price, the tip as a percentage of the meal price, the tip in dollars, and the total of the meal plus the tip. Include a Main() method that demonstrates each method.
For example if the input meal price is 30.00 and the tip is 0.20, the output should be:
image text in transcribed
image text in transcribed
DisplayTipInfo accepts meal price and tip as doubles 0 out of 1 checks passed. Review the results below for more details. Checks Unit Test - Incomplete DisplayTipInfo displays correct output when passed meal price and tip as doubles Build Status Build Succeeded Test Output Nunit Console Runner 3.10.0 (.NET 2.0) Copyright (c) 2019 Charlie Poole, Rob Prouse Tuesday, 14 February 2023 00:08:44 Runtime Environment OS Version: Linux 5.0.0.27 CLR Version: 4.0.30319.42000 Test Files NtTest43712852.dll Errors, Failures and Warnings 1) Failed : DisplayTipInfoDoublesTest.DisplayTipInfoTest Expected string length 80 but was 71. Strings differ at index 16. Expected: "Meal price: $40.00. Tip percent: 0.25 Tip in dollars: $10.00.. But was: "Meal price: $40. Tip percent: 0.25 Tip in dollars: $10. Total..." at DisplayTipInfoDoublesTest.DisplayTipInfoTest () [0x00000] in

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

2. Grade oral reports and class participation.

Answered: 1 week ago