hello guys i have a favour to ask i would like to help me out with this problem ..

4) Write a method binaryToDecimal that takes a string as argument (the string consists of a sequence of ’0’ and ‘1’ characters representing the binary representation of a number) and returns an integer with the decimal value of the number. The decimal value of a number with the binary representation of the form may be computed as . Use the method above to write a program that takes a command line argument N followed by N strings representing binary number representations and prints their decimal values.