Textbook: Joyce Farrell, Microsoft® Visual C#®: An Introduction to Object-Oriented Programming, Seventh Edition, ISBN: 9781337102100.Microsoft Visual C# (chapter 5 code case problem 5-2) Assignment instruction: In Chapter 4 of your book, you created an interactive application named MarshallsRevenue that prompts a user for the number of interior and exterior murals scheduled to be painted during a month and computes the expected revenue for each type of mural. The program also prompts the user for the month number and modifies the pricing based on requirements listed in Chapter 4. Now, modify your program so that the user must enter a month value from 1 through 12. If the user enters an incorrect number, the program prompts for a valid value. Also, the user must enter a number between 0 and 30 inclusive for the number of murals of each type; otherwise, the program prompts the user again. 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")));   This is my code. What did I do wrong, please? Thank you. using System; using static System.Console; using System.Globalization; class MarshallsRevenue {    static void Main()    {      // Your code here      const int MONTH_LOW=1;      const int MONTH_HIGH=12;      int numberLow=0;      int numberHigh=30;      string inputMonth;      int month;      string inputNumber;      int number;      WriteLine("Enter month between 1 and 12");      inputMonth=ReadLine();      month = Convert.ToInt32(inputMonth);       while(month!=MONTH_LOW && month!=MONTH_HIGH)      {        WriteLine("Invalid number, Enter month between 1 and 12");      month=month+1;      }      inputNumber=ReadLine();      number = Convert.ToInt32(inputNumber);             while(number>numberLow && number

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

Textbook: Joyce Farrell, Microsoft® Visual C#®: An Introduction to Object-Oriented Programming, Seventh Edition, ISBN: 9781337102100.Microsoft Visual C# (chapter 5 code case problem 5-2)

Assignment instruction:

In Chapter 4 of your book, you created an interactive application named MarshallsRevenue that prompts a user for the number of interior and exterior murals scheduled to be painted during a month and computes the expected revenue for each type of mural. The program also prompts the user for the month number and modifies the pricing based on requirements listed in Chapter 4.

Now, modify your program so that the user must enter a month value from 1 through 12. If the user enters an incorrect number, the program prompts for a valid value. Also, the user must enter a number between 0 and 30 inclusive for the number of murals of each type; otherwise, the program prompts the user again.

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")));

 

This is my code. What did I do wrong, please? Thank you.

using System;
using static System.Console;
using System.Globalization;
class MarshallsRevenue
{
   static void Main()
   {
     // Your code here
     const int MONTH_LOW=1;
     const int MONTH_HIGH=12;
     int numberLow=0;
     int numberHigh=30;
     string inputMonth;
     int month;
     string inputNumber;
     int number;
     WriteLine("Enter month between 1 and 12");
     inputMonth=ReadLine();
     month = Convert.ToInt32(inputMonth);
      while(month!=MONTH_LOW && month!=MONTH_HIGH)
     {
       WriteLine("Invalid number, Enter month between 1 and 12");
     month=month+1;
     }
     inputNumber=ReadLine();
     number = Convert.ToInt32(inputNumber);
    
       while(number>numberLow && number<numberHigh);
       WriteLine("This is the price: {0}", value.ToString("C", CultureInfo.GetCultureInfo("en-US")));

   }
}

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Graphical User Interface
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
  • SEE MORE 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