import java.util.Scanner;

public class BaseFour{
  
  public static void main(String[] args){
    
    Scanner scan = new Scanner(System.in);
    String input = "";
    
    // So long as the String input is NOT 1-60 in length,
    //    Ask the user to enter a valid base-4 number up to 60 digits
    //    Save the next line of user input to the variable "input"




    
    
    // If the input string is NOT base-4, tell the user "Bad input!"
    // Otherwise, tell the user "You entered [numeric value of input]"
    // You can call the methods like so:
    //      isBaseFour(input)      This will give you a true or false value
    //      baseFourValue(input)   This will give you a long value



    
  }
  
  private static boolean isBaseFour(String input){
    

    // Go over each character of input
    //      If that single character is NOT '0' or'1' or '2' or '3', return false immediately
    // If you finish going through the characters, return true






    return true;
  }
  
  private static long baseFourValue(String input){
    long result;

    // To start, the exponent is 0 and the next position in 
    // in the input string is the string length minus one.  
    // You already have a long variable to hold your result.







    // While the exponent is smaller than the string length, 
    //     Get the character at the next position in the input string
    //        and store it in a char variable
    //     Subtract '0' (not 0) from that character and multiply 
    //         the result of that subtraction by (long) Math.pow(4, exponent)
    // When the loop is finished, assign the result to the variable "result"






    
    return result;
  }
  
}
You will need to do the following things:
  1. Get a String of input from the user.
  2. Depending on whether the input is valid, announce the number's value; otherwise, let the user know it is bad input.
  3. Write a method to verify whether or not the user's input string is valid.
  4. Write a method to calculate the value of the user's input string.
Note that because of user input, the output will look different each time you run the program. When running the program, you can use this site to check the correctness of your program's solution.

Program output examples:

Enter a valid base-4 number up to 30 digits long:
10131012131
You entered 1167773

Enter a valid base-4 number up to 30 digits long:
120132201
You entered 100257

Enter a valid base-4 number up to 30 digits long:
10121010140013
Bad input!
        
Question: How did the process of editing this program go for you? What were your main challenges and how did you overcome them? What did you learn that may be of use as you move along in this class?