a. Write a program that translates a text to Fake Latin and back. English is translated to Fake Latin by taking the first letter of every word, moving it to the end of the word and adding ‘ay’ to each word.
As an example, if your program reads from the keyboard the string “The quick brown fox” then it should print on the screen the following text: “Hetay uickqay rownbay oxfay”.
You should also implement the reverse of this, reading “Iay ikelay rogrammingpay” should print on the screen “I like programming”.
b. Write a Java program to display Pascal’s triangle for a number of rows (you read from the keyboard the number of rows).
Here
you have more information about Pascal’s triangle for your review.
Input number of rows: 5Expected Output : 1 1 1 1 2 1 1 3 3 11 4 6 4 1 DUE DATE February 28th, 2023 at midnightPlease submit only the .java file(s) that solve the problem and do not forget to include your details as comments in the first few lines of the source-code as comment.