Question
90. Write a class (and a client class to test it) that encapsulates the value of the 26 letters of the English alphabet in the
90. Write a class (and a client class to test it) that encapsulates the value of the 26 letters of the English alphabet in the game of Scrabble in 10 countries. You should have three instance variables:
-
a two-dimensional array of integers representing the point values of the letters in the various countries
-
a single-dimensional array representing the alphabet from a to z
-
another single-dimensional array representing 10 countries
For the two-dimensional array, dimension 1 represents the letter and dimension 2 represents the country. Your constructor can simply be a default constructor, randomly generating the values between 1 and 10. You should include the following methods:
-
a method returning an array of letters with their highest point value in any country
-
a method printing the names of the countries that have at least one letter with a point value of 10
-
a method taking a String as a parameter and printing the score of the word represented by that String in every country
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started