Display the selected fruit name and its image on a gui

Assignment Help Computer Engineering
Reference no: EM132169236

Using JAVA

Download the data file (fruit.txt) and fruitImages.zip. The fruit.txt file contains name of fruits, and fruitImages.zip contains images of the fruits .

You may use ArrayList to save the data into your memory.

Your program choose one of the fruits using random method, then display the selected fruit name and its image on a GUI after using Collections.shuffle.

User can answer the exact name of the fruit. You are required to use Collections.shuffle for this program. This is a kind of puzzle game. You need to check whether the answer is correct or not.

If it is correct, image of the fruit should be displayed. You may add some other functions, such as response time in second, scores, etc. for your extra points.

Your program might produce the following output:

R G E N A O

Orange

[orange image]

G P A R E

Grape

[grape image]

N A A N A B

Banana

[banana image]

Output is displayed in GUI.

Fruit.txt:

B A N A N A
A P P L E
O R A N G E
G R A P E
A P R I C O T
M A N G O
C O C O N U T
C H E R R Y
R A S P B E R R Y
L E M O N

Reference no: EM132169236

Questions Cloud

Accept a one-dimensional array of double and returns : Using Java: Write a method, averageArray, that accepts a one-dimensional array of double and returns the average of the numbers in the array.
Make an argument that it is enticement : When using honeypots and honeynets, administrators should be careful not to run afoul of any legal issues.
Write software that simulates a game of duck duck goose : The person who is "it" pats each child on the head, saying "Duck" each time, until randomly reaching a child that the "it" person identifies as "Goose."
Write the condition guarantees that a doubly linked list : Write the condition, if true, guarantees that a doubly linked list with head and tail nodes is empty?
Display the selected fruit name and its image on a gui : Your program choose one of the fruits using random method, then display the selected fruit name and its image on a GUI .
Develop a form to allow a user to input a selection : Based upon the user's selection for a year, id number, or name, the data associated with the selection will be presented as separate web page.
Display finished results on the screen : Using an array of words, go through a text file and highlight all occurences of the words in the array and display finished results on the screen.
What is the running time of your algorithm : Design an algorithm that tests whether two given ordered trees are isomorphic. What is the running time of your algorithm?
Create an array that represents recommended ratings for user : Create an array that represents recommended ratings for the user. There should be 20 numbers in this array, one for each movie.

Reviews

Write a Review

Computer Engineering Questions & Answers

  By using different internet sources find out an article or

using various internet sources find an article or website about attack prevention. show your personal content mastery

  Create a class named cellphone which will represent the code

Create a class named CellPhone which will represent the code to manage cell phone's operating system. Split your declaration and definition into a header file.

  Detecting problem behind slow system booting

Suppose you have observed that your system is performing slower than the usual. Which system resources are likely to be at the root of the problem?

  In the it field group projects often have strict deadlines

groups will be assigned no later than the end of unit 1. if you wish to be involved in a project-managed group please

  Questionconsider following statements-double num1 num2

questionconsider following statements-double num1 num2 num3int int1 int2 int3double valuenum1 5.0 num2 6.0 num3

  How are they similar and how are they different

Radio buttons and check boxes are two of many different kinds of components that can be included in a graphical user interface.

  Write down the number of hits that you received

Write down the number of hits that you received for each of these phrases. Find at least three Web sites that provide interesting information on one of topics.

  Write the boolean function as boolean algebra

Write the Boolean function as Boolean algebra terms. First, think about how to deal with the two outputs. Then, describe each single row in terms of Boolean algebra

  Write down a for loop which will display all numbers that

write a for loop that will display all numbers that are multiples of 10 from 0 to 100 and then display the average of

  Design a class named preferred customer

Design a class named Preferred Customer, which is derived from the Customer class you created in Programming Exercise 4.

  Show that the set alldfa and allnfa is complete

Show that the set ALLdfa and ALLnfa is COMPLETE for one of the main complexity classes ( P, NP , PSPACE etc)?

  Write a program that will read in a list of numbers

Write a program that will read in a list of numbers, triple each number in the list and print the result.

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