Writing a program to calculate the terms of the following sequence
Writing a program to calculate the terms of the following sequence
of numbers: 0 1 3 8 21 55 144 377 … where each term is three times the previous term minus the second previous term.
1. Class P3GUI should define the Swing based GUI and should be hand-coded and not generated by a GUI generator. In addition to the main method and a constructor to build the GUI, an event handler will be needed to handle the Compute button click and another handler will be needed to produce the file described above when the window is closed. The latter handler should be an object of an inner class that extends the WindowAdapter class.
2. Class Sequence should be a utility class meaning that all its methods must be class (static) methods and no objects should be able to be generated for that class. It should contain three public methods: