//integer value to keep track of the score as it is added up
intscore=0;
//nested for loop cycles through each letter of aWord and each character in the alphabet array
for(intj=0;j<aWord.length();j++){
for(inti=0;i<26;i++){
// if statement compares the letter of aWord that j points to, with the letter of the alphabet that i points to.
if(aWord.charAt(j)==alphabet[i]){
//if the characters are equal, then the relevant score for that character is found in the scores array using the index of the character in the alphabet array
//it is then added to the score value
score=score+scores[i];
}
}
}
//score is returned
returnscore;
// 03 -Scrabble Score
// Complete this method so that it returns the scrabble score for the word in aWord
// In scrabble each letter is worth a number of points and each word is worth the
// sum of the scores of the letters in it. For this assignment we will ignore
// double/treble letter/word bonuses.
// The English language points per letter can be found at