Question: Create a static public class called MathWord that can be used to do some simple arithmetic on the BitsWord class. Functionality add - adds two
Create a static public class called MathWord that can be used to do some simple arithmetic on the BitsWord class.
Functionality
add adds two BitsWord classes together and returns the sum as a new BitsWord class
sub subtracts two BitsWord classes from each other and returns the difference as a new BitsWord class
mul Multiplies two BitsWord classes together and returns the product as a new BitsWord class
div Divides two BitsWord classes together and returns the quotient as a new BitsWord class
max Takes as an argument two BitsWord classes and return the one that contains the larger value as a new BitsWord class.
min Takes as an argument two BitsWord classes and return the one that contains the smaller value as a new BitsWord class.
C Your functions should return a pointer to BitsWord classes.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
