Question: 1. Write your own BitArray class (without inheriting from the BitArray class) that includes a conversion method that takes Boolean values and converts them to
1. Write your own BitArray class (without inheriting from the BitArray class) that includes a conversion method that takes Boolean values and converts them to bit values. Hint: use a BitArray as the main data structure of the class but write your own implementation of the other methods.
2. Reimplement the class in Exercise 1 by inheriting from the BitArray class and adding just a conversion method.
3. Using one of the BitArray classes designed in Exercises 1 and 2, write a method that takes an integer value, reverses its bits, and displays the value in base 10 format.
(Data Structures and Algorithms)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
