- finish with class Word from ExW6
- extend your date class with enums from ExW6
Take the Ring5 class from the github and modify it to a class Field5. We will use it to implement a finite field (galois field/endlicher Körper).
- provide subtraction as inverse of addition.
- can it be mapped directly to integer subtraction?
- a - a = 0
- 3-4 = 4 <=> 4+4 = 3
- provide unary minus operator for negation
- provide division as inverse of multiplication.
- first figure out for each x (excluding 0), what y provides 1/x = y -> 1 = x*y
- Does it make sense to provide relational operators for Field5?
Implement a class Ring6 that implements modulo arithmetic for unsigned integers modulo 6.
- Start out with corresponding test cases, before you implement an operation.
- Provide addition and multiplication operators.
- Provide output operator to a stream.
- Provide inward and outward conversion from unsigned integers.
- When is it useful to make these conversions explicit?
- Is it useful to implement subtraction for Ring6?
- Is it useful/possible to implement division for Ring6?
Provide your answers to these questions in SolW7