Question: java language instance variable. Then create a constructor to initialize the ArrayL.ist. [1M] b. Declare the following methods for the class ColorsList: - addColor() method

java language java language instance variable. Then create a constructor to initialize the ArrayL.ist.

instance variable. Then create a constructor to initialize the ArrayL.ist. [1M] b. Declare the following methods for the class ColorsList: - addColor() method to add new colors elements to the colorl ist, [IM] - search(color) method that search for a color String passed as argument in the list and returns a Boolean value when the color is found or not.(use enhanced for loop)[2M] c. Write a test application in the main method that demonstrates the ColorsList class features. - Create an object of the class ColorsList and use its methods to add the following [1M] - Prompt the user to input a new color. [2M] - Search for the color entered by the user in the list. If the color is found, print the following message "The color is already exist". If the color entered by the user is not found, add the new color to the array list and print the message "The new color is added". [2M] d. Note: the user ean input the new color with uppercase/lowerease letters, but the colors stored in the array must always be as lowercase (See a sample output below). Correct output. [1M] Output - test (run) = Kunter a Celoti Mink The new celer nink in added Output - test (run) Inser a celses: res The color red in alresty emint Output - test (nun) = Inter * Colser ane The Color fed in eirendy erint Output - test (rum) = neser : coier arp. the -an colier ant in assed

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!