date: 2/23/2010 name: William Schmidt amount, dollars: 23 cents: 30 payee: Office Max your check: William Schmidt 10/13/2013 pay to: Office Max $23.30 twenty three and 30/100 dollarsYou may assume that a person always has the first name and last name (no middle names or initials). The payee name is also always two words. The dollar and cent amount are integers and the amount is always less than 100 dollars. Note that the dollar amount could be zero, in which case, when you spell the dollar amount, it should print "zero". The date is always a single (non-white space separated string). Your date, dollar amount in numbers and the word "dollars" have to vertically align.
Hints: You may reuse your code from the number spell assignment to spell out the number of dollars. Putting it in a separate function will make the code more modular. Output appropriate number of spaces in the shorter lines to pad them to the right size so that the information is aligned. Some of the functions from this example program may be useful. To calculate the number of spaces, use the string size() function to compute the size of the strings on the left.
You may reuse the code from the first part of the lab assignment. You may assume that in the input file, the fields are always named the same and the order of the fields is the same. However, the data fields of the file may change. That is, you may not program your assignment such that it only works with the provided example file.
Hints: Note that you can recognize words that denote the names of the fields in the database files such as last name: by comparing them to literal string constants or (simpler) you can just exploit the fixed order of the fields, read these names and immediately discard them. That is, we already know that the name would the the forth and fifth string input and the cent amount is the tenth. So you only need to process the fifth string, the tenth string and so on.