dcsimg
PERSONALISED LETTER GENERATOR APLLICATION
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Learabea_onkabetse
Posted On:   Saturday, May 6, 2006 05:12 AM

I have been given an exercise to write a program that creates "personalized" letters, given a form letter and persons’ names. The form letter will be an input file of text. The names of the people to send the letter to will come from another file where they are stored one per line. The file will contain normal text, but with a * wherever a person's name should be substituted. For example: Dear **, I have exciting news for you, *!!! For just P99.99 you, *, can be the proud owner of a genuine Sonny hands-free phone! *, you don’t need to stay put at one point to answer a phone call. This offer is just for three days! Act Soon, Vulture Marketing Corp. Note   More>>

I have been given an exercise to write a program that creates "personalized" letters, given a form letter and persons’ names. The form letter will be an input file of text. The names of the people to send the letter to will come from another file where they are stored one per line. The file will contain normal text, but with a * wherever a person's name should be substituted.


For example:


Dear **,
I have exciting news for you, *!!! For just P99.99
you, *, can be the proud owner of a genuine Sonny
hands-free phone! *, you don’t need to stay put at one
point to answer a phone call. This offer is just for
three days!
Act Soon,
Vulture Marketing Corp.

Note the two asterisk for the full name of the recipient.
The above is in a file named “letter.txt” and the names of the customers
are in a file named “customers.dat”

A run of the program outputs for a customer called Tshepiso Mokomaditlhare

Dear Mr Tshepiso Mokomaditlhare,
I have exciting news for you, Mr Mokomaditlhare!!! For just
P99.99 you, Mr Mokomaditlhare, can be the proud owner of a
genuine Sonny hands-free phone! Mr Mokomaditlhare, you don’t
need to stay put at one point to answer a phone call.
This offer is just for three days!
Act Soon,
Venture Marketing Corp.





I would be pleased if i can be helped.looking forward for a better response. From, Gaborone,Botswana

   <<Less

Re: PERSONALISED LETTER GENERATOR APLLICATION

Posted By:   WarnerJan_Veldhuis  
Posted On:   Saturday, May 6, 2006 03:42 PM

have a look at String.replace() and the java.util.regex.package
About | Sitemap | Contact