c# Danielle, Edward, and Francis are three salespeople at Holiday Homes. Write an application named HomeSales that prompts the user for a salesperson initial (D, E, or F) input as a string. Either uppercase or lowercase initials are valid. While the user does not type Z, continue by prompting for the amount of a sale. Issue the error message "Sorry - invalid salesperson" for any invalid initials entered. Keep a running total of the amounts sold by each salesperson. After the user types Z or z for an initial, display each salesperson’s total, a grand total for all sales, and the name of the salesperson with the highest total unless there is a tie. If there is a tie, indicate this in the program's output with the message: "There was a tie". An example of the program is shown below: Enter a salesperson initial >> D Enter amount of sale >> 10 Enter next salesperson intital or Z to quit >> d Enter amount of sale >> 2 Enter next salesperson intital or Z to quit >> E Enter amount of sale >> 15 Enter next salesperson intital or Z to quit >> f Enter amount of sale >> 9 Enter next salesperson intital or Z to quit >> Z Danielle sold $12.00 Edward sold $15.00 Francis sold $9.00 Total sales were $36.00 Edward sold the most In order to prepend the $ to currency values, the program will need to use the CultureInfo.GetCultureInfo method. In order to do this, include the statement using System.Globalization; at the top of your program and format the output statements as follows: WriteLine("This is an example: {0}", value.ToString("C", CultureInfo.GetCultureInfo("en-US"))); using System; using static System.Console; using System.Globalization; class HomeSales { static void Main() { // Write your main here. } }

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

c#

Danielle, Edward, and Francis are three salespeople at Holiday Homes. Write an application named HomeSales that prompts the user for a salesperson initial (D, E, or F) input as a string. Either uppercase or lowercase initials are valid. While the user does not type Z, continue by prompting for the amount of a sale. Issue the error message "Sorry - invalid salesperson" for any invalid initials entered. Keep a running total of the amounts sold by each salesperson. After the user types Z or z for an initial, display each salesperson’s total, a grand total for all sales, and the name of the salesperson with the highest total unless there is a tie. If there is a tie, indicate this in the program's output with the message: "There was a tie".

An example of the program is shown below:

Enter a salesperson initial >> D Enter amount of sale >> 10 Enter next salesperson intital or Z to quit >> d Enter amount of sale >> 2 Enter next salesperson intital or Z to quit >> E Enter amount of sale >> 15 Enter next salesperson intital or Z to quit >> f Enter amount of sale >> 9 Enter next salesperson intital or Z to quit >> Z Danielle sold $12.00 Edward sold $15.00 Francis sold $9.00 Total sales were $36.00 Edward sold the most

In order to prepend the $ to currency values, the program will need to use the CultureInfo.GetCultureInfo method. In order to do this, include the statement using System.Globalization; at the top of your program and format the output statements as follows: WriteLine("This is an example: {0}", value.ToString("C", CultureInfo.GetCultureInfo("en-US")));

using System;
using static System.Console;
using System.Globalization;
class HomeSales
{
static void Main()
{
// Write your main here.
}
}
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education