Problem Statement
The sentence "A quick brown fox jumps over the lazy dog" contains every single letter in the alphabet. Such sentences are called pangrams. You are to write a method getMissingLetters, which takes a String, sentence, and returns all the letters it is missing (which prevent it from being a pangram). You should ignore the case of the letters in sentence, and your return should be all upper case letters, in alphabetical order.
Definition
- Class:
- MissingLetters
- Method:
- getMissingLetters
- Parameters:
- String
- Returns:
- String
- Method signature:
- String getMissingLetters(String sentence)
- (be sure your method is public)
Constraints
- sentence will contain between 0 and 50 characters, inclusive.
- Each character of sentence will have ASCII value between 32 and 126, inclusive.
Examples
"A quick brown fox jumps over the lazy dog"
Returns: ""
This sentence contains every letter."A slow yellow fox crawls under the proactive dog"
Returns: "BJKMQZ"
"Lions, and tigers, and bears, oh my!"
Returns: "CFJKPQUVWXZ"
""
Returns: "ABCDEFGHIJKLMNOPQRSTUVWXYZ"