USING VISUAL STUDIO 2017, LANGUAGE VISUAL C# I have struggled on this program for quite some...

60.1K

Verified Solution

Question

Programming

USING VISUAL STUDIO 2017, LANGUAGE VISUAL C#

I have struggled on this program for quite some time and stillcan't quite figure it out.

I'm creating an app that has 2 textboxes, 1 for inputtingcustomer name, and the second for entering the number of ticketsthe customer wants to purchase. There are 3 listboxes, the firstwith the days of the week, the second with 4 different theaters,and the third listbox is to display the customer name, number oftickets, and total price. The ticketbase = 50, weekend upcharge =30, for Imax & Upac theaters = 35 and for Capital and Premiertheaters = 25. There are 4 buttons: Process customer, Display dailyreport, clear all, and exit. For the process customer button, it isclicked after customer has inputted their info in textbox1 and 2and selected from listbox 1 and 2. it is supposed to compute thecost of tickets and enter that data into an array, not more than 5customers can be processed without clearing all with the clear allbutton. Once process customer button is pressed it displays amessage box displaying \"customer processed\", and all selectedinputs should be cleared after pressing OK. In the display dailyreport button it is supposed to take array elements using a loop,one at a time and add them to the listbox3. There are supposed tobe 2-3 arrays for the input one for name of customer, another fornumber of tickets, and another for the cost. And for the output itis supposed to be stored in internal arrays. I am not sure of howto set this up.

Answer & Explanation Solved by verified expert
3.9 Ratings (494 Votes)
Short Summary Implemented a windows application using C Provided designercs file for your reference Source Code Form1cs File using System using SystemCollectionsGeneric using SystemComponentModel using SystemData using SystemDrawing using SystemLinq using SystemText using SystemThreadingTasks using SystemWindowsForms namespace BookingApp public partial class Form1 Form Arrays to hold the input values string name int numTickets string days string theaters int costs const int MAXCUSTOMERS 5 int currentCapacity Ticket costs const int TICKETBASE 50 const int WEEKENDUPCHARGE 30 const int IMAXCOST 35 const int UPACCOST 35 const int CAPTIALCOST 25 const int PREMIERCOST 25 public Form1 InitializeComponent private void Form1Loadobject sender EventArgs e Initialize the array name new stringMAXCUSTOMERS numTickets new intMAXCUSTOMERS days new stringMAXCUSTOMERS theaters new stringMAXCUSTOMERS costs new intMAXCUSTOMERS currentCapacity 0 Calculates total costs for the given input private int GetCostint numTicket string day string theater int totalcost TICKETBASE weekend upcharge ifday Saturday day Sunday totalcost WEEKENDUPCHARGE Add theater cost iftheater Imax totalcost IMAXCOST else iftheater Upac totalcost UPACCOST else if theater Capital totalcost CAPTIALCOST else if theater Premier totalcost PREMIERCOST return the    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students