Microsoft C# 2019, 7th edition Here's my code help. 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; Console.Write("Enter number of month being scheduled 1-12 >> "); entryString = Console.ReadLine(); monthnumber = Convert.ToInt32(entryString); while ((monthnumber < 1) || (monthnumber > 12)) { Console.WriteLine("Invalid"); Console.Write("Enter number of month being scheduled 1-12 >> "); monthnumber = Convert.ToInt32(Console.ReadLine()); } Console.Write("Enter number of interior murals scheduled 0-30 >> "); entryString = Console.ReadLine(); numInterior = Convert.ToInt32(entryString); while ((numInterior < 0) || (numInterior > 30)) { Console.WriteLine("Invalid"); Console.WriteLine("Enter number of interior murals scheduled 0-30 >>"); numInterior = Convert.ToInt32(Console.ReadLine()); } Console.Write("Enter number of exterior murals scheduled 0-30 >> "); entryString = Console.ReadLine(); numExterior = Convert.ToInt32(entryString); while ((numExterior < 0) || (numExterior > 30)) { Console.WriteLine("Invalid"); Console.WriteLine("Enter number of exterior murals scheduled 0-30 >>"); numExterior = Convert.ToInt32(Console.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; Console.WriteLine("{0} interior murals are scheduled for a total of {1}", numInterior, revenueInterior.ToString("C", CultureInfo.GetCultureInfo("en-US"))); isInteriorGreater = numInterior < numExterior; Console.WriteLine("{0} exterior murals are scheduled for a total of {1}", numExterior, revenueExterior.ToString("C", CultureInfo.GetCultureInfo("en-US"))); Console.WriteLine("Total revenue expected is {0}", total.ToString("C", CultureInfo.GetCultureInfo("en-US"))); Console.WriteLine("It is {0} that there are more interior murals scheduled than exterior ones.", isInteriorGreater); } Console.ReadKey();// pause program output on console window until user enter anykey /*chapter 6*/ int x =0; int y=0; bool flag=false; string[,] interiorMuralCustomers=new string[2,numInterior]; string[,] exteriorMuralCustomers=new string[2, numExterior]; for (int x=0; x
Microsoft C# 2019, 7th edition Here's my code help. 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; Console.Write("Enter number of month being scheduled 1-12 >> "); entryString = Console.ReadLine(); monthnumber = Convert.ToInt32(entryString); while ((monthnumber < 1) || (monthnumber > 12)) { Console.WriteLine("Invalid"); Console.Write("Enter number of month being scheduled 1-12 >> "); monthnumber = Convert.ToInt32(Console.ReadLine()); } Console.Write("Enter number of interior murals scheduled 0-30 >> "); entryString = Console.ReadLine(); numInterior = Convert.ToInt32(entryString); while ((numInterior < 0) || (numInterior > 30)) { Console.WriteLine("Invalid"); Console.WriteLine("Enter number of interior murals scheduled 0-30 >>"); numInterior = Convert.ToInt32(Console.ReadLine()); } Console.Write("Enter number of exterior murals scheduled 0-30 >> "); entryString = Console.ReadLine(); numExterior = Convert.ToInt32(entryString); while ((numExterior < 0) || (numExterior > 30)) { Console.WriteLine("Invalid"); Console.WriteLine("Enter number of exterior murals scheduled 0-30 >>"); numExterior = Convert.ToInt32(Console.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; Console.WriteLine("{0} interior murals are scheduled for a total of {1}", numInterior, revenueInterior.ToString("C", CultureInfo.GetCultureInfo("en-US"))); isInteriorGreater = numInterior < numExterior; Console.WriteLine("{0} exterior murals are scheduled for a total of {1}", numExterior, revenueExterior.ToString("C", CultureInfo.GetCultureInfo("en-US"))); Console.WriteLine("Total revenue expected is {0}", total.ToString("C", CultureInfo.GetCultureInfo("en-US"))); Console.WriteLine("It is {0} that there are more interior murals scheduled than exterior ones.", isInteriorGreater); } Console.ReadKey();// pause program output on console window until user enter anykey /*chapter 6*/ int x =0; int y=0; bool flag=false; string[,] interiorMuralCustomers=new string[2,numInterior]; string[,] exteriorMuralCustomers=new string[2, numExterior]; for (int x=0; x
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
Related questions
Concept explainers
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
Question
Microsoft C# 2019, 7th edition
Here's my code help.
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;
Console.Write("Enter number of month being scheduled 1-12 >> ");
entryString = Console.ReadLine();
monthnumber = Convert.ToInt32(entryString);
while ((monthnumber < 1) || (monthnumber > 12))
{
Console.WriteLine("Invalid");
Console.Write("Enter number of month being scheduled 1-12 >> ");
monthnumber = Convert.ToInt32(Console.ReadLine());
}
Console.Write("Enter number of interior murals scheduled 0-30 >> ");
entryString = Console.ReadLine();
numInterior = Convert.ToInt32(entryString);
while ((numInterior < 0) || (numInterior > 30))
{
Console.WriteLine("Invalid");
Console.WriteLine("Enter number of interior murals scheduled 0-30 >>");
numInterior = Convert.ToInt32(Console.ReadLine());
}
Console.Write("Enter number of exterior murals scheduled 0-30 >> ");
entryString = Console.ReadLine();
numExterior = Convert.ToInt32(entryString);
while ((numExterior < 0) || (numExterior > 30))
{
Console.WriteLine("Invalid");
Console.WriteLine("Enter number of exterior murals scheduled 0-30 >>");
numExterior = Convert.ToInt32(Console.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;
Console.WriteLine("{0} interior murals are scheduled for a total of {1}",
numInterior, revenueInterior.ToString("C", CultureInfo.GetCultureInfo("en-US")));
isInteriorGreater = numInterior < numExterior;
Console.WriteLine("{0} exterior murals are scheduled for a total of {1}",
numExterior, revenueExterior.ToString("C", CultureInfo.GetCultureInfo("en-US")));
Console.WriteLine("Total revenue expected is {0}", total.ToString("C", CultureInfo.GetCultureInfo("en-US")));
Console.WriteLine("It is {0} that there are more interior murals scheduled than exterior ones.", isInteriorGreater);
}
Console.ReadKey();// pause program output on console window until user enter anykey
/*chapter 6*/
int x =0;
int y=0;
bool flag=false;
string[,] interiorMuralCustomers=new string[2,numInterior];
string[,] exteriorMuralCustomers=new string[2, numExterior];
for (int x=0; x<numInterior; ++x)
WriteLine("Enter name of customer {0} for interior mural:",(x+1));
string name=ReadLine();
interiorMuralCustomers[0,x]=name;
do
{WriteLine("Enter Mural code. Valid codes are L, S, A, C, and O,");
srting code= ReadLine();
if(code=="L" && code=="S" && code=="A" && code=="C" && code=="O")
{interiorMuralCustomers[1,x]=code;
flag=false;
}
else
{WriteLine("Invalid code. Valid codes are L, S, A, C, and O,");}
flag=true;
}
while(flag);
for(int x=0; x < numExterior; ++x)
{WriteLine("Enter name of customer {0} for exterior mural:",(x+1));
string nameExterior=ReadLine();
exteriorMuralCustomers[0,x]=name;
do
{WriteLine("Enter Mural code. Valid codes are L, S, A, C, and O,");
srting code= ReadLine();
if(code=="L" && code=="S" && code=="A" && code=="C" && code=="O")
{exteriorMuralCustomers[1,x]=code;
flag=false;
}
else
{WriteLine("Invalid code. Valid codes are L, S, A, C, and O,");
flag=true;
}
}
while (flag);
int Lcount=0;
int Scount=0;
int Acount=0;
int Ccount=0;
int Ocount=0;
for (int y=0; y < numInterior; ++x)
{
if (interiorMuralCustomers[1,y] =="L")
++Lcount;
else
if(interiorMuralCustomers[1,y] =="S")
++Scount;
else
if (interiorMuralCustomers[1,y] =="A")
++Acount;
else
if (interiorMuralCustomers[1,y] =="C")
++Ccount;
else
++Ocount;
}
WriteLine("The interior murals scheduled are:");
WriteLine("Landscape {0}", Lcount);
WriteLine("Landscape {0}", Scount);
WriteLine("Landscape {0}", Acount);
WriteLine("Landscape {0}", Ccount);
WriteLine("Landscape {0}", Ocount);
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 9 images
Knowledge Booster
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.Recommended textbooks for you
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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education