CPTR 124 Fundamentals of Programming


In this lab you work with the C++ string data type.


Problem Statement

It is said that teletype operators, after establishing a connection, would type the line:

THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG

They used this line because it contains every letter of the alphabet. Write a program to test lines entered by the user to see if they have the same property.

When run, your program should request a line of input from the user and check to see if it contains all the letters of the English alphabet. The input line will consist of uppercase letters and spaces only. You do not need to check for bad input. No line will contain more than 80 characters. The user is able to check multiple lines, and enters a line containing a single period (.) when finished.

For each line entered, the program displays a report of the missing letters, if any. If the line used all the letters of the alphabet, the program prints "Missing letters: None"; otherwise, it prints "Missing letters: " followed by the list of letters omitted from the line of text. See the sample run below for examples of the exact presentation of the output.

Sample Run


NOW IS THE TIME FOR ALL GOOD MEN TO COME TO THE AID OF THEIR COUNTRY
Missing letters: BJKPQVXZ
Enter line to check (single "." terminates)
THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG
Missing letters: None
Enter line to check (single "." terminates)
ABCXYZ
Missing letters: DEFGHIJKLMNOPQRSTUVW
Enter line to check (single "." terminates)
.

Check out

Your finished program will be evaluated for correctness and compliance. Once you have been checked out you may submit your code to eclass.