- public class BigNum/public static finals...

This preview shows page 1 - 2 out of 2 pages.

public class BigNum { //public static finals public static final int BASE = 2; public static final int SIZE = 3; //properties private int[] num; //constructors public BigNum() { num = new int[SIZE]; for (int count = 0; count < SIZE; count++) { num[count] = 0; } } public BigNum( String data) { int position; num = new int[SIZE]; //Calculating valid values //valid = data.length(); //Initializing to Zero for (int count = 0; count < SIZE; count++) { num[count] = 0; } //Adding the string to array position = 0; for (int count = data.length() - 1; count >= 0; count--) { num[position] = Integer.parseInt(data.substring(count, count + 1)); position++; } } public BigNum( BigNum n1) { num = new int[SIZE]; for (int count = 0; count < SIZE; count++) { this.num[count] = n1.num[count]; //this.valid = n1.valid; } } //methods public void shift( boolean left) { if( left) { for (int count = SIZE - 2; count >= 0; count--) { this.num[count + 1] = this.num[count];
Image of page 1

Subscribe to view the full document.

Image of page 2
  • Fall '19
  • NoProfessor
  • Void type, public class BigNum, public static final int BASE, public static finals

{[ snackBarMessage ]}

Get FREE access by uploading your study materials

Upload your study materials now and get free access to over 25 million documents.

Upload now for FREE access Or pay now for instant access
Christopher Reinemann
"Before using Course Hero my grade was at 78%. By the end of the semester my grade was at 90%. I could not have done it without all the class material I found."
— Christopher R., University of Rhode Island '15, Course Hero Intern

Ask a question for free

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern