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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started