Question: Having some trouble on making the inverse method work, not really sure where to start Oct.java A very simple class which extends the Nat class
Having some trouble on making the inverse method work, not really sure where to start


Oct.java A very simple class which extends the Nat class and implements the Mod8 interface. This class you must write, such that: 1. You include default, specifying and copy constructors 2. You override Nat's mutator. 3. You override Nat's clone method 4. You override Nat's equals method 5. You implement Mod8's inverse method For any x in 10, 7], its unique inverse i has the property that (x + 1) 8-0 6. You override Nat's increment, decrement and addition methods so that the underlying int value is always in the cyclic range [0, 7] Oct.java A very simple class which extends the Nat class and implements the Mod8 interface. This class you must write, such that: 1. You include default, specifying and copy constructors 2. You override Nat's mutator. 3. You override Nat's clone method 4. You override Nat's equals method 5. You implement Mod8's inverse method For any x in 10, 7], its unique inverse i has the property that (x + 1) 8-0 6. You override Nat's increment, decrement and addition methods so that the underlying int value is always in the cyclic range [0, 7]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
