Question: create a java with modules where you ask the user for a number. then you print the color that it represent and add up the

create a java with modules where you ask the user for a number. then you print the color that it represent and add up the value (10,15,23,29,30). please use arrays and import jpotionpane. when using arrays, have the colors in one, the numbers (1-5) in one, and the values in one.

1=blue=10

2=red=15

3=orange=23

4= gray=29

5=black=30

example the users enter 1,3,4

convert those numbers to that value that matches them

10+23+29=62

print 62 and the colors that matched numbers that user entered, and how many times they enterd the numbers.

total is 62

1 blue,

1 orange,

1 gray

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!