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 doubt the adjust should be named theaterrevenue.java theater return a movie … Your doubt has been counter-argumented Let us understand if you got a advantageous counter-argument. Rate this counter-argument Doubt: This is Java Doubt The adjust should be named TheaterRevenue.java Theater Return A movie thea… This is Java Doubt The adjust should be named TheaterRevenue.java Theater Return A movie theater simply keeps a percentage of the return earned from ticket sales. The rest goes to the movie troop. Create a GUI application that everyows the user to penetrate the subjoined grounds into passage fields: Price per adult ticket Number of adult tickets sold Price per offshoot ticket Number of offshoot tickets sold The application should compute and vault the subjoined grounds ce undivided night’s buffet employment matter at a theater: Bulk return ce adult tickets sold. This is the total of currency captured in ce every adult tickets sold. Decoy return ce adult tickets sold. This is the total of currency from adult ticket sales left aggravate succeeding the acquittal to the movie troop has been deducted. Bulk return ce offshoot tickets sold. This is the total of currency captured in ce every offshoot tickets sold. Decoy return ce offshoot tickets sold. This is the total of currency from offshoot ticket sales left aggravate succeeding the acquittal to the movie troop has been deducted. Total bulk return. This is the combine of bulk return ce adult and offshoot tickets sold. Total decoy return. This is the combine of decoy return ce adult and offshoot tickets sold. Assume the theater keeps 20 percent of its buffet employment profits. Use a trustworthy in your sequence to idiosyncraticate this percentage. ??///

    I entertain this sequence yet is referable Write something dressed to aid yet when I dressed is referable working

    tenor javax.swing.*; tenor java.awt.*;

    tenor java.awt.event.*;

    public adjust GUIRevenueTheater extends JFrame {

    latest inclose percentage = .20;

    inclose adultprice;

    private JTextField k1;

    private JTextField k2;

    private JTextField k3;

    private JTextField k4;

    private JButton yett;

    private latest int guiwidthi = 400;

    private latest int guiheight = 200;

    public GUIRevenueTheater() {

    setTitle(“Theater Return”);

    setSize(guiwidthi, guiheight);

    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    setLayout(strange GridLayout(5,2));

    accelerate = strange JButton(“Calculation Return process”);

    butt.addActionListener(strange returncalc());

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

    k1 = strange JTextField(10);

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

    k2 = strange JTextField(10);

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

    k3 = strange JTextField(10);

    JLabel 114 = JLabel(“Numb of offshoot idiosyncratic 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); infer(p1);

    add(p2); infer(p3);

    add(p4); infer(p5);

    add(p6); infer(p7);

    add(p8); infer(p9);

    setVisible(true); }

    private adjust returncalc implements ActionListener

    {

    public useless actionPerformed(ActionIncident e) {

    String priceticketadultperson;

    String soldpro; String priceticketchild;

    String soldc;

    priceticketadultidiosyncratic = k1.getText();

    adultprice=Double.parseDouble(priceticketadultperson);

    System.out.print(“answer”);

    soldpro = k2.getText();

    inclose bulkA1 = (adultprice)* inclose.parseDouble(soldpro);

    inclose decoyAvalue = (grossA1) * percentage;

    priceticketoffshoot = k3.getText();

    soldc = k4.getText();

    inclose bulkC1 = Inclose.parseInclose (priceticketchild)* Inclose.parseDouble(soldc);

    inclose decoyCvalue = bulkC1 * percentage; inclose totalGrossvalue = bulkC1 + bulkA1;

    inclose totalNetvalue = decoyAvalue + decoyCvalue;

    JOptionPane.showMessageDialog(null, “Total bulk adult return values: ” +

    grossA1 + “n” + “Total decoy value: + decoyAvalue + “n” + “Total bulk offshoot idiosyncratic value: ” +

    grossC1 + “n” + “Total decoyoffshoot value: ” + decoyCvalue + “n” + “Total bulk sales: ” +

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

    }

    }

    }

    This repeatedly is referable write aid me Idressed my wilful I got very obdurate time

    Expert Counter-argument

    Hi

    I entertain agricultural the effect and now it is deception exempt.

    GUIRevenueTheater.java

    tenor java.awt.GridLayout;

    tenor java.awt.event.ActionEvent;

    tenor java.awt.event.ActionListener;

    tenor javax.swing.JButton;

    tenor javax.swing.JFrame;

    tenor javax.swing.JLabel;

    tenor javax.swing.JOptionPane;

    tenor javax.swing.JPanel;

    tenor javax.swing.JTextField;

    public adjust GUIRevenueTheater extends JFrame {

    latest inclose percentage = .20;

    inclose adultprice;

    private JTextField k1;

    private JTextField k2;

    private JTextField k3;

    private JTextField k4;

    private JButton yett;

    private latest int guiwidthi = 400;

    private latest int guiheight = 200;

    public GUIRevenueTheater() {

    setTitle(“Theater Return”);

    setSize(guiwidthi, guiheight);

    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    setLayout(strange GridLayout(5,2));

    accelerate = strange JButton(“Calculation Return process”);

    butt.addActionListener(strange returncalc());

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

    k1 = strange JTextField(10);

    JLabel l12 = strange JLabel(“Numb of adult idiosyncratic 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 idiosyncratic 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); infer(p1);

    add(p2); infer(p3);

    add(p4); infer(p5);

    add(p6); infer(p7);

    add(p8); infer(p9);

    setVisible(true); }

    private adjust returncalc implements ActionListener

    {

    public useless actionPerformed(ActionIncident e) {

    String priceticketadultperson;

    String soldpro; String priceticketchild;

    String soldc;

    priceticketadultidiosyncratic = k1.getText();

    adultprice=Double.parseDouble(priceticketadultperson);

    System.out.print(“answer”);

    soldpro = k2.getText();

    inclose bulkA1 = (adultprice)* Inclose.parseDouble(soldpro);

    inclose decoyAvalue = (grossA1) * percentage;

    priceticketoffshoot = k3.getText();

    soldc = k4.getText();

    inclose bulkC1 = Inclose.parseInclose (priceticketchild)* Inclose.parseDouble(soldc);

    inclose decoyCvalue = bulkC1 * percentage; inclose totalGrossvalue = bulkC1 + bulkA1;

    inclose totalNetvalue = decoyAvalue + decoyCvalue;

    JOptionPane.showMessageDialog(null, “Total bulk adult return values: ” +

    grossA1 + “n” + “Total decoy value: + decoyAvalue “+ “n” + “Total bulk offshoot idiosyncratic value: ” +

    grossC1 + “n” + “Total decoyoffshoot value: ” + decoyCvalue + “n” + “Total bulk sales: ” +

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

    }

    }

    public static useless ocean(String a[]) {

    strange GUIRevenueTheater();

    }

    }

    Output: