write a program named MarshallsRevenue that prompts a user for the number of interior and exterior murals scheduled to be painted during the next month. Compute the expected revenue for each type of mural. Interior murals cost $500 each, and exterior murals cost $750 each. Also, display the total expected revenue and a statement that indicates whether more interior murals are scheduled than exterior ones.

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

In Chapter 1, you created two programs to display the motto for Marshall’s Murals. Now write a program named MarshallsRevenue that prompts a user for the number of interior and exterior murals scheduled to be painted during the next month. Compute the expected revenue for each type of mural. Interior murals cost $500 each, and exterior murals cost $750 each. Also, display the total expected revenue and a statement that indicates whether more interior murals are scheduled than exterior ones.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

this is error message I get 

## Educational Webpage: Understanding a Simple C# Program for Calculating Mural Revenues

### Overview

This C# program calculates expected revenues from interior and exterior murals. It also compares the revenues to determine which type yields more financial return.

### Code Explanation

#### Libraries and Namespace
```csharp
using System;
using static System.Console;
using System.Globalization;
```
These lines import essential libraries and namespaces for input, output, and globalization features.

#### Define Class and Main Method
```csharp
class MarshallsRevenue
{
    static void Main(string[] args)
    {
```
The class `MarshallsRevenue` contains the `Main` method where program execution begins.

#### Variables Declaration
```csharp
int int_num, ext_num, r;
double int_rev, ext_rev, tot_rev = 0;
```
This declares integer variables for the number of interior and exterior murals and double variables for their respective revenues and total revenue.

#### Input Handling
```csharp
Console.WriteLine("Enter a Number of interior murals : ");
int_num = int.Parse(Console.ReadLine());

Console.WriteLine("Enter a Number of exterior murals : ");
ext_num = int.Parse(Console.ReadLine());
```
This section prompts the user to input the number of interior and exterior murals and parses the input into integers.

#### Revenue Calculation
```csharp
int_rev = int_num * 500;
ext_rev = ext_num * 750;
tot_rev = int_rev + ext_rev;
```
Here, the program calculates revenues: $500 per interior mural and $750 per exterior mural. It then calculates the total expected revenue.

#### Output Generated Revenue
```csharp
Console.WriteLine(int_num + " interior murals are scheduled for a total of " + int_rev);
Console.WriteLine(ext_num + " exterior murals are scheduled for a total of " + ext_rev);
Console.WriteLine("Total revenue expected: " + tot_rev);
```
This outputs the calculated revenues for each type of mural and the total revenue.

#### Revenue Comparison
```csharp
if (int_rev > ext_rev)
{
    Console.WriteLine("The cost of interior murals is more than exterior murals");
}
else if (ext_rev > int_rev)
{
    Console.WriteLine("The cost of exterior murals is more than interior murals");
}
```
This logic compares interior and exterior mural revenues and outputs which type is more lucrative.

#### Code Details
- **Warning**: There
Transcribed Image Text:## Educational Webpage: Understanding a Simple C# Program for Calculating Mural Revenues ### Overview This C# program calculates expected revenues from interior and exterior murals. It also compares the revenues to determine which type yields more financial return. ### Code Explanation #### Libraries and Namespace ```csharp using System; using static System.Console; using System.Globalization; ``` These lines import essential libraries and namespaces for input, output, and globalization features. #### Define Class and Main Method ```csharp class MarshallsRevenue { static void Main(string[] args) { ``` The class `MarshallsRevenue` contains the `Main` method where program execution begins. #### Variables Declaration ```csharp int int_num, ext_num, r; double int_rev, ext_rev, tot_rev = 0; ``` This declares integer variables for the number of interior and exterior murals and double variables for their respective revenues and total revenue. #### Input Handling ```csharp Console.WriteLine("Enter a Number of interior murals : "); int_num = int.Parse(Console.ReadLine()); Console.WriteLine("Enter a Number of exterior murals : "); ext_num = int.Parse(Console.ReadLine()); ``` This section prompts the user to input the number of interior and exterior murals and parses the input into integers. #### Revenue Calculation ```csharp int_rev = int_num * 500; ext_rev = ext_num * 750; tot_rev = int_rev + ext_rev; ``` Here, the program calculates revenues: $500 per interior mural and $750 per exterior mural. It then calculates the total expected revenue. #### Output Generated Revenue ```csharp Console.WriteLine(int_num + " interior murals are scheduled for a total of " + int_rev); Console.WriteLine(ext_num + " exterior murals are scheduled for a total of " + ext_rev); Console.WriteLine("Total revenue expected: " + tot_rev); ``` This outputs the calculated revenues for each type of mural and the total revenue. #### Revenue Comparison ```csharp if (int_rev > ext_rev) { Console.WriteLine("The cost of interior murals is more than exterior murals"); } else if (ext_rev > int_rev) { Console.WriteLine("The cost of exterior murals is more than interior murals"); } ``` This logic compares interior and exterior mural revenues and outputs which type is more lucrative. #### Code Details - **Warning**: There
Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Introduction to Coding
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