Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

\" In Chapter 2, you created a program for the Greenville Idol competition that

ID: 3562907 • Letter: #

Question

" In Chapter 2, you created a program for the Greenville Idol competition that promts users for the number of contrestants entered in last years competition and in this years competition. The program displays the revenue expected for this year's competition  if each contestant pays a $25 entrance fee. The application also displays a statement that indicates whether this year's  competition has more contestats than last year's. Now create an interactive GUI programs named GreenvilleRevenueGUI that performs all the same tasks"

Code from last chapter:

using System.IO;

using System;

using System.Collections.Generic;

using System.Ling;

using System.Text;

using System.Threading.Tasks;

namespace GreenvilleRevenue

{

class Program

{

static void Main(string[] args)

{

Console.WriteLine("Enter the number of contestants in last year

Explanation / Answer

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
Int32 lastYearContestants,thisYearContestents;
String message,difference;
double d;
public Form1()
{
InitializeComponent();
}
public static void main( String []args)
{
Form1 f=new Form1();
if( f.lastYearContestants>f.thisYearContestents)
{ f.d=f.lastYearContestants-f.thisYearContestents;
f.message="Previous Year more number of contestants";
f.difference="The difference is "+f.d;}
else
{ f.d=f.thisYearContestents-f.lastYearContestants;
f.message="This Year more number of contestants";
f.difference="The difference is "+f.d;}

}

private void textBox1_TextChanged(object sender, EventArgs e)
{
lastYearContestants=Convert.ToInt32(t1.Text);
}

private void t2_TextChanged(object sender, EventArgs e)
{
thisYearContestents=Convert.ToInt32(t2.Text);
l3.Text="This year Revenue :$"+(thisYearContestents*25);
if(!l3.Visible)
{ l3.Visible=true;}
}

private void l4_TextChanged(object sender, EventArgs e)
{
l4.Text = "Last Year contestants=" + lastYearContestants;
l4.Visible = true;
}

private void l5_TextChanged(object sender, EventArgs e)
{
l5.Text = "This year contestants=" + thisYearContestents;
l5.Visible = true;
}

private void l6_TextChanged(object sender, EventArgs e)
{
l6.Text = message;
l6.Visible = true;
}

private void l7_TextChanged(object sender, EventArgs e)
{
l7.Text = difference;
l7.Visible = true;
}
}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote