Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using Java programming language. st Day Accepted (with 15 point penaltyy3-12-2020 mis assignment set has 2 programs. Please attach both to the link for grading,
Using Java programming language.
st Day Accepted (with 15 point penaltyy3-12-2020 mis assignment set has 2 programs. Please attach both to the link for grading, rogram 1 (Saving/Loading Files, and then Recursion 65 points) This program can be a JFrame or Console application. That is up to you on this one. Create a text file and store it in a place your java application can find it in the same folder as your class files or source files where the path of the application should find it) or plan on using the FileChooser tool from Chapter 15. Then create your java application that does the following Part 1 (15 of the 65 points) The Java Application should read the word stored in the text file and store it in a string variable. Part 2 (35 of the 65 points) Complete Excercise 18.14 on page 787 to test if the word is a palindrome or not. It has to be a Recursive Method to do this. (Hint: Use the tools you know from working with strings. Pass the string and also two numbers for the positions in front and back that you are currently on. Find out how big it is from using the length of the length) method on the string variable from part 1. pass that variable, o for the starting position and the length of it to the method the first time it is called....Now figure out what you do inside it.) Part 3 (15 of the 65 points) The program should report whether the word was a palindrome or not to the user by writing a message into a text file (and a different one from the original.) You can have it show on the screen to the user if you would like, but make sure to write it to a text file because demonstrating that you can write to a file is this part of the assignment. 25 int public static void main(String[] args) { int[] array = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10): String results = someMethod(array, 0); System.out.println(results); } 17 18 } 18.14 (Palindromes) A palindrome is a string that is spelled the same way forward and backward. Some examples of palindromes are "radar," "able was i ere i saw elba" and (if spaces are ignored) "a man a plan a canal panama." Write a recursive method testPalindrome that returns boolean value true if the string stored in an array is a palindrome and false otherwise. The method should ignore spaces and punctuation in the string. (Hint: String method toCharArray gets a char array contain- ing the String's characters.] 18.15 (Eight Queens) A puzzler for chess buffs is the Eight Queens problem, which asks: Is it pos- sible to place eight queens on an empty chessboard so that no queen is "attacking any other (i.e., no two queens are in the same row, in the same column or along the same diagonal)? For example 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