Write a Java program that: 1. Presents a menu of choices to the user. а. It is suggested you use a do..while construct. 2. The first menu choice allows the user to enter the characters filling a 3 by 3 character array. 3. The second menu choice allows the user to display the 3 by 3 character array. 4. The third menu choice allows the user to see a count of the number of legal words present. A legal word is formed by taking the characters of an individual column in the 3 by 3 character array and adding the characters together in row order. a. The Java program should define a String array of legal words. b. The maximum number of legal words detected is 3 as there are only 3 columns. c. Each word comprises three characters. 5. The fourth menu choice allows the user to see a count of the number of legal words (as defined above) which are also palindromes. a. A palindrome reads the same forward and backward. 6. The fifth menu choice allows the user to see a count of the number of anagrams present in an array (created using the first menu choice) which has three legal words (as defined above). An anagram is a rearrangement of the characters in a word and the rearrangement is а. also a legal word. 7. The final menu choice should allow the user to quit the program. 8. Aside from the final menu choice, each other menu choice should invoke a method. The following method headers are suggested. You may also write additional utility methods that support the work of these methods. public static void enterChars(char[][] ch) public static void displayArray(char[0[] ch) public static void wordCount(char[]) ch, String[] words) public static void palindromeCount(char[][] ch, String[] words) public static void anagramCount(char[][] ch, String[] words)
Write a Java program that: 1. Presents a menu of choices to the user. а. It is suggested you use a do..while construct. 2. The first menu choice allows the user to enter the characters filling a 3 by 3 character array. 3. The second menu choice allows the user to display the 3 by 3 character array. 4. The third menu choice allows the user to see a count of the number of legal words present. A legal word is formed by taking the characters of an individual column in the 3 by 3 character array and adding the characters together in row order. a. The Java program should define a String array of legal words. b. The maximum number of legal words detected is 3 as there are only 3 columns. c. Each word comprises three characters. 5. The fourth menu choice allows the user to see a count of the number of legal words (as defined above) which are also palindromes. a. A palindrome reads the same forward and backward. 6. The fifth menu choice allows the user to see a count of the number of anagrams present in an array (created using the first menu choice) which has three legal words (as defined above). An anagram is a rearrangement of the characters in a word and the rearrangement is а. also a legal word. 7. The final menu choice should allow the user to quit the program. 8. Aside from the final menu choice, each other menu choice should invoke a method. The following method headers are suggested. You may also write additional utility methods that support the work of these methods. public static void enterChars(char[][] ch) public static void displayArray(char[0[] ch) public static void wordCount(char[]) ch, String[] words) public static void palindromeCount(char[][] ch, String[] words) public static void anagramCount(char[][] ch, String[] words)
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
This is a question in a textbook, but no example of this type is given. What would an example look like in Java code?
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education