Question

Please write a C# program for an concert sale with the requirements below in Console Form:...

Please write a C# program for an concert sale with the requirements below in Console Form:

1.) Tickets can be sold indivivdual, but tickets can also be sold in blocks --Multiple tickets sold at once, but if not enough tickets only the available tickets will be sold

2.) When tickets are sold, total amount of the sale will return to calling method

3.) Wrtie a method named ReturnTickets, that return the amount that the customer will be refunded

4.)Create a calcualtionProfit Method and TotalSalesmethod ---Make sure that they inculde all functionality

5.) RowTracking Method that can track seat rows for each tickets --Add sales by row and ensure that if multiple tickets are requested, they will only be sold if they can all be in the same row. Use TDD: Have a testing event for all methods

6.) Add a 10% discount on the tickets total IF the customer is a Senior

7.) Create a method that tracks concession sales AND the money made

public void ConcesstionTracking ( double salesTotal) { double concessionTotal += salesTotal; }

8.) Include and allow multiple performers and stages for event with different ticket price

9.) Make sure the number of tickets for one performer is 1500 and must show the deduction when a ticket is bought or addition if ticket is returned

10.) ALSO include a 25% discount if the event is on a weekend

EXTRA INFOR: 20 columns of seats and 75 rows to equal 1500 seats for the concert.  

0 0
Add a comment Improve this question Transcribed image text
Answer #1

//code write in c#

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;
using System.Collections.ObjectModel;
namespace WindowsFormsApplication2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
//your 1 ticket amount is rs100
int amount = 0;
int totalticket = 1500;
int soldticket = 0;
int remaningticket = 1500;
int soldamount = 0;
int senior = 1;
//Collection<int> myColl = new Collection<int>();
List<int> ob = new List<int>();

private void button2_Click(object sender, EventArgs e)
{
// buy ticket
if (checkBox1.Checked)
{
ob.Add(int.Parse(textBox2.Text));
amount += 100 - 10;
senior++;
soldticket++;
remaningticket--;
  

MessageBox.Show("Set Has been Booked", "Show Ticket");
textBox2.Clear();
}
else
{
ob.Add(int.Parse(textBox2.Text));
amount += 100;
soldticket++;
remaningticket--;
MessageBox.Show("Set Has been Booked", "Show Ticket");
textBox2.Clear();
}

}

private void Form1_Load(object sender, EventArgs e)
{

}

private void SoldTicketAmout_Click(object sender, EventArgs e)
{
soldamount = (100 * soldticket )-(10*senior);
MessageBox.Show("Ticek Sold:" + soldticket, "Total Sold Ticket Amount");
}

private void search_Click(object sender, EventArgs e)
{
if (ob.Contains(int.Parse(textBox1.Text)))
{
MessageBox.Show("Ticekt Already Book");
}
else
{
label2.Text = "Tieket is avaible";
}
}

private void refundticekt_Click(object sender, EventArgs e)
{
if (checkBox2.Checked == true)
{
int famount = 90;
amount = amount - famount;
soldticket--;
remaningticket++;
//ob.Remove(int.Parse(RtickrtNo.Text));
ob.RemoveAt(int.Parse(RtickrtNo.Text));
MessageBox.Show("Amount :" + famount, "Refound Senior");
}
else
{
amount = amount - 100;
soldticket--;
remaningticket++;
ob.Remove(int.Parse(RtickrtNo.Text));
MessageBox.Show("Amount : 100", "Refound person");
}
}

private void button4_Click(object sender, EventArgs e)
{
//remeaning ticket
MessageBox.Show(""+remaningticket, "Remeaning Tieckt");
}

  

private void profit_Click(object sender, EventArgs e)
{
MessageBox.Show("" + amount, "TOtal Amount Profit");
}

private void button1_Click(object sender, EventArgs e)
{
//clear list box because to add one more object before you add ticket to clear
  
}

private void button3_Click(object sender, EventArgs e)
{
//show all ticekt no in list box to sold
// listBox1.Show();
  
}
}
}

