Question: // TO DO: add your implementation and JavaDocs public class MyAbacus implements Abacus { // ADD MORE PRIVATE MEMBERS HERE IF NEEDED! // Remember: Using
// TO DO: add your implementation and JavaDocs
public class MyAbacus implements Abacus {
// ADD MORE PRIVATE MEMBERS HERE IF NEEDED! // Remember: Using an array in this class = no credit on the project! public MyAbacus(int base) { // throws IllegalArgumentException if base is invalid // remember: an abacus should always have at least one // column! } public int getBase() { // O(1) return -1; //default return, make sure to remove/change }
public int getNumPlaces() { // O(1) return -1; //default return, make sure to remove/change } public int getBeadsTop(int place) { // O(1) return -1; //default return, make sure to remove/change } public int getBeadsBottom(int place) { // O(1) return -1; //default return, make sure to remove/change } public boolean equals(MyAbacus m) { // O(N) where N is the number of places currently // in use by the abacus return false; //default return, make sure to remove/change } public DynArr310
return null; //default return, make sure to remove/change } // -------------------------------------------------------- // example testing code... edit this as much as you want! // -------------------------------------------------------- public static void main(String[] args) { //this is the sequence from the project description Abacus a = new MyAbacus(10); DynArr310
Please follow the instructions in the comments using the data structures concept in java. Thank you
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
