Question

In: Computer Science

In Chapter 1, you created two programs to display the motto for the Greenville Idol competition...

In Chapter 1, you created two programs to display the motto for the Greenville Idol competition that is held each summer during the Greenville County Fair.

Now write a program named GreenvilleRevenuethat prompts a user for the number of contestants entered in last year’s competition and in this year’s competition.

  • Display all the input data.
  • Compute and display the revenue expected for this year’s competition if each contestant pays a $25 entrance fee.
  • Also display a statement that indicates whether this year’s competition has more contestants than last year’s.

Solutions

Expert Solution

If you have any doubts, please give me comment...

using System;

using static System.Console;

class GreenvilleRevenue {

    static void Main () {

        int last = Int32.Parse (ReadLine ());

        int curr = Int32.Parse (ReadLine ());

        WriteLine("Last year's competition has {0} contestants, and this year's has {1} contestants", last, curr);

        WriteLine ("The revenue expected for this year's competition " + (curr*25).ToString("$#,###.00"));

        if (curr > last)

            WriteLine ("It is True that this year's competition is bigger than last years's");

        else

            WriteLine ("It is False that this year's competition is bigger than last year's");

    }

}


Related Solutions

Lucy Baker is analyzing demographic characteristics of two television programs, American Idol (population 1) and 60...
Lucy Baker is analyzing demographic characteristics of two television programs, American Idol (population 1) and 60 Minutes (population 2). Previous studies indicate no difference in the ages of the two audiences. (The mean age of each audience is the same.) Her staff randomly selected 100 people from each audience, and reported the following: sample mean for population 1 = 43 years and sample mean for population 2 = 45 years. Assume that σ 1 = 5 and σ 2 =...
Chapter 6 Debugging Exercises - Problem 1 The programmer intends for this pseudocode to display three...
Chapter 6 Debugging Exercises - Problem 1 The programmer intends for this pseudocode to display three random numbers in the range of 1 through 7. According to the way we've been generating random numbers in the book; however, there appears to be an error. Assume that the random() function is a built-in library function. Correct the pseudocode so that the program works as it should (This has 1 error and is easy to spot) //This program displays 3 random numbers...
In Chapter 8, you created a Salesperson class with fields for an ID number and sales...
In Chapter 8, you created a Salesperson class with fields for an ID number and sales values. Now, create an application that allows a user to enter values for an array of seven Salesperson objects. Offer the user the choice of displaying the objects in order by either (I)D number or (S)ales value. ----------------------- Salesperson.java public class Salesperson {    private int id;    private double sales;    Salesperson(int idNum, double amt)    {       id = idNum;       sales = amt;    }    public int getId()...
This is C# programming. In Chapter 2, you created an interactive application named GreenvilleRevenue. The program...
This is C# programming. In Chapter 2, you created an interactive application named GreenvilleRevenue. The program prompts a user for the number of contestants entered in this year’s and last year’s Greenville Idol competition, and then it displays the revenue expected for this year’s competition if each contestant pays a $25 entrance fee. The programs also display a statement that compares the number of contestants each year. Now, replace that statement with one of the following messages: If the competition...
1. You are given a firm under perfect competition. The firm has two plants. It is...
1. You are given a firm under perfect competition. The firm has two plants. It is faced with the problem of allocating a given total output between the two plants that it owns. (a) How should the firm allocate its total output among the two plants. (b) Graphically illustrate the allocation.
c# In Chapter 2, you created an interactive application named MarshallsRevenue. The program prompts a user...
c# In Chapter 2, you created an interactive application named MarshallsRevenue. The program prompts 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 when interior murals cost $500 each and exterior murals cost $750 each. The application also displays the total expected revenue and a statement that indicates whether more interior murals are scheduled than exterior...
In this assignment you are going to use the menu you created in Assignment 1 to...
In this assignment you are going to use the menu you created in Assignment 1 to test both your Double and Integer classes. You should add functionality to the menu to allow you test the add, sub, mul, div functions for instances of both classes You are going to have make a modification to your menu class. Currently it uses an array to hold a fixed amount of menu items. While this may be OK for most applications we want...
TEST YOUR VPNs 1. You have earlier created two VPNs. How do you know your VPNs...
TEST YOUR VPNs 1. You have earlier created two VPNs. How do you know your VPNs are configured correctly? There are several ways you can check whether your VPN is working properly but it is important you use reliable and reputable online tools that give accurate results. Follow the steps below to check VPNs are correctly set up.  Basic IP Address Test a. First, before connecting to your VPN, visit an IP check page, and note the IP address...
1.- In this assignment you will implement a simulation of the interaction of user programs with...
1.- In this assignment you will implement a simulation of the interaction of user programs with the OS to execute an I/O operation on two different devices. User programs: User programs will communicate with DOIO (OS) to request an I/O operation. (This will simulate a system call) User programs will give to DOIO three parameters: User id, device number (dev is a random number in the range 1 and 2 that represents device one or device two) and an address...
Leadership in Accreditation. As a new university Dean, you learn that two of the three programs...
Leadership in Accreditation. As a new university Dean, you learn that two of the three programs in your school did not pass an accrediting review. The school has already implemented three different programs to assist in addressing the issues, but the consultant hired to assist with the remediation process, has told you that these options are still insufficient. What next steps would you recommend be implemented to ensure the programs meet accrediting requirements? Funding is limited, faculty are resistant to...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT