Question: no scanner mehtod use the starter code and explain how the code will work For this problem, we will assign each letter in the alphabet

For this problem, we will assign each letter in the alphabet to a number: a>1,b>2,c>3,,z>26. A balanced word is a word where the sum of the letters on the left-hand side of the word equals the sum o the letters on the right-hand side. Create a function named isBalanced that receives a single String as a parameter, then returns true if it is balanced and false if it is not. For odd-length words, the middle character (balance point) is ignored. Header: boolean isBalanced( String word) \{ // Type code here Example Input/Output: - Input: "zips" Output: true // "zips" "zi ps" 26+916+193535 true - Input: "brake" Output: false / "brake" "br ke" 2+1811+52016 false Notes: - All Strings will contain only lowercase letters 2. static boolean isBalanced( string word) \{ 1 - public class MyClass \{ 3 I/ WRITE CODE HERE 3 public static void main(string args[]) \{ II TEST CODE HERE
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
