Write a program to use a letter template file to create a set of letters with the same content, but directed to different people. Design, define and use a function to create letters (let's call it createLettersFromTemplate) and a main function that will call createLettersFromTemplate. What parameters/return value will you define for this function?
Each letter should be placed in a separate file, named with the name of the addressee and extension.txt
File names.txt contains a list of names in Lastname, firstname format, e.g.
Mikelson, Carina
Chien, Towanda
Oser, Jamaal
Grist, Doreen
...
File letter.txt contains the content of the letter, as follows:
Dear Joe:
You are cordially invited to a neighborhood party that will take place on Sunday, October 14 at 79 Henry Street from 3 to 6 pm.
Hope to see you there!
Tom and Jerry,
your friendly neighbors.