Question

In Assignment 1, you created a program for Marshall’s Murals that prompts a user for the...

In Assignment 1, you created a program for Marshall’s Murals that prompts a user for the number of interior and exterior murals scheduled to be painted during the next month. The program computes the expected revenue for each type of mural when interior murals cost $500 each and exterior murals cost $750 each. In this assignment, you are going to design a GUI version using Visual Studio Form. The programs prompt a user for the number of interior and exterior murals scheduled to be painted during the next month by Marshall’s Murals. Next, the programs compute the expected revenue for each type of mural based on the interior murals and exterior murals costs. The applications also display the total expected revenue and a statement that indicates whether more interior murals are scheduled than exterior ones. The program will prompt a user to enter the desired month besides the number of interior and exterior murals scheduled. The costs for the interior murals and exterior murals are based on the month being scheduled and to modify the pricing as follows: • Because of uncertain weather conditions, exterior murals cannot be painted in December through February, so change the number of exterior murals to 0 for those months. • Marshall prefers to paint exterior murals in April, May, September, and October. To encourage business, it charges only $699 for an exterior mural during those months. Murals in other months continue to cost $750. • Marshall prefers to paint interior murals in July and August, so he charges only $450 for an interior mural during those months. Murals in other months continue to cost $500. The application should display, by mural type, the number of murals ordered, the cost for each type, and a subtotal. The application also displays the total expected revenue and a statement that indicates whether more interior murals are scheduled than exterior ones. Now create an interactive GUI program named MarshallsRevenueGUI that performs all the same tasks. Shows your name om the program and add any comments needed. Create a project for the program(s). Zip the whole project into a single zip-file (e.g., MarshallsRevenueGUI.zip), and then submit your program(s) on Canvas from assignment Program 2. Make sure the program is executable and can be run using a Form. Below are examples for the interface for a user to enter data, and the results after clicking on the “Calculate Data” button

Homework Answers

Answer #1

Below is the code and sample output of your problem:

using System;

using static System.Console;

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;

    // Declare the

    // required variables.

    bool is_valid_month = true;

    int month;

    int month_inter_price = INTERIOR_PRICE;

    int month_exter_price = EXTERIOR_PRICE;

    

    // Prompt te user

    // to enter the month.

    Write("Enter number of month being scheduled >> ");

    // Read the input.

    entryString = ReadLine();

    // Convert the input to an integer.

    month = Convert.ToInt32(entryString);

   

    Write("Enter number of interior murals scheduled >> ");

    entryString = ReadLine();

    numInterior = Convert.ToInt32(entryString);

    Write("Enter number of exterior murals scheduled >> ");

    entryString = ReadLine();

    numExterior = Convert.ToInt32(entryString);
// Use a switch case to perform the

    // action as per the entered month.

    switch(month)

    {

      // Set the exterior murals

      // to zero for the month

      // December through February.

      case 1:

      case 2:

      case 12:

      numExterior = 0;

      break;

      // If the month is either

      // one of April, May, September

      // or October, reduce the price

      // of exterior murals.

      case 4:

      case 5:

      case 9:

      case 10:

      month_exter_price = 699;

      break;

      // If the month is either

      // July or August

      // or October, reduce the price

      // of interior murals.

      case 7:

      case 8:

month_inter_price = 450;

      break;

      // Do nothing for the

      // month of March, June,

      // and November.

      case 3:

      case 6:

      case 11:

      break;

      // If the entered month is

      // invalid, display an error

      // message and set the

      // is_valid_month to false.

      default:

      WriteLine("The entered month is invalid.");

      is_valid_month = false;

      break;

    }

    // If the entered month is

    // valid, perform the

    // calculations and display the results.

    if(is_valid_month)

    {

      revenueInterior = numInterior * month_inter_price;

      revenueExterior = numExterior * month_exter_price;

      total = revenueInterior + revenueExterior;

      isInteriorGreater = numInterior > numExterior;

      WriteLine("{0} interior murals are scheduled at {1} each for a total of {2}",

      numInterior, month_inter_price.ToString("C"), revenueInterior.ToString("C"));

      WriteLine("{0} exterior murals are scheduled at {1} each for a total of {2}",

      numExterior, month_exter_price.ToString("C"), revenueExterior.ToString("C"));

      WriteLine("Total revenue expected is {0}", total.ToString("C"));

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

    }

    

  }

}

Sample Output:

