Extra Practice

Create a new Java app using the Command Line Template in IntelliJ.

  1. Write a function that takes in a word. This function should return true if the word is a palindrome and false if it is not. A string is considered a palindrome if it remains unchanged when reversed. For example, "dad" is a palindrome as reverse of "dad" is "dad", whereas "program" is not a palindrome. Note: palindromes are case insensitive ("Dad" and "dad" are both palindromes).

  2. Write a function that takes in a string, omits all vowels and returns a new string that contains only consonants. Make sure to catch the edge cases (e.g. empty string, upper/lower case).

  3. Write a function that takes in a list of countries, swaps the first country with the last one in the list and prints out each of them following the new order. Choose the best collection that gives you access to the first and last element.

Bonus!

Go to google and read about the Object Oriented concepts of Java. Store every concept along with a definition and an example in a suitable data structure. This weekend's reading covers this subject so you could start there!

Double Bonus!

Research about Java Inner classes and the advantages of using them. We'll be touching on these withn the reading this weekend and content this week!

results matching ""

    No results matching ""