Answer:
The class is called MyApp which inherits from JFrame and implements the ActionListener interface.
Explanation:
The class is called MyApp which extends the swing class JFrame and implements the ActionListener interface for event handling. As a results it needs to implement a method called actionPerformed for handling the relevant events that may be raised from the user interface. Since it extends JFrame, it has access to all the public and protected methods defined in JFrame(for example setTitle to set the title of the frame).
Answer:
cubeVolume = IMath.toThePowerOf(cubeSide, 3);
Explanation:
Following is the explanation for above statement:
Left side:
cubeVolume is a variable with data-type int, it will store the integer value that is the output from right side.
Right side:
- IMath is the class name.
- toThePowerOf is the built-in function that takes two arguments of data type int. First is the base and second is the power(exponent) separated by comma. In place of first argument that is the base variable we will pass the variable cubeSide that has been declared and initialize.
- Now the output will be stored in the variable cubeVolume.
i hope it will help you!
Answer:
ohhh ok to all transactions.