Problem # 4: Write a program that helps teachers test their students in their kn
ID: 3545623 • Letter: P
Question
Problem # 4:
Write a program that helps teachers 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 should also have a constructor and a setMethod for the instant variables.
In your test class you should use JFrames to show a shape of certain color (for example a red square). You need to start first by asking about the shape and then about the color using JOptionPane. Whether the answer is wrong or right the user should be shown another question (new colored shape) and you need to state that the answer was correct or incorrect. If the student enters a 0 as an answer (either for color or shape) for a question the program should exit.
Important Notes:
Application.setVisible(false);
Write a program that helps teachers test their students in their knowledge with colors and shapes. The program consists of two classes Color Shape and test Color Shape. Class Color Shape has two instant variables choice Color and choice Shape (both int). Your class should also have a constructor and a set Method for the instant variables. In your test class you should use J Frames to show a shape of certain color (for example a red square). You need to start first by asking about the shape and then about the color using J Option Pane. Whether the answer is wrong or right the user should be shown another question (new colored shape) and you need to state that the answer was correct or incorrect. If the student enters a 0 as an answer (either for color or shape) for a question the program should exit. Your need to generate the shapes and colors randomly using random numbers In order to show the new shape for the new question, you need to set the J Frame as invisible, change the settings of your J Frame and then set it back to visible using the following command When the user input a zero in any field, the program will exit If you faced a problem in closing the J Frames use the following command Your frame should be of reasonable size and the shapes should be clear and centered The user should enter both choices then the program specifies if the answer is correct or not.Explanation / Answer
What is the deadline for this assignment ?
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.