Placeholder

TicketsRUs needs an application to calculate ticket prices

$15.00

Description

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.
With the following named components:
Component
Type
Purpose
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()
Screenshots
Preview the Tutorial
The solution includes a zip file.
Attachments [Move over files to preview content of those files]
TicketsRUs.zip (170.83 KB)
Netbeans project
TicketsRUsApplication
build
classes
.netbeans_automatic_build
.netbeans_update_resources
TicketsRUs.class
build.xml
manifest.mf
nbproject
build-impl.xml
genfiles.properties
private
private.properties
project.properties
project.xml
src
TicketsRUs.java
test
Solution 1 TicketsRUs.doc
TicketsRUs-Screenshot-1.png
TicketsRUs-Screenshot-2.png
Preview TicketsRUs.java
//
//xxx-xxxxx:xxxxxxxxxxxxxx
xxxxxxx xxxx xxxxxxxxxxxxxx() {
xxxxxxxxxx1 = xxx xxxxx.xxxxx.xxxxxxxxxx();
xxxxxxxxxxx = xxx xxxxx.xxxxx.xxxxxxxxxxx();
numLabel = new javax.swing.JLabel();
txtNum = new javax.swing.JTextField();
chkMatinee = new javax.swing.JCheckBox();
radOrchestra = new javax.swing.JRadioButton();
radMezzanine = new javax.swing.JRadioButton();
radBalcony = new javax.swing.JRadioButton();
btnCalc = new javax.swing.JButton();
priceEachLabel = new javax.swing.JLabel();
txtEach = new javax.swing.JTextField();
totalLabel = new javax.swing.JLabel();
txtTotal = new javax.swing.JTextField();
xxxxxxxxxx1.xxxxxxx(“xxxxxxxxxx1”);
xxxxxxxxxxxxxxxxxxxxxxxx(xxxxx.xxxxx.xxxxxxxxxxxxxxx.xxxx_xx_xxxxx);
xxxxxxxx.xxxxxxx(“xxx xxxxxxx”);
Preview Solution 1 TicketsRUs.doc
xxxxxxxx:
xxxxxxx xxxx xxxxxxxxx() {
xxx xxxxxxxxxx = 0;
xxx {
xxxxxxxxxx = xxxxxxx.xxxxxxxx(xxxxxx.xxxxxxx());
if (numTickets < 0) throw new Exception(); } catch (Exception e) { JOptionPane.showMessageDialog(null, "Invalid number of tickets", "Error", JOptionPane.ERROR_MESSAGE); return; } if ((!radBalcony.isSelected()) && (!radMezzanine.isSelected()) && (!radOrchestra.isSelected())) { xxxxxxxxxxx.xxxxxxxxxxxxxxxxx(xxxx, "xxxxxx xxxx xx xxx xxxxxxxx", "xxxxx", xxxxxxxxxxx.xxxxx_xxxxxxx); xxxxxx; } xxxxxx xxxxxxxxx = 0; xx (xxxxxxxxxx.xxxxxxxxxx()) { xxxxxxxxx = 40; Payment methods Price: $15 Buy Now Checkout Added to cart Add to Cart Checkout Added to cart You May Also Like: CIS355A Final Exam Essay Questions

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.