Homework Solution: This is java question the class should be called theaterrevenue.java theater revenue a movie … Your question ha…

    This is java question the class should be called theaterrevenue.java theater revenue a movie ... Your question has been answered Let us know if you got a helpful answer. Rate this answer Question: This is Java Question The class should be called TheaterRevenue.java Theater Revenue A movie thea... This is Java Question The class should be called TheaterRevenue.java Theater Revenue A movie theater only keeps a percentage of the revenue earned from ticket sales. The remainder goes to the movie company. Create a GUI application that allows the user to enter the following data into text fields: Price per adult ticket Number of adult tickets sold Price per child ticket Number of child tickets sold The application should calculate and display the following data for one night’s box office business at a theater: Gross revenue for adult tickets sold. This is the amount of money taken in for all adult tickets sold. Net revenue for adult tickets sold. This is the amount of money from adult ticket sales left over after the payment to the movie company has been deducted. Gross revenue for child tickets sold. This is the amount of money taken in for all child tickets sold. Net revenue for child tickets sold. This is the amount of money from child ticket sales left over after the payment to the movie company has been deducted. Total gross revenue. This is the sum of gross revenue for adult and child tickets sold. Total net revenue. This is the sum of net revenue for adult and child tickets sold. Assume the theater keeps 20 percent of its box office receipts. Use a constant in your code to represent this percentage. ??/// I have this code but is not Compile somebody tried to help but when I tried is not working import javax.swing.*; import java.awt.*; import java.awt.event.*; public class GUIRevenueTheater extends JFrame { final double percentage = .20; double adultprice; private JTextField k1; private JTextField k2; private JTextField k3; private JTextField k4; private JButton butt; private final int guiwidthi = 400; private final int guiheight = 200; public GUIRevenueTheater() { setTitle("Theater Revenue"); setSize(guiwidthi, guiheight); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setLayout(new GridLayout(5,2)); butt = new JButton("Calculation Revenue process"); butt.addActionListener(new revenuecalc()); JLabel 111 = new JLabel("price per adult ticket:"); k1 = new JTextField(10); JLabel 112 = new JLabel("Numb of adult person tickets sold:"); k2 = new JTextField(10); JLabel 113 = new JLabel("cost per child ticket:"); k3 = new JTextField(10); JLabel 114 = JLabel("Numb of child person tickets sold:"); k4 = new JTextField(10); JPanel p1 = new JPanel(); JPanel p2 = new JPanel(); JPanel p3 = new JPanel(); JPanel p4 = new JPanel(); JPanel p5 = new JPanel(); JPanel p6 = new JPanel(); JPanel p7 = new JPanel(); JPanel p8 = new JPanel(); JPanel p9 = new JPanel(); p1.add(111); p2.add(k1); p3.add(112); p4.add(k2); p5.add(113); p6.add(k3); p7.add(114); p8.add(k4); p9.add(butt); add(p1); add(p2); add(p3); add(p4); add(p5); add(p6); add(p7); add(p8); add(p9); setVisible(true); } private class revenuecalc implements ActionListener { public void actionPerformed(ActionEvent e) { String priceticketadultperson; String soldpro; String priceticketchild; String soldc; priceticketadultperson = k1.getText(); adultprice=Double.parseDouble(priceticketadultperson); System.out.print("answer"); soldpro = k2.getText(); double grossA1 = (adultprice)* double.parseDouble(soldpro); double netAvalue = (grossA1) * percentage; priceticketchild = k3.getText(); soldc = k4.getText(); double grossC1 = Double.parseDouble (priceticketchild)* Double.parseDouble(soldc); double netCvalue = grossC1 * percentage; double totalGrossvalue = grossC1 + grossA1; double totalNetvalue = netAvalue + netCvalue; JOptionPane.showMessageDialog(null, "Total gross adult revenue values: " + grossA1 + "n" + "Total net value: + netAvalue + "n" + "Total gross child person value: " + grossC1 + "n" + "Total netchild value: " + netCvalue + "n" + "Total gross sales: " + totalGrossvalue + "n" + Total net sales: " + totalNetvalue); } } } This again is not compile help me Itried my self I got very hard time

    Expert Answer

    Hi I have fixed the issue and now it is error free. GUIRevenueTheater.java

    This is java investigation the dispose should be denominated theaterrevenue.java theater proceeds a movie … Your investigation has been rejoindered Let us understand if you got a advantageous rejoinder. Rate this rejoinder Investigation: This is Java Investigation The dispose should be denominated TheaterRevenue.java Theater Proceeds A movie thea… This is Java Investigation The dispose should be denominated TheaterRevenue.java Theater Proceeds A movie theater simply keeps a percentage of the proceeds earned from ticket sales. The rest goes to the movie order. Create a GUI impression that fullows the user to penetrate the succeedingcited basis into citation fields: Price per adult ticket Number of adult tickets sold Price per offshoot ticket Number of offshoot tickets sold The impression should reckon and vault the succeedingcited basis ce single night’s punch duty transaction at a theater: Unseemly proceeds ce adult tickets sold. This is the aggregate of capital charmed in ce full adult tickets sold. Enmesh proceeds ce adult tickets sold. This is the aggregate of capital from adult ticket sales left aggravate succeeding the liquidation to the movie order has been deducted. Unseemly proceeds ce offshoot tickets sold. This is the aggregate of capital charmed in ce full offshoot tickets sold. Enmesh proceeds ce offshoot tickets sold. This is the aggregate of capital from offshoot ticket sales left aggravate succeeding the liquidation to the movie order has been deducted. Total unseemly proceeds. This is the complete of unseemly proceeds ce adult and offshoot tickets sold. Total enmesh proceeds. This is the complete of enmesh proceeds ce adult and offshoot tickets sold. Assume the theater keeps 20 percent of its punch duty income. Use a faithful in your order to peculiarate this percentage. ??///

    I keep this order yet is referable Mitigate colossus habituated to acceleration yet when I habituated is referable working

    purport javax.swing.*; purport java.awt.*;

    purport java.awt.event.*;

    public dispose GUIRevenueTheater extends JFrame {

    decisive embrace percentage = .20;

    embrace adultprice;

    private JTextField k1;

    private JTextField k2;

    private JTextField k3;

    private JTextField k4;

    private JButton yett;

    private decisive int guiwidthi = 400;

    private decisive int guiheight = 200;

    public GUIRevenueTheater() {

    setTitle(“Theater Proceeds”);

    setSize(guiwidthi, guiheight);

    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    setLayout(strange GridLayout(5,2));

    propel = strange JButton(“Calculation Proceeds process”);

    butt.addActionListener(strange proceedscalc());

    JLabel 111 = strange JLabel(“price per adult ticket:”);

    k1 = strange JTextField(10);

    JLabel 112 = strange JLabel(“Numb of adult peculiar tickets sold:”);

    k2 = strange JTextField(10);

    JLabel 113 = strange JLabel(“cost per offshoot ticket:”);

    k3 = strange JTextField(10);

    JLabel 114 = JLabel(“Numb of offshoot peculiar tickets sold:”);

    k4 = strange JTextField(10);

    JPanel p1 = strange JPanel();

    JPanel p2 = strange JPanel();

    JPanel p3 = strange JPanel();

    JPanel p4 = strange JPanel();

    JPanel p5 = strange JPanel();

    JPanel p6 = strange JPanel();

    JPanel p7 = strange JPanel();

    JPanel p8 = strange JPanel();

    JPanel p9 = strange JPanel();

    p1.add(111); p2.add(k1);

    p3.add(112); p4.add(k2);

    p5.add(113); p6.add(k3);

    p7.add(114); p8.add(k4);

    p9.add(butt); append(p1);

    add(p2); append(p3);

    add(p4); append(p5);

    add(p6); append(p7);

    add(p8); append(p9);

    setVisible(true); }

    private dispose proceedscalc implements ActionListener

    {

    public invalid actionPerformed(ActionAccident e) {

    String priceticketadultperson;

    String soldpro; String priceticketchild;

    String soldc;

    priceticketadultpeculiar = k1.getText();

    adultprice=Double.parseDouble(priceticketadultperson);

    System.out.print(“answer”);

    soldpro = k2.getText();

    embrace unseemlyA1 = (adultprice)* embrace.parseDouble(soldpro);

    embrace enmeshAvalue = (grossA1) * percentage;

    priceticketoffshoot = k3.getText();

    soldc = k4.getText();

    embrace unseemlyC1 = Embrace.parseEmbrace (priceticketchild)* Embrace.parseDouble(soldc);

    embrace enmeshCvalue = unseemlyC1 * percentage; embrace totalGrossvalue = unseemlyC1 + unseemlyA1;

    embrace totalNetvalue = enmeshAvalue + enmeshCvalue;

    JOptionPane.showMessageDialog(null, “Total unseemly adult proceeds values: ” +

    grossA1 + “n” + “Total enmesh value: + enmeshAvalue + “n” + “Total unseemly offshoot peculiar value: ” +

    grossC1 + “n” + “Total enmeshoffshoot value: ” + enmeshCvalue + “n” + “Total unseemly sales: ” +

    totalGrossvalue + “n” + Total enmesh sales: ” + totalNetvalue);

    }

    }

    }

    This anewlight is referable mitigate acceleration me Ihabituated my stubborn I got very inexplicable time

    Expert Rejoinder

    Hi

    I keep agricultural the branchren and now it is deception at-liberty.

    GUIRevenueTheater.java

    purport java.awt.GridLayout;

    purport java.awt.event.ActionEvent;

    purport java.awt.event.ActionListener;

    purport javax.swing.JButton;

    purport javax.swing.JFrame;

    purport javax.swing.JLabel;

    purport javax.swing.JOptionPane;

    purport javax.swing.JPanel;

    purport javax.swing.JTextField;

    public dispose GUIRevenueTheater extends JFrame {

    decisive embrace percentage = .20;

    embrace adultprice;

    private JTextField k1;

    private JTextField k2;

    private JTextField k3;

    private JTextField k4;

    private JButton yett;

    private decisive int guiwidthi = 400;

    private decisive int guiheight = 200;

    public GUIRevenueTheater() {

    setTitle(“Theater Proceeds”);

    setSize(guiwidthi, guiheight);

    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    setLayout(strange GridLayout(5,2));

    propel = strange JButton(“Calculation Proceeds process”);

    butt.addActionListener(strange proceedscalc());

    JLabel l11 = strange JLabel(“price per adult ticket:”);

    k1 = strange JTextField(10);

    JLabel l12 = strange JLabel(“Numb of adult peculiar tickets sold:”);

    k2 = strange JTextField(10);

    JLabel l13 = strange JLabel(“cost per offshoot ticket:”);

    k3 = strange JTextField(10);

    JLabel l14 = strange JLabel(“Numb of offshoot peculiar tickets sold:”);

    k4 = strange JTextField(10);

    JPanel p1 = strange JPanel();

    JPanel p2 = strange JPanel();

    JPanel p3 = strange JPanel();

    JPanel p4 = strange JPanel();

    JPanel p5 = strange JPanel();

    JPanel p6 = strange JPanel();

    JPanel p7 = strange JPanel();

    JPanel p8 = strange JPanel();

    JPanel p9 = strange JPanel();

    p1.add(l11); p2.add(k1);

    p3.add(l12); p4.add(k2);

    p5.add(l13); p6.add(k3);

    p7.add(l14); p8.add(k4);

    p9.add(butt); append(p1);

    add(p2); append(p3);

    add(p4); append(p5);

    add(p6); append(p7);

    add(p8); append(p9);

    setVisible(true); }

    private dispose proceedscalc implements ActionListener

    {

    public invalid actionPerformed(ActionAccident e) {

    String priceticketadultperson;

    String soldpro; String priceticketchild;

    String soldc;

    priceticketadultpeculiar = k1.getText();

    adultprice=Double.parseDouble(priceticketadultperson);

    System.out.print(“answer”);

    soldpro = k2.getText();

    embrace unseemlyA1 = (adultprice)* Embrace.parseDouble(soldpro);

    embrace enmeshAvalue = (grossA1) * percentage;

    priceticketoffshoot = k3.getText();

    soldc = k4.getText();

    embrace unseemlyC1 = Embrace.parseEmbrace (priceticketchild)* Embrace.parseDouble(soldc);

    embrace enmeshCvalue = unseemlyC1 * percentage; embrace totalGrossvalue = unseemlyC1 + unseemlyA1;

    embrace totalNetvalue = enmeshAvalue + enmeshCvalue;

    JOptionPane.showMessageDialog(null, “Total unseemly adult proceeds values: ” +

    grossA1 + “n” + “Total enmesh value: + enmeshAvalue “+ “n” + “Total unseemly offshoot peculiar value: ” +

    grossC1 + “n” + “Total enmeshoffshoot value: ” + enmeshCvalue + “n” + “Total unseemly sales: ” +

    totalGrossvalue + “n” + “Total enmesh sales: ” + totalNetvalue);

    }

    }

    public static invalid deep(String a[]) {

    strange GUIRevenueTheater();

    }

    }

    Output: