Question: so this is a java project and I'm stuck with second part of the project, which was due on June 11 (BigInt Addition and Subtraction)

 so this is a java project and I'm stuck with second

so this is a java project and I'm stuck with second part of the project, which was due on June 11 (BigInt Addition and Subtraction)

I need to add and also be able to subtract any 2 big integers using an ArrayList not using the java provided import math.biginteger. the code that is made needs to be working with the demo class that my professor provided me with.

import java.util.Scanner;

public class BigInt_Add_Sub_Mul_Div_Mod_Demo

{

public static void main(String[] args)

{

BigInt b1;

BigInt b2;

BigInt b3;

b1 = new BigInt("-0");

b2 = new BigInt("+0");

b3 = b1.add(b2);

System.out.println("1) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

b1 = new BigInt("1");

b2 = new BigInt("1");

b3 = b1.add(b2);

System.out.println(" 2) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

//b3 = b1.divideBy(b2);

//System.out.println("quotient b3 is " + b1 +" / " + b2 + " = " + b3);

//b3 = b1.modulus(b2);

//System.out.println("modulus b3 is " + b1 +" mod " + b2 + " = " + b3);

b1 = new BigInt("-1");

b2 = new BigInt("1");

b3 = b1.add(b2);

System.out.println(" 3) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

//b3 = b1.divideBy(b2);

//System.out.println("quotient b3 is " + b1 +" / " + b2 + " = " + b3);

//b3 = b1.modulus(b2);

//System.out.println("modulus b3 is " + b1 +" mod " + b2 + " = " + b3);

b1 = new BigInt("1");

b2 = new BigInt("-1");

b3 = b1.add(b2);

System.out.println(" 4) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

//b3 = b1.divideBy(b2);

//System.out.println("quotient b3 is " + b1 +" / " + b2 + " = " + b3);

//b3 = b1.modulus(b2);

//System.out.println("modulus b3 is " + b1 +" mod " + b2 + " = " + b3);

b1 = new BigInt("-1");

b2 = new BigInt("-1");

b3 = b1.add(b2);

System.out.println(" 5) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

//b3 = b1.divideBy(b2);

//System.out.println("quotient b3 is " + b1 +" / " + b2 + " = " + b3);

//b3 = b1.modulus(b2);

//System.out.println("modulus b3 is " + b1 +" mod " + b2 + " = " + b3);

b1 = new BigInt("+1");

b2 = new BigInt("+1");

b3 = b1.add(b2);

System.out.println(" 6) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

//b3 = b1.divideBy(b2);

//System.out.println("quotient b3 is " + b1 +" / " + b2 + " = " + b3);

//b3 = b1.modulus(b2);

//System.out.println("modulus b3 is " + b1 +" mod " + b2 + " = " + b3);

b1 = new BigInt("-100");

b2 = new BigInt("100");

b3 = b1.add(b2);

System.out.println(" 7) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

//b3 = b1.divideBy(b2);

//System.out.println("quotient b3 is " + b1 +" / " + b2 + " = " + b3);

//b3 = b1.modulus(b2);

//System.out.println("modulus b3 is " + b1 +" mod " + b2 + " = " + b3);

b1 = new BigInt("100");

b2 = new BigInt("-100");

b3 = b1.add(b2);

System.out.println(" 8) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

//b3 = b1.divideBy(b2);

//System.out.println("quotient b3 is " + b1 +" / " + b2 + " = " + b3);

//b3 = b1.modulus(b2);

//System.out.println("modulus b3 is " + b1 +" mod " + b2 + " = " + b3);

b1 = new BigInt("-100");

b2 = new BigInt("-100");

b3 = b1.add(b2);

System.out.println(" 9) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

//b3 = b1.divideBy(b2);

//System.out.println("quotient b3 is " + b1 +" / " + b2 + " = " + b3);

//b3 = b1.modulus(b2);

//System.out.println("modulus b3 is " + b1 +" mod " + b2 + " = " + b3);

b1 = new BigInt("100");

b2 = new BigInt("100");

b3 = b1.add(b2);

System.out.println(" 10) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

//b3 = b1.divideBy(b2);

//System.out.println("quotient b3 is " + b1 +" / " + b2 + " = " + b3);

//b3 = b1.modulus(b2);

//System.out.println("modulus b3 is " + b1 +" mod " + b2 + " = " + b3);

b1 = new BigInt("200");

b2 = new BigInt("-0");

b3 = b1.add(b2);

System.out.println(" 11) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

//b3 = b1.divideBy(b2);

//System.out.println("quotient b3 is " + b1 +" / " + b2 + " = " + b3);

//b3 = b1.modulus(b2);

//System.out.println("modulus b3 is " + b1 +" mod " + b2 + " = " + b3);

b1 = new BigInt("-200");

b2 = new BigInt("-0");

b3 = b1.add(b2);

System.out.println(" 12) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

//b3 = b1.divideBy(b2);

//System.out.println("quotient b3 is " + b1 +" / " + b2 + " = " + b3);

//b3 = b1.modulus(b2);

//System.out.println("modulus b3 is " + b1 +" mod " + b2 + " = " + b3);

b1 = new BigInt("-0");

b2 = new BigInt("200");

b3 = b1.add(b2);

System.out.println(" 13) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

//b3 = b1.divideBy(b2);

//System.out.println("quotient b3 is " + b1 +" / " + b2 + " = " + b3);

//b3 = b1.modulus(b2);

//System.out.println("modulus b3 is " + b1 +" mod " + b2 + " = " + b3);

b1 = new BigInt("-0");

b2 = new BigInt("-200");

b3 = b1.add(b2);

System.out.println(" 14) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

//b3 = b1.divideBy(b2);

//System.out.println("quotient b3 is " + b1 +" / " + b2 + " = " + b3);

//b3 = b1.modulus(b2);

//System.out.println("modulus b3 is " + b1 +" mod " + b2 + " = " + b3);

b1 = new BigInt("37");

b2 = new BigInt("26");

b3 = b1.add(b2);

System.out.println(" 15) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

//b3 = b1.divideBy(b2);

//System.out.println("quotient b3 is " + b1 +" / " + b2 + " = " + b3);

//b3 = b1.modulus(b2);

//System.out.println("modulus b3 is " + b1 +" mod " + b2 + " = " + b3);

b1 = new BigInt("-37");

b2 = new BigInt("26");

b3 = b1.add(b2);

System.out.println(" 16) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

//b3 = b1.divideBy(b2);

//System.out.println("quotient b3 is " + b1 +" / " + b2 + " = " + b3);

//b3 = b1.modulus(b2);

// System.out.println("modulus b3 is " + b1 +" mod " + b2 + " = " + b3);

b1 = new BigInt("37");

b2 = new BigInt("-26");

b3 = b1.add(b2);

System.out.println(" 17) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

//b3 = b1.divideBy(b2);

//System.out.println("quotient b3 is " + b1 +" / " + b2 + " = " + b3);

//b3 = b1.modulus(b2);

//System.out.println("modulus b3 is " + b1 +" mod " + b2 + " = " + b3);

b1 = new BigInt("-37");

b2 = new BigInt("-26");

b3 = b1.add(b2);

System.out.println(" 18) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

//b3 = b1.divideBy(b2);

//System.out.println("quotient b3 is " + b1 +" / " + b2 + " = " + b3);

//b3 = b1.modulus(b2);

//System.out.println("modulus b3 is " + b1 +" mod " + b2 + " = " + b3);

b1 = new BigInt("-200111111111111111199999999");

b2 = new BigInt("3333333333333388888888888888888888555555555555555555555555");

b3 = b1.add(b2);

System.out.println(" 19) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

//b3 = b1.divideBy(b2);

//System.out.println("quotient b3 is " + b1 +" / " + b2 + " = " + b3);

//b3 = b1.modulus(b2);

//System.out.println("modulus b3 is " + b1 +" mod " + b2 + " = " + b3);

b1 = new BigInt("66666666666666666666677777777777777777777711111111111111111200");

b2 = new BigInt("-3333333333333333333344444444444");

b3 = b1.add(b2);

System.out.println(" 20) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

//b3 = b1.divideBy(b2);

//System.out.println("quotient b3 is " + b1 +" / " + b2 + " = " + b3);

//b3 = b1.modulus(b2);

//System.out.println("modulus b3 is " + b1 +" mod " + b2 + " = " + b3);

b1 = new BigInt("-66666666666666666666677777777777777777777711111111111111111200");

b2 = new BigInt("-333333");

b3 = b1.add(b2);

System.out.println(" 21) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

//b3 = b1.divideBy(b2);

//System.out.println("quotient b3 is " + b1 +" / " + b2 + " = " + b3);

//b3 = b1.modulus(b2);

//System.out.println("modulus b3 is " + b1 +" mod " + b2 + " = " + b3);

b1 = new BigInt("6666666");

b2 = new BigInt("3333333333333333333344444444444444444444455555555555555550");

b3 = b1.add(b2);

System.out.println(" 22) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

//b3 = b1.divideBy(b2);

//System.out.println("quotient b3 is " + b1 +" / " + b2 + " = " + b3);

//b3 = b1.modulus(b2);

//System.out.println("modulus b3 is " + b1 +" mod " + b2 + " = " + b3);

b1 = new BigInt("1111111111111111111111111111111122222222222222222222222222222222222333333333333333333333333333333334444444444444444444444444");

b2 = new BigInt("99999999999999999999999999999888888888888888888888888888888881111111111111111111111111111111122222222222222222222222222222222222333333333333333333333333333333334444444444444444444444444");

b3 = b1.add(b2);

System.out.println(" 23) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

//b3 = b1.divideBy(b2);

//System.out.println("quotient b3 is " + b1 +" / " + b2 + " = " + b3);

//b3 = b1.modulus(b2);

//System.out.println("modulus b3 is " + b1 +" mod " + b2 + " = " + b3);

b1 = new BigInt("-1111111111111111111111111111111122222222222222222222222222222222222333333333333333333333333333333334444444444444444444444444");

b2 = new BigInt("99999999999999999999999999999888888888888888888888888888888881111111111111111111111111111111122222222222222222222222222222222222333333333333333333333333333333334444444444444444444444444");

b3 = b1.add(b2);

System.out.println(" 24) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

//b3 = b1.divideBy(b2);

//System.out.println("quotient b3 is " + b1 +" / " + b2 + " = " + b3);

//b3 = b1.modulus(b2);

//System.out.println("modulus b3 is " + b1 +" mod " + b2 + " = " + b3);

b1 = new BigInt("1111111111111111111111111111111122222222222222222222222222222222222333333333333333333333333333333334444444444444444444444444");

b2 = new BigInt("-99999999999999999999999999999888888888888888888888888888888881111111111111111111111111111111122222222222222222222222222222222222333333333333333333333333333333334444444444444444444444444");

b3 = b1.add(b2);

System.out.println(" 25) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

//b3 = b1.divideBy(b2);

//System.out.println("quotient b3 is " + b1 +" / " + b2 + " = " + b3);

//b3 = b1.modulus(b2);

//System.out.println("modulus b3 is " + b1 +" mod " + b2 + " = " + b3);

b1 = new BigInt("-1111111111111111111111111111111122222222222222222222222222222222222333333333333333333333333333333334444444444444444444444444");

b2 = new BigInt("-99999999999999999999999999999888888888888888888888888888888881111111111111111111111111111111122222222222222222222222222222222222333333333333333333333333333333334444444444444444444444444");

b3 = b1.add(b2);

System.out.println(" 26) sum b3 is " + b1 +" + " + b2 + " = " + b3);

//b3 = b1.subtract(b2);

//System.out.println("difference b3 is " + b1 +" - " + b2 + " = " + b3);

//b3 = b1.multiply(b2);

//System.out.println("product b3 is " + b1 +" * " + b2 + " = " + b3);

//b3 = b1.divideBy(b2);

//System.out.println("quotient b3 is " + b1 +" / " + b2 + " = " + b3);

//b3 = b1.modulus(b2);

//System.out.println("modulus b3 is " + b1 +" mod " + b2 + " = " + b3);

}

}

I would really appreciate it if someone can help me out here with the code I'm struggling. Thank you.

CSC 202 projects Summer Biglnt class The purpose of the Biglnt class is to solve the problem using short methods that work together to solve the o multiply and divide. My constructor calls a method called setSignAndRemoveltifltls There It receives the string that was se the constructor and sets the boolean variable positive to true or false and then returns a string without the sign that processed by the constructor to store the string in an ArrayList. My public add method does not add. It calls helper methods to do the work. My public multiply method does not multiply. It calls two private methods. One is a multiply method that calls other m to do the actual multiplication. My public divide method does not divide. It calls nine private helper methods that d This is a challenging project that requires information hiding to be successful There are two main programs that you must use. On my website is a demo for the constructor and toString0 method. This demo must be run when you are working on the constructor and toStringd. There is a second Bigint demo for add, subtract, multiply and divide. This demo must be used when you test addition, subtraction, multiplication, division, and modulus. can then be LBY HOME o the work. F1 June 4 Monday: Biglnt constructor and toString0 method. Create a RuntimeException class that throws an exception when the input string does not hold a properly formed integer. June 11 Monday: Bigint addition and subtraction. June 14 Thursday: BigInt multiplication. June 19 Tuesday: Biglnt division and modulus. When you solve this division problem use appropriate SOPO) lines to demonstrate debugging your program BigInt Constructor and toString Considerations Constructors initialize the private data at the point of declaration. The constructor has a String argument. Java code must analyze this string and if it correctly represents a Bigint convert the characters to integers and store them in an Array List or an array Example strings your constructor must correctly deal with are: "100",5 0" +0" "1, 56DDD8456" The last four examples do not represent an integer and must be rejected. A Biglnt consists of a boolean sign and the array or ArrayList holding the absolute value of the number. If an array is used a third variable holding the size of the BigInt must also be included. There should be no other instance variables. hift The algorithm could be: 1) Read a String Shift 2) if the string has a or+ as the first character remove it and set the sign. The String substring0 method can do this. If this is the only character in the string end the program. 3) Use a for loop to work through the string from the end of the string to the front. Store the string characters as integers. The Character wrapper class method isDigitO can make this conversion, or the character can be cast as an integer remembering to subtract 48 from the ASCII value. If a character other than a digit is encountered end the program. 4) Think of the indexes of the ArrayList values going right to left starting with 0. With the string "549" the 9 can be placed int location 0, the 4 in location 1 and the 5 in location 2. With an ArrayList this happens automatically with the add 5) The toString) method creates and returns a String with the sign if it is negative and then adding the ArrayList integers 6) I used a private helper method to test for the sign in the string input, set the sign and make sure the sign was not the only 7) You must be familiar with the String methods to turn a string into integers that can be stored in an array. You then need method. BigInt.add(index). (See ArrayList documentation. I will put some on my website.) starting from the back of the list to the front. character in the input string. You might consider doing this yourself to take the integers stored in an array and turn them back into a string in the toString() method. 8) important reminders: String num 1234",creates a string of 5 characters int i num. lengthO; strings know their length. i has a value of S the string method charAt returns the character value at the specified location if num.charAt(0)+num.charAt(0)') substring(start) returns a new string having the same characters as the substring that begins at index start of this string through to the end of the string. Index numbers begin at 0. Example num - num.substring(1) will assign the string "1234" to num given int value 5; given num is "1234 num num +value;// num now is the string "12345" Other String operations may be useful. You can also test if a character is a digit with Character.isDigit) Pad Ackermann's function Please create the following menu for the Ackermann project. CSC 202 projects Summer Biglnt class The purpose of the Biglnt class is to solve the problem using short methods that work together to solve the o multiply and divide. My constructor calls a method called setSignAndRemoveltifltls There It receives the string that was se the constructor and sets the boolean variable positive to true or false and then returns a string without the sign that processed by the constructor to store the string in an ArrayList. My public add method does not add. It calls helper methods to do the work. My public multiply method does not multiply. It calls two private methods. One is a multiply method that calls other m to do the actual multiplication. My public divide method does not divide. It calls nine private helper methods that d This is a challenging project that requires information hiding to be successful There are two main programs that you must use. On my website is a demo for the constructor and toString0 method. This demo must be run when you are working on the constructor and toStringd. There is a second Bigint demo for add, subtract, multiply and divide. This demo must be used when you test addition, subtraction, multiplication, division, and modulus. can then be LBY HOME o the work. F1 June 4 Monday: Biglnt constructor and toString0 method. Create a RuntimeException class that throws an exception when the input string does not hold a properly formed integer. June 11 Monday: Bigint addition and subtraction. June 14 Thursday: BigInt multiplication. June 19 Tuesday: Biglnt division and modulus. When you solve this division problem use appropriate SOPO) lines to demonstrate debugging your program BigInt Constructor and toString Considerations Constructors initialize the private data at the point of declaration. The constructor has a String argument. Java code must analyze this string and if it correctly represents a Bigint convert the characters to integers and store them in an Array List or an array Example strings your constructor must correctly deal with are: "100",5 0" +0" "1, 56DDD8456" The last four examples do not represent an integer and must be rejected. A Biglnt consists of a boolean sign and the array or ArrayList holding the absolute value of the number. If an array is used a third variable holding the size of the BigInt must also be included. There should be no other instance variables. hift The algorithm could be: 1) Read a String Shift 2) if the string has a or+ as the first character remove it and set the sign. The String substring0 method can do this. If this is the only character in the string end the program. 3) Use a for loop to work through the string from the end of the string to the front. Store the string characters as integers. The Character wrapper class method isDigitO can make this conversion, or the character can be cast as an integer remembering to subtract 48 from the ASCII value. If a character other than a digit is encountered end the program. 4) Think of the indexes of the ArrayList values going right to left starting with 0. With the string "549" the 9 can be placed int location 0, the 4 in location 1 and the 5 in location 2. With an ArrayList this happens automatically with the add 5) The toString) method creates and returns a String with the sign if it is negative and then adding the ArrayList integers 6) I used a private helper method to test for the sign in the string input, set the sign and make sure the sign was not the only 7) You must be familiar with the String methods to turn a string into integers that can be stored in an array. You then need method. BigInt.add(index). (See ArrayList documentation. I will put some on my website.) starting from the back of the list to the front. character in the input string. You might consider doing this yourself to take the integers stored in an array and turn them back into a string in the toString() method. 8) important reminders: String num 1234",creates a string of 5 characters int i num. lengthO; strings know their length. i has a value of S the string method charAt returns the character value at the specified location if num.charAt(0)+num.charAt(0)') substring(start) returns a new string having the same characters as the substring that begins at index start of this string through to the end of the string. Index numbers begin at 0. Example num - num.substring(1) will assign the string "1234" to num given int value 5; given num is "1234 num num +value;// num now is the string "12345" Other String operations may be useful. You can also test if a character is a digit with Character.isDigit) Pad Ackermann's function Please create the following menu for the Ackermann project

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!