Reference no: EM131548531
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
txtNum
JTextField
Input for number of tickets
chkMatinee
JCheckBox
Check if matinee performance
radOrchestra
JRadioButton
Check for orchestra tickets
radMezzanine
JRadioButton
Check for mezzanine tickets
radBalcony
JRadioButton
Check for balcony tickets
btnCalc
JButton
Click to calculate price
txtEach
JTextField
Displays price of each ticket
txtTotal
JTextField
Displays total price
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()
Three stocks is divided between dividends and capital gains
: The expected pretax return on three stocks is divided between dividends and capital gains. Assume the expected dividend is a level perpetuity.
|
Which organisms showed sensitivity to oil toxicity
: How does adding fertilizer (and therefore nitrogen) affect the metabolism of these organisms? Which organisms showed sensitivity to oil toxicity?
|
Two mutually exclusive projects of similar size
: Which of the following investment criteria takes the time value of money into consideration? When will you be indifferent between two mutually exclusive project
|
Describe the major organizational types of physician groups
: Include a title page, your name, instructor, course, date, and Learning Plan assignment [Learning Plan 9].
|
Application to calculate ticket prices
: TicketsRUs needs an application to calculate ticket prices. There are three ticket prices:
|
What type of mental health agency would you start
: P.S my mental health agency serves people with autoimmune diseases, my focusis Multiple Sclerosis, my services would offer resources to help combat.
|
Legal aspects of information technology
: This week, you examined the legal aspects of information technology in regards to intellectual property, copyrights, and illegal software.
|
Develop communication strategies
: Identify the target group for your research and provide an overview of their location in the workplace.
|
Information about first lego league
: Please submit SQL statements as text file. You do not need to show screen shot. Make sure you have tested your SQL statements in Oracle.
|