We are going to sell a collection of individual plastic characters that
customers will buy and place on their mailboxes to spell out their addresses.
We have a String[] of "typical" addresses and want to be able to compare a proposed
collection to these addresses and determine how many are impossible to form from
our collection.
We will count an address as impossible if it cannot be formed from our entire collection
of characters. Space characters in an address can always be formed because the customer can form spaces by placing our plastic characters as he
wishes.
Create a class Mailbox that contains a method impossible that is given a String
collection and a String[] address and that returns the number of elements in address that
are impossible to form from the given collection of characters.
|