Question

In this question, we will implement a new class called DialogI0 that extends AbstractDialogI0 (and there-fore implements InputOutputInterface). It should use JOptionPane to communicate with the user: readString (String prompt):

Uses JOptionPane to acquire input from the user, and returns aString. readInt (String prompt): Uses JOptionPane to acquire input from the user, and returns an integer. outputString(String outString): Uses JOptionPane to display the given string to the user. • main() will call the input methods, and it require you to type some input values. • To check if the input methods are working, you'll display the input values using outputString(), anduse a visual check.

Fig: 1

Fig: 2

Fig: 3

Fig: 4

Fig: 5

Fig: 6