handout #4 CsEl43-Computer Programming II Programming Assign ment #2 due: Thursday, l0ll5l09, 9 pm In this programming assignment we will continue to practice using arrays and classes. You are to implement aclass called Letterlnventory that can be used to keep track of an inventory of letters of the alphabet. Theconstructor for the class takes a String and computes how many of each letter are in the String. This is theinformation the object keeps track of (how many a's, how many b's, etc). It ignores the case of the letters andignores anything that is not an alphabetic character (e.g., it ignores punctuation characters, digits and anythingelse that is not a letter).Your class should have the following public methods. Below is an example of how the add method would be called.Lett.erlnvent.ory inventoryl- = new Letterlnvent,ory("George W. Bush" ) ;Letterlnventory inventory2 = new Letterlnventory( "Barack Obama" ) ;Let.terlnventory surTr = inventoryl
This is the end of the preview. Sign up
access the rest of the document.