Its all 1 project.
First Problem Create an abstract class named Customerâ€. Add 2 private fields to the class, name†and idâ€. Add a constructor that takes 2 arguments, aName†and aIdâ€. Add the following abstract method public abstract double discount();â€
Second Problem Create a Child class of Customer named OnlineCustomerâ€. Add a constructor that takes 2 arguments, name, id. Write the body of the inherited abstract discount method. Online customers get a 10% discount.
Third Problem. Create a JFrame class for your user interface named CustomerJFrameâ€. Add a JLabel and JTextField for the Name. Add a JLabel and JTextField for the Id. Add a JLabel for the message output. Add a JButton for the Submit button. Add an ActionPerformed Listener for the submit button.
When the button is selected, create the OnlineCustomer object using the name and id from your JTextFields. Display the name, id and discount in the OnlineCustomer object in the message JLabel
Fourth Problem. Create a class named CustomerApp†that has the main method. Create an object of your CustomerJFrame class.