Byte Class

Learn to implement two overloaded setBit( ) and clearBit( ) methods.

Challenge

Write a program that contains a Byte class and overloaded setBit( ) and clearBit( ) functions as shown below.

setBit ( num, 3 ) - Sets 1 in bit number 3 in num

setBit ( num, 2, 5 ) - Sets 1 in bits 2 to 5 in num

...