Question: Please help with this C++ code, I have attached what the bits.txt file looks like. - Read the text file line by line - Create
Please help with this C++ code, I have attached what the bits.txt file looks like.


- Read the text file line by line - Create a Bits class with at least the following: - Private data members - string sequence - string packet - Corresponding Getters and Setters along with a Default Constructor - A void tostring() method that would simply cout packet: sequence object. - Create a void display(Bits *arr, int size) function to display the report shown below in the expected output. - Finally, prompt to see if the user wants to start from the beginning and enter another sequence, expanding the array. - You can only use \#include, \#include, \#include libraries. Below is the expected output of the program: ********** Bit Sequences Found ********** \begin{tabular}{l} P01: 10100001001010111000001111000000 \\ \hline \hline P04: 10110011111111000111110110001111 \\ \hline \hline \end{tabular} P05: 10011011000101100001011100010100 P06: 0011001000110000010111111100001e P09: 11101000110000101110000111000001 P11: 10000001000111000111100100010101 In the above example an array of size 9 will be created in the heap where each index contains an object of Bits class. P01: 10100001001010111000001111000000 P02: 11110011101010010110110010111011 P03: 10000101101010111101011101110111 P04: 10110011111111000111110110001111 P05: 10011011000101100001011100010100 P06: 00110010001100000101111111000010 P07: 10111110100111111000001000101000 P08: 00100101101000011001001100001000 P09: 11101000110000101110000111000001 P10: 00010101001101000001101000100000 P11: 10000001000111000111100100010101 P12: 00010011011110000011111011011100 P13: 01000000011111001110011100010001 P14: 11101110110111110111101101011111 P15: 00101100011111001000100010101110 P16: 11010110011001000111111011111011 P17: 00001100101001000110111010100010 P18: 01010000010111101000000011010000 P19: 00101010110011011111111110111101 P20: 00100010011000000110011101101001
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
