Question: Implement a Polynomial class to represent polynomial expressions. A polynomial expression may have any number of terms. Class methods should support the standard operations such
Implement a Polynomial class to represent polynomial expressions. A polynomial expression may have any number of terms. Class methods should support the standard operations such as addition, subtraction, multiplication, and division. The user should be able to create arbitrary polynomial expressions such as
where a**b means ab. Also, there should be a method that allows the user to encode a polynomial as a bit-string. For example, the bit-string
1101
represents the polynomial expression
because the bit-string contains a 1 in positions 0, 2, and 3.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
