Question: using System; using System.Numerics; using System.Globalization; using static System.Console; /* Author: Somxai Sirisack * Date Modified: 09/24/2023 * Description: modification of MarshallRevenueDecision that the user
using System; using System.Numerics; using System.Globalization; using static System.Console; /* Author: Somxai Sirisack * Date Modified: 09/24/2023 * Description: modification of MarshallRevenueDecision that the user must enter a month value from 1 through 12. I * f 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. * */ //assign each number to month inside a enumeration enum MONTHS { January = 1, February = 2, March = 3, April = 4, May = 5, June = 6, July = 7, August = 8, September = 9, October = 10, November = 11, December = 12 } class MarshallsRevenue { static void Main() { //create a constant variable for the cost of Interior and Exterior const int DiscountInteriorCost = 450; const int InteriorCost = 500; const int DiscountExteriorCost = 699; const int ExteriorCost = 750; //declare variable int InteriorNum, ExteriorNum; int TotalInterior, TotalExterior, Revenue; int monthNum; Write("Please type in the number of Interior murals scheduled to be " + "painted: "); InteriorNum = Convert.ToInt32(ReadLine()); //convert user input to int WriteLine(); while (InteriorNum 30) //while-loop to check if the user input the number between 0-30 { Write("Invalid value, please enter a number between 0-30: "); InteriorNum = Convert.ToInt32(ReadLine()); WriteLine(); } Write("Please type in the number of Exterior murals scheduled to be " + "painted: "); ExteriorNum = Convert.ToInt32(ReadLine()); //convert user input to int WriteLine(); while (ExteriorNum 30) //while-loop to check if the user input the number between 0-30 { Write("Invalid value, please enter a number between 0-30: "); ExteriorNum = Convert.ToInt32(ReadLine()); WriteLine(); } Write("Enter a numeric value for the month being scheduled: "); //read user input for month monthNum = Convert.ToInt32(ReadLine()); WriteLine(); while (monthNum 12) //while-loop to check if user input the right numeric for months { Write("Invalid numeric month, please input valid numeric month: "); monthNum = Convert.ToInt32(ReadLine()); WriteLine(); } MONTHS MonthCalled = (MONTHS)monthNum; //calling month inside the enum TotalExterior = 0; TotalInterior = 0; /* * if-else statement for exterior mural */ if ((int)MonthCalled == 12 || (int)MonthCalled == 1 || (int)MonthCalled == 2) { WriteLine("Because of uncertain weather conditions, exterior murals cannot be painted in December through February. \n"); } if ((int)MonthCalled == 4 || (int)MonthCalled == 5 || (int)MonthCalled == 9 || (int)MonthCalled == 10) { TotalExterior += ExteriorNum * DiscountExteriorCost; } else if ((int)MonthCalled == 3 || (int)MonthCalled == 6 || (int)MonthCalled == 7 || (int)MonthCalled == 8 || (int)MonthCalled == 11) { TotalExterior += ExteriorNum * ExteriorCost; } /* *if-else statement for interior mural */ if ((int)MonthCalled == 7 || (int)MonthCalled == 8) { TotalInterior += InteriorNum * DiscountInteriorCost; } else if ((int)MonthCalled !PLEASE MODIFY IT AS SIMPLE AS YOU CAN SO I CAN EASILY UNDERSTAND IT. I ASKED THIS QUESTION ONCE BUT THE CODING KINDA LOOK TOO ADVANCE AND I'M NOT AT THAT LEVEL YET. THANK YOU SO MUVH
Modify the version of the MarshallsRevenue program created in Chapter 5 (Loops) so that after mural data entry is complete, the user is prompted for the appropriate number of customer names for both the interior and exterior murals and a code for each that indicates the mural style: L for landscape, S for seascape, A for abstract, C for children's, or O for other. When a code is invalid, prompt the user for a valid code continuously. After data entry is complete, display a count of each type of mural. Then, continuously prompt the user for a mural style code until the user enters a sentinel value. With each code entry, display a list of all the customers with that code and whether their mural is interior or exterior. If the requested code is invalid, display an appropriate message and prompt the user. Modify the program so that the major functions appear in the following individual methods: GetMonth - This method prompts for and returns the month -- GetNumMurals - This method prompts for and returns the number of murals scheduled and is called twice once for interior murals and once for exterior murals ComputeRevenue - This method accepts the number of interior and exterior murals scheduled, accepts the month they are scheduled, displays the interior and exterior prices, and then returns the total expected revenue DataEntry - This method fills an array with customer names and mural codes and is called twice -- once to fill the array of interior murals and once to fill the array of exterior murals GetSelectedMurals - This method continuously prompts for mural codes and displays jobs of the corresponding type until a sentinel value is entered.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
