Microsoft Visual C#7th Edition, Joyce ISBN: 9781337102100 chap 5 case problem 5-2. This is my code but it's not working in Cenage Mindtap. What did I do wrong, please? Thank you using System; using static System.Console; using System.Globalization; class MarshallsRevenue {     static void Main()     {         const int INTERIOR_PRICE = 500;         const int EXTERIOR_PRICE = 750;         string entryString;         int numInterior;         int numExterior;         int revenueInterior;         int revenueExterior;         int total;         bool isInteriorGreater;         bool valid;         valid = true;         int monthnumber;         int interiorRate;         int exteriorRate;         interiorRate = INTERIOR_PRICE;         exteriorRate = EXTERIOR_PRICE;         Write("Enter number of month being scheduled 1-12 >> ");         entryString = ReadLine();         monthnumber = Convert.ToInt32(entryString);         while ((monthnumber < 1) || (monthnumber > 12))         {             Write("Invalid");             Write("Enter number of month being scheduled 1-12 >> ");             monthnumber = Convert.ToInt32(ReadLine());         }         Write("Enter number of interior murals scheduled 0-30 >> ");         entryString = ReadLine();         numInterior = Convert.ToInt32(entryString);         while ((numInterior < 0) || (numInterior > 30))         {             WriteLine("Invalid");             WriteLine("Enter number of interior murals scheduled 0-30 >>");             numInterior = Convert.ToInt32(ReadLine());         }         Write("Enter number of exterior murals scheduled 0-30 >> ");         entryString = ReadLine();         numExterior = Convert.ToInt32(entryString);         while ((numExterior < 0) || (numExterior > 30))         {             WriteLine("Invalid");             WriteLine("Enter number of exterior murals scheduled 0-30 >>");             numExterior = Convert.ToInt32(ReadLine());         }         switch (monthnumber)         {             case 1:             case 2:             case 12:                 numExterior = 0;                 break;             case 4:             case 5:             case 9:             case 10:                 exteriorRate = 699;                 break;             case 7:             case 8:                 interiorRate = 450;                 break;             case 3:             case 6:             case 11:                 break;         }         if (valid)         {             revenueInterior = numInterior * interiorRate;             revenueExterior = numExterior * exteriorRate;             total = revenueInterior + revenueExterior;             isInteriorGreater = numInterior > numExterior;             WriteLine("{0} interior murals are scheduled for a total of {1}",             numInterior, revenueInterior.ToString("C", CultureInfo.GetCultureInfo("en-US"))); isInteriorGreater = numInterior < numExterior;             WriteLine("{0} exterior murals are scheduled for a total of {1}",             numExterior, revenueExterior.ToString("C", CultureInfo.GetCultureInfo("en-US")));             WriteLine("Total revenue expected is {0}", total.ToString("C", CultureInfo.GetCultureInfo("en-US")));             WriteLine("It is {0} that there are more interior murals scheduled than exterior ones.", isInteriorGreater);         }     } }

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter11: Advanced Inheritance Concepts
Section: Chapter Questions
Problem 13PE
icon
Related questions
Question

Microsoft Visual C#7th Edition, Joyce ISBN: 9781337102100

chap 5 case problem 5-2. This is my code but it's not working in Cenage Mindtap. What did I do wrong, please? Thank you

using System;
using static System.Console;
using System.Globalization;
class MarshallsRevenue
{
    static void Main()
    {

        const int INTERIOR_PRICE = 500;
        const int EXTERIOR_PRICE = 750;
        string entryString;
        int numInterior;
        int numExterior;
        int revenueInterior;
        int revenueExterior;
        int total;
        bool isInteriorGreater;
        bool valid;
        valid = true;
        int monthnumber;
        int interiorRate;
        int exteriorRate;
        interiorRate = INTERIOR_PRICE;
        exteriorRate = EXTERIOR_PRICE;

        Write("Enter number of month being scheduled 1-12 >> ");
        entryString = ReadLine();
        monthnumber = Convert.ToInt32(entryString);

        while ((monthnumber < 1) || (monthnumber > 12))
        {
            Write("Invalid");
            Write("Enter number of month being scheduled 1-12 >> ");
            monthnumber = Convert.ToInt32(ReadLine());
        }

        Write("Enter number of interior murals scheduled 0-30 >> ");
        entryString = ReadLine();
        numInterior = Convert.ToInt32(entryString);

        while ((numInterior < 0) || (numInterior > 30))
        {
            WriteLine("Invalid");
            WriteLine("Enter number of interior murals scheduled 0-30 >>");
            numInterior = Convert.ToInt32(ReadLine());
        }

        Write("Enter number of exterior murals scheduled 0-30 >> ");
        entryString = ReadLine();
        numExterior = Convert.ToInt32(entryString);

        while ((numExterior < 0) || (numExterior > 30))
        {
            WriteLine("Invalid");
            WriteLine("Enter number of exterior murals scheduled 0-30 >>");
            numExterior = Convert.ToInt32(ReadLine());
        }

        switch (monthnumber)

        {
            case 1:

            case 2:

            case 12:
                numExterior = 0;
                break;

            case 4:

            case 5:

            case 9:

            case 10:
                exteriorRate = 699;
                break;

            case 7:

            case 8:
                interiorRate = 450;
                break;

            case 3:

            case 6:

            case 11:
                break;

        }

        if (valid)

        {
            revenueInterior = numInterior * interiorRate;
            revenueExterior = numExterior * exteriorRate;
            total = revenueInterior + revenueExterior;

            isInteriorGreater = numInterior > numExterior;
            WriteLine("{0} interior murals are scheduled for a total of {1}",
            numInterior, revenueInterior.ToString("C", CultureInfo.GetCultureInfo("en-US")));
isInteriorGreater = numInterior < numExterior;
            WriteLine("{0} exterior murals are scheduled for a total of {1}",
            numExterior, revenueExterior.ToString("C", CultureInfo.GetCultureInfo("en-US")));

            WriteLine("Total revenue expected is {0}", total.ToString("C", CultureInfo.GetCultureInfo("en-US")));

            WriteLine("It is {0} that there are more interior murals scheduled than exterior ones.", isInteriorGreater);



        }

    }
}
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Data members
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:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
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