Question: please I need help understanding the below TicketsRUs needs an application to calculate ticket prices. There are three ticket prices: Orchestra$85 each Mezzanine$70 each Balcony$45

please I need help understanding the below

TicketsRUs needs an application to calculate ticket prices. There are three ticket prices:

Orchestra$85 each

Mezzanine$70 each

Balcony$45 each

There is also a 15% discount on matinee performances.

Your application has the GUI shown below.

Clicking the CalcPrice button should determine the price per ticket and the total price based on the user's input and display in txtEach and txtTotal. You should make sure the number of tickets is entered and a ticket type is selected, otherwise give an error message.

The action listener for btnCalc is set up as follows.

btnCalc.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

calcPrice();//write the code for this method

}

});

Write the calcPrice method that is called by the action listener. This class method has access to all of the GUI components. You DO NOT HAVE TO CODE THE GUI. ONLY write the code for this method which does all the work. The header for the method is:

private void calcPrice()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!