Location: Sunnybank, Australia
Member since: September 2011
Here's your Assignment:I recently received a spam e-mail, which inspired this assignment. Write a program to randomly select strings from text files, to fill in this template:Greetings ,My name is , and I would like to present you with a business opportunity that offers the potential for considerable earnings.I work for a privately held manufacturing company. My company currently purchases a specific product vital to its processing operations at over 150 percent of the manufacturing cost. In my proposed business venture, you would act as a stand-in supplier, providing this key material while retaining the same profit margins. My role would be to introduce you to my company as the supplier and to obtain a contract between you and my employer.I understand that your experience as a/an with doesn't directly relate to my field. However, this venture is more in line with your personal capabilities rather than your professional experience, and I would like to call you to further discuss the details of this opportunity.I would like to confirm your current phone number . I respectfully request a return email to verify your contact number and to schedule the most convenient time to phone you. I look forward to speaking with you soon.Kindest Regards,Your program should select a Sender, a Recipient, an Occupation, and an Employer, randomly from separate text files (occupations.txt and employers.txt are provided, you must write the other two). The phone number should pick an area code from a file (which you will write), and randomly generate a seven-digit phone number. Your program must then write the complete message to another text file. Submit a zip file of your finished project folder here by 11:59 p.m. on Nov. 12, 2011.Make the article (a/an) correct for the occupation (i.e. a Banana Gasser, an Elephant Trainer).Here's the algorithm you need to follow:Your Form should have combo boxes for Sender, Recipient, Occupation, Employer, and Area Code.Populate each ComboBox with the strings from one of the files (you have been given two of them, you need to write the rest, use Notepad for this).Code to populate a ComboBox (place in the Form1_Load event handler): StreamReader reader = new StreamReader(@'c:\occupations.txt'); while (!reader.EndOfStream) { string occupation = reader.ReadLine(); occupationComboBox.Items.Add(occupation); }This of course assumes that your ComboBox is named occupationComboBox. You can populate the rest with similar code. Then add a Generate Message button to your Form. When clicked, it will take the values selected in the ComboBoxes, and generate the text of the message:string message = '';message += 'Greetings ' + recipientComboBox.SelectedValue + ',' + Environment.NewLine;message += 'My name is ' + senderComboBox.SelectedValue + ', and I would like to present you with a business opportunity';message += ' that offers the potential for considerable earnings.';List of Employers the program should use:Missouri Baptist UniversityTyson FarmsIBMMicrosoftDole ProduceAston MartinFord Motor CompanyIntel CorporationApple ComputersList of Occupations:Phesant PluckerRealtorProfessorDoctorElephant TrainerBanana GasserChick SexerUnderwear ModelRock StarAuto MechanicGOOD LUCKS
BE (MEE) (Hons)
Griffith University
2001-2005
Bachelor of Engineering (Hons) in Microelectronic Engineering
Griffith University