Add a comment
Know the answer?
Add Answer to:
Please write a C# program for an concert sale with the requirements below in Console Form:...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Can you help us!! Thank you! C++ Write a program that can be used by a...

    Can you help us!! Thank you! C++ Write a program that can be used by a small theater to sell tickets for performances. The program should display a screen that shows which seats are available and which are taken. Here is a list of tasks this program must perform • The theater's auditorium has 15 rows, with 30 seats in each row. A two dimensional array can be used to represent the seats. The seats array can be initialized with...

  • In Java The world-renowned sloth cellist Lento Con Brio is planning to make a much-anticipated return...

    In Java The world-renowned sloth cellist Lento Con Brio is planning to make a much-anticipated return to the concert stage after this whole coronavirus situation is over! The sloth strongly dislikes Ticketmaster and its exorbitant fees, so you've been hired to write some custom ticketing software for the upcoming concert. The concert hall is a rectangular grid of seats. You want to divide the seats into three sections (premium, standard, and economy) based on distance from the stage. Each section...

  • Your assignment is to design a TicketManager class that can keep track of the number of...

    Your assignment is to design a TicketManager class that can keep track of the number of seats available in a theater’s auditorium. The TicketManager class should have a two-Dimensional array, which has 15 rows and 30 columns for all the seats available in the auditorium, also an array of double to keep track of the price of tickets for each row. Each row has a different price. Use the following UML diagram to design the class: -------------------------------------------------------------------- + NUMROWS :...

  • In this assignment, we will be making a program that reads in customers' information, and create...

    In this assignment, we will be making a program that reads in customers' information, and create a movie theatre seating with a number of rows and columns specified by a user. Then it will attempt to assign each customer to a seat in a movie theatre. 1. First, you need to add one additional constructor method into Customer.java file. Method Description of the Method public Customer (String customerInfo) Constructs a Customer object using the string containing customer's info. Use the...

  • Project: Using Java API Classes Page 3 of 5 SpaceTicket.java Requirements: The purpose of this program is accept coded...

    Project: Using Java API Classes Page 3 of 5 SpaceTicket.java Requirements: The purpose of this program is accept coded space ticket information as input that includes the ticket price, category, time, date, and seat, followed by the description of the travel. Note that the eight digits for price have an implied decimal point. The program should then print the ticket information including the actual cost, which is the price with discount applied as appropriate: 25% for a student ticket (s),...

  • In Java Burdell and the Buzz Problem Description As an aspiring band manager, you need to...

    In Java Burdell and the Buzz Problem Description As an aspiring band manager, you need to promote your band and expand publicity. Being hip with the times, you know that social media can make or break a band’s popularity. So, you decide to bring some ‘lucky’ Georgia Tech students to spread the good word! Solution Description Write the Concert, Musician, and Fan classes to guide your band on their rock star journey. You will design these classes from scratch following...

  • Please write below code in C++ using Visual Studio. Write program that uses a class template...

    Please write below code in C++ using Visual Studio. Write program that uses a class template to create a set of items. The program should: 1. add items to the set (there shouldn't be any duplicates) • Example: if your codes is adding three integers, 10, 5, 10, then your program will add only two values 10 and 5 • Hint: Use vectors and vector functions to store the set of items 2. Get the number of items in the...

  • Write a C++ program for the instructions below. Please read the instructions carefully and make sure they are followed correctly.   and please put comment with code! Problem:2 1. Class Student Create...

    Write a C++ program for the instructions below. Please read the instructions carefully and make sure they are followed correctly.   and please put comment with code! Problem:2 1. Class Student Create a "Hello C++! I love CS52" Program 10 points Create a program that simply outputs the text Hello C++!I love CS52" when you run it. This can be done by using cout object in the main function. 2. Create a Class and an Object In the same file as...

  • Please Write the following program in c# You are to write an application which will create...

    Please Write the following program in c# You are to write an application which will create a company, add agents (their name, ID, and weekly sales) to that company, and printout the details of all agents in the company. The application will contain three classes: Agent.cs, Company.cs, and CompanyTest.cs (this class is already provided). Flow of the application: The CompanyTest class creates an object of the Company class and reserves space for five agents. At this point if you call...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT