1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Igoryamba
3 years ago
3

Create a C# Console program named TipCalculationthat includes two overloaded methods named DisplayTipInfo.

Computers and Technology
1 answer:
dimulka [17.4K]3 years ago
7 0

Answer:

The code for the program is given in the explanation

Explanation:

using System;

using static System.Console;

class TipCalculation

{

   //definition of the Main()

   static void Main()

   {      

       double dPrice, dTip;

       int iTip;

       //prompt and accept a meal price and a tip as doubles

       Write("Enter a floating point price of the item : ");

       dPrice = Convert.ToDouble(Console.ReadLine());

       Write("Enter a floating point tip amount: ");

       dTip = Convert.ToDouble(Console.ReadLine());

       //call the method DisplayTipInfo()

       //with doubles

       DisplayTipInfo(dPrice, dTip);

       //prompt and accept a meal price as a double

       //and a tip amount as an integer

       Write("\nEnter a floating point price of another item : ");

       dPrice = Convert.ToDouble(Console.ReadLine());

       Write("Enter a integral tip amount: ");

       iTip = Convert.ToInt32(Console.ReadLine());

       //call the method DisplayTipInfo()

       //with double and an integer

       DisplayTipInfo(dPrice, iTip);

   }

   //definition of the method DisplayTipInfo()

   //accept a meal price and a tip as doubles

   public static void DisplayTipInfo(double price, double tipRate)

   {

       //find the tip amount

       double tipAmount = price * tipRate;

       //find the total amount

       double total = price + tipAmount;

       //print the output

       WriteLine("Meal price: $" + price.ToString("F") + ". Tip percent: " + tipRate.ToString("F"));

       WriteLine("Tip in dollars: $" + tipAmount.ToString("F") + ". Total bill $" +          total.ToString("F"));

   }

   //definition of the method DisplayTipInfo()

   //accept a meal price and a tip as doubles

   //a meal price as a double and a tip amount as an integer

   public static void DisplayTipInfo(double price, int tipInDollars)

   {

       //find the tip rate

       double tipRate = tipInDollars / price;

       //find the total amount

       double total = price + tipInDollars;

       //print the output

       WriteLine("Meal price: $" + price.ToString("F") + ". Tip percent: " +                 tipRate.ToString("F"));

       WriteLine("Tip in dollars: $" + tipInDollars.ToString("F") + ". Total bill $" +               total.ToString("F"));

   }

}

You might be interested in
How do u type please help
Slav-nsk [51]

Answer:

use your keyboard

Explanation:

listen your 2 years old i know you can type daughter

6 0
2 years ago
Read 2 more answers
Stella is a bank executive. She is preparing a spreadsheet on the loan repayment schedules of customers. Which function can she
den301095 [7]

Answer: The function Stella can use to calculate the periodic payments of a loan is:

The Excel PMT function or NPER function.

Explanation: 1. The Excel PMT function is a financial function that returns the periodic payment for a loan.

2. The NPER function to figure out payments for a loan, given the loan amount, number of periods, and interest rate.

7 0
3 years ago
A lack of financial literacy can cause you to lose your
Marianna [84]

Answer:

Financial literacy of someone's ability to understand and apply financial skills, including budgeting, financial management, investing and risk calculation. However, lack of financial literacy may result in opposite of having financial literacy.

Explanation:

Financial literacy of someone's ability to understand and apply financial skills, including budgeting, financial management, investing and risk calculation. Financial literacy helps individuals in taking financial decisions in achieving self-sufficient financial stability.  Financial literacy is the skill of someone about making financial decisions. This skill can help a person to develop a financial roadmap about what he earns, how he will earn, what he spends and what he saves and owes.

Lack of financial literacy can cause to loose your:

  • making effective financial planning
  • making the right decision about budgeting
  • ability to calculate interest
  • understanding the time value of money.

Financial illiteracy can cause you to lose your money or become victims of predatory lending, fraud, subprime mortgages, paying high-interest rates, bankruptcy or potentially resulting in bad credit.

The lack of financial literacy can lead to owing large amounts of debt and making poor financial decisions. For example, the advantages or disadvantages of fixed and variable interest rates are concepts that are easier to understand and make informed decisions about if you possess financial literacy skills.

4 0
4 years ago
Sherry’s science teacher requires the use of an open access database . Which of the following meets the requirements
cestrela7 [59]
<h2>Answer:</h2>

<u>The correct option is </u><u>(D) Google</u>

<h2>Explanation:</h2>

Open access database refers to free, unrestricted online access to research outputs such as journal articles and books. Open Access content is open to all, with no access fees. Since Google provides its services free of cost and it is open to all of the people across the world therefore it can be considered as an Open Access database.

6 0
4 years ago
Create java program for these 2 question
morpeh [17]

1 see what you can do and go from their

7 0
3 years ago
Other questions:
  • If people have humility, they don’t tend to see themselves as overly or more important than others. True False
    13·1 answer
  • What is a project manager?
    6·2 answers
  • list the network characteristics of the wireless network(s) in the decode -- SSIDs, channels used, AP names, presence of Bluetoo
    6·1 answer
  • which type of website would a business selling merchandise on the internet use? A person B information C commercial D social
    9·1 answer
  • Grace whistles while tickling Camille with a feather. Eventually, Camille starts to squirm and giggle every time Grace whistles,
    10·1 answer
  • Write a program that reads in characters from standard input and outputs the number of times it sees an 'a' followed by the lett
    11·1 answer
  • For Excel:
    5·1 answer
  • The letters LAN stand for Area Network.
    9·2 answers
  • Which term best describe the operating system of a computer?
    12·1 answer
  • Can someone help me explain Nvm scheduling in operating systems?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!