**Fell free to ask any queries in the comment section. I am happy to help. if you like our work, please give Thumbs up**

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
For this assignment, you will be creating a simple “Magic Number” program. When your program starts,...
For this assignment, you will be creating a simple “Magic Number” program. When your program starts, it will present a welcome screen. You will ask the user for their first name and what class they are using the program for (remember that this is a string that has spaces in it), then you will print the following message: NAME, welcome to your Magic Number program. I hope it helps you with your CSCI 1410 class! Note that "NAME" and "CSCI...
ASSIGNMENT On July 2, you started a new company to paint metal products. You hope to...
ASSIGNMENT On July 2, you started a new company to paint metal products. You hope to receive business from local companies that need their metal products painted. The following transactions occurred during the month of July. July 2 Received $25,000 cash from investors. 6 Received $3,600 cash for products painted for a local company. 10 Paid $400 for paint supplies. 14 Painted more metal parts, and billed the customer for $3,200. The money will be received in August. 18 Paid...
In this assignment, you will develop a Python program that will process applications for gala-type events...
In this assignment, you will develop a Python program that will process applications for gala-type events at a local dinner club. The club, Gala Events Inc., is currently booking events for the upcoming holidays. However, the club has the following restrictions: Due to the physical size of the building, its maximum occupancy for any event is 100—not including the club staff. Since local regulations do not permit the sale of alcoholic beverages after midnight, the maximum length of any event...
In this assignment you will write a program that compares the relative strengths of two earthquakes,...
In this assignment you will write a program that compares the relative strengths of two earthquakes, given their magnitudes using the moment magnitude scale. Earthquakes The amount of energy released during an earthquake -- corresponding to the amount of shaking -- is measured using the "moment magnitude scale". We can compare the relative strength of two earthquakes given the magnitudes m1 and m2 using this formula: f=10^1.5(m1−m2) If m1>m2, the resulting value f tells us how many times stronger m1...
You will write a program that loops until the user selects 0 to exit. In the...
You will write a program that loops until the user selects 0 to exit. In the loop the user interactively selects a menu choice to compress or decompress a file. There are three menu options: Option 0: allows the user to exit the program. Option 1: allows the user to compress the specified input file and store the result in an output file. Option 2: allows the user to decompress the specified input file and store the result in an...
In Chapter 9, you created a Contestant class for the Greenville Idol competition. The class includes...
In Chapter 9, you created a Contestant class for the Greenville Idol competition. The class includes a contestant’s name, talent code, and talent description. The competition has become so popular that separate contests with differing entry fees have been established for children, teenagers, and adults. Modify the Contestant class to contain a field that holds the entry fee for each category, and add get and set accessors. Extend the Contestant class to create three subclasses: ChildContestant, TeenContestant, and AdultContestant. Child...
Part A. Input Validation (Name your C program yourLastName_yourFirstName_Lab4a.c) 1. Place the code you developed in...
Part A. Input Validation (Name your C program yourLastName_yourFirstName_Lab4a.c) 1. Place the code you developed in Lab 2 to obtain a diameter value from the user and compute the volume of a sphere (we assumed that to be the shape of a balloon) in a new program, and implement the following restriction on the user’s input: the user should enter a value for the diameter which is at least 8 inches but not larger than 60 inches. Using an if-else...
Financial information for the project: 1. You decide to open a small business in Charleston, WV...
Financial information for the project: 1. You decide to open a small business in Charleston, WV that will cater primarily to busy office workers downtown. You are going to offer a gourmet box lunch to be delivered to any office with a minimum number of 5 orders. This lunch will include a gourmet sandwich, a bag of chips, a cookie, and a bottle of water. Because you are using only the finest ingredients, you will charge $9.15per lunch. 2. The...
*PLEASE FINISH #2, any line with a "-----' needs to be completeled* Reynolds Printing Company specializes...
*PLEASE FINISH #2, any line with a "-----' needs to be completeled* Reynolds Printing Company specializes in wedding announcements. Reynolds uses an actual job-order costing system. An actual overhead rate is calculated at the end of each month using actual direct labor hours and overhead for the month. Once the actual cost of a job is determined, the customer is billed at actual cost plus 50%. During April, Mrs. Lucky, a good friend of owner Jane Reynolds, ordered three sets...
You are a Consultant for the professional service firm, BUSI 2083 LLP. Your firm specializes in...
You are a Consultant for the professional service firm, BUSI 2083 LLP. Your firm specializes in providing a wide variety of internal business solutions for different clients. One of the partners in your practice is impressed with the work you have completed to date and would like to give you additional responsibility. She has asked you to take the lead on this engagement with the hope that a successful outcome may lead to your promotion to Senior Consultant. You take...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT