In JavaFX CSS, you can form a color by specifying certain amounts of red, green, and blue,
Question:
- In JavaFX CSS, you can form a color by specifying certain amounts of red, green, and blue, with each color’s amount ranging from 0% to 100%. For example, to specify purple, you could use this code:
The rgb stands for red, green, and blue. With 100% for red and blue, the resulting color is purple. In the following Rgb and RgbDriver class skeletons, replace the insert…> lines with appropriate code such that the program operates properly. More specifically:
(a) In the Rgb class, provide a method definition for the setRed method such that setRed can be called as part of a method-call chain.
(b) In the RgbDriver class, provide a single statement that chains calls to the setRed, setGreen, setBlue, and display methods. For your method- call arguments, pass 100 to setRed, 60 to setGreen, and 100 to setBlue. With those argument values, your method-call-chaining statement should print this:
Step by Step Answer:
Introduction To Programming With Java A Problem Solving Approach
ISBN: 9781260575248
3rd International Edition
Authors: John Dean