Write a program that prompts for an integer that is stored in variable format. The program should:
1. "turn on" the boldface, italics, and underlining features.
2. determine, for each feature, whether the feature is on or off and print true or false, indicating on or off. Use five println statements to do this. Hint: Use another bitwise operator to determine the value of a bit. This trick is called masking.
3. "turn off" underlining and "turn on" subscripting, and strikethrough.
4. print true or false, indicating the values of the underline, subscript, and strikethrough bits.
I think it wants me to use the bits, but I'm not sure what exactly to write. My book lists the bit codes for bold, italics, etc. I also have to use the bitwise operators to turn them on, but I'm not sure I know what to do. Does the integer prompted have to be one of the 1, 2, 4, 8, or 16? Or can it be any integer and I have to format it?
The output is supposed to look like:
Do I need to get the final bits to look like 00000111 for the first and then the second part would be 00011000?
I'm not asking anyone to write it for me, just maybe clarify the directions. Thanks for the help!