Write a program that tests the users ability

Assignment Help JAVA Programming
Reference no: EM131587017

Mission

a) Basic capability:

Write a program that tests the user's ability to memorize a random sequence of colors. As shown in the sample session, the program starts off by displaying a JOptionPane dialog box with a list of colors that are to be memorized - red, white, yellow, green, and blue.

The user then uses a form you create to enter the colors one at a time into a text box. If the user guesses the color correctly, the text box is cleared and the user is asked to enter the next color. If the user makes a mistake, the program prints a "Sorry" message. If the user correctly enters all five colors correctly, the program prints a "Congratulations" message. Note that when the sorry or congratulations message is printed, the window's original components get cleared away, so that the user cannot enter any more text.

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 MemoryGame.
- Use a simple FlowLayout layout manager scheme.
- Use an inner class for the listener.

Reference no: EM131587017

Questions Cloud

Diagram representing consumer and producer surplus : A diagram representing consumer and producer surplus; as well as any deadweight loss.
What does the biological approach reveal about the issue : What does the biological approach reveal about the issue, Could there be several biological or genetic factors that negatively impact the issue
Discuss about the environmental monitoring : Select a market from this list: Manufacturing, Media, Environmental Monitoring, Infrastructure Management, Energy Management.
Describe a typical accounting cycle throughout a month : Describe a typical accounting cycle throughout a month. What personnel in the company are performing each function and why
Write a program that tests the users ability : CS 1400 - Hilton - Write a program that tests the users ability to memorize a random sequence of colors - you are required to write elegant code
Explain which properties of equivalence relations hold : Consider a,b ? Z and let a ~ b if a = b (mod 3) or if a = b (mod 5). Is this an equivalence relation?
Briefly describe erik eriksons theory and stages : Briefly describe Erik Erikson's Theory and stages of development, Briefly describe Abraham Maslow's Humanistic Theory
What are journal entries and why are they used : Journal Entries - What are journal entries and why are they used? Explain why adjusting entries are needed and describe the major types
Research a recent threat to the security of an e-commerce : Research a recent threat (discovered within the last 12 months) to the security of an e-commerce operation.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd