Question: write in java write a class called rgbcolor that has...
Write in JAVA
Write a class called RGBColor that has a final String field which contains either “RED”, “GREEN”, or “BLUE”. Provide a constructor that takes an int argument that assigns the
String field as follows:
Anything else: “BLUE”
Provide another constructor that takes a String argument. If the argument is not “RED”, “GREEN”, or “BLUE”, the string “BLUE” is assigned to the String field.
Provide a constructor with no arguments that assigns the string “BLUE” to the String field
Write a driver class whose main method creates several RGBColor objects using all three constructors. Print the String field of each object using its accessor.