problem 1) prepare a program that helps teachers to test their students in their knowledge with colors and shapes. The program consists of two classes ColorShape and testColorShape. Class ColorShape has two instant variables choiceColor and choiceShape (both int). Your class must also have a constructor and the setMethod for the instant variables.
In your test class you must use JFrames to show the shape of certain color (for ex a red square). You require to start first by asking about shape and then about the color using JOptionPane. Whether answer is wrong or right the user must be shown another problem (new colored shape) and you require to state that answer was correct or incorrect. If the student enters a 0 as an answer (either for color or shape) for a problem the program must exit.
Your require to generate the shapes and colors randomly using random numbers
In order to show new shape for the new problem, you need to set the JFrame as invisible, change the settings of your JFrame and then set it back to visible using the following command
Application.setVisible(false); a invisible
Application.setVisible(true); a visible
When the user input a zero in any field, the program would exit
If you faced a problem in closing the JFrames use the following command
Your frame must be of reasonable size and the shapes must be clear and centered
The user must enter both choices then the program specifies if the answer is correct or not.