Requirements: PLEASE NOTE THE CODE MUST BE AS SIMPLE AS POSSIBLE; NOTHING ADVANCED
Write a program that tests the user’s ability to memorize a sequence of colors. As shown in the sample session, the program starts off by displaying a dialog box with a list of colors that are to be memorized – red, white, yellow, green, and blue. The user then enters the colors one at a time in a text box. If the user makes a mistake, the program prints a “Sorry” message. If the user correctly enters all the colors, the program prints a “Congratulations” message. Note that when the sorry or congratulations message is printed, the window’s original components get cleared away.
Provide a hint button that causes the current color’s first letter to appear in the text box. For example, since the first color is red, the first hint should be r. The hint button must cause focus to be put on the text box (i.e., the cursor should appear within the text box without the user having to click there with the mouse). To cause focus to be put on a component, use the requestFocusInWindow method. See Sun’s API documentation for requestFocusInWindow details.
As always, you are required to write elegant code. In particular, you should avoid hard coding the color values in the interior of your program. You should declare those values one time in an array at the top of the program.
Note:
· Your program should contain a class named YourNameProg7.
· Use a simple FlowLayout layout manager scheme.
· Use an inner c[login to view URL] for the listener.
· Limit your use of class variables and instance variables – use them only if appropriate.
· Use appropriate modifiers for your methods. The modifiers we’ve discussed are private, public, static, and final.
· Use helping methods if appropriate.
· Mimic the sample session precisely. In particular, note the dialog box’s text, the window’s title, and the window’s text.
The output will need to be:
The opening window's title will read "Message" and the text will say "How good is your memory? Try to memorize this color sequence: red, white, yellow, green, blue" and there needs to be an "ok" button.
The main window's title will be "Memory Game". In the window's text, it will say "Enter color number 1" and then there will be a text field for the user to enter text. There also needs to be the "hint" button in the window. First they will type the first number and when they hit enter, the window's text will say "Enter color number 2" and the text field will be blank and ready for the user to enter the next color. At the end of entering the 5 colors, if the user was correct, there will be a window that "Congratulations! Your memory is awesome!" If the user types a color that is incorrect, then the window needs to come up saying "Sorry, that's not right." If the user hits the "hint" button, then it will need to give the first letter of whatever color is next to be entered.
i have rich experience in java development - both swing and web for years. i can done this within one day. Please let me do this for you with high quality and simplicity. thanks.
I am Sun certified Java Programmer, Ican easily do the required job, I have a lot of experience in making java desktop applications like chatting for LAN, Merchandising module of Apperal garment industry, Dynamic Load Balancer for Web Server System etc.
I can develop the application as requested with minimal cost.I have good hand on java.I will develop this application using simple java API Swing/applet