- Group project: Write child package BigNumsPkg.Even and a client, as described below:
- Child package BigNumsPkg.Even contains:
- Type Even_BigNum, derived from BigNum, for even bignums
- Function is_even to determine whether a bignum is even
- Function make_even that returns an even bignum that is one smaller or one larger,
relatively, than it's first parameter
if the second parameter is smaller or larger than the first
- Client:
- A loop that does the following:
- read a bignm
- Output true or false depending on whether the bignum is even or odd
- For odd numbers, output the next smaller and next larger bignum
- After the loop:
- Output the evens before and after the smallest and largest odds
- Solution: