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

EBK JAVA PROGRAMMING
8th Edition
ISBN:9781305480537
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 12PE
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning