Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

program C/C++ for an email system char emailAddresses[25][50] = {A|matloff@yahoo.ca|Marta Allison0, A|eurohack@yahoo.com|Jake Guzman0, A|cgreuter@verizon.net|Colin Bridges0, A|jramio@yahoo.com|Jody Owen0, A|kwilliams@ g.mail.com|Vera Conner0, A|gknauss@ g.mail.com|Bernard Stone0, A|sakusha@verizon.net|Josh Tran0,

program C/C++ for an email system

char emailAddresses[25][50] = {"A|matloff@yahoo.ca|Marta Allison\0", "A|eurohack@yahoo.com|Jake Guzman\0", "A|cgreuter@verizon.net|Colin Bridges\0", "A|jramio@yahoo.com|Jody Owen\0", "A|kwilliams@ g.mail.com|Vera Conner\0", "A|gknauss@ g.mail.com|Bernard Stone\0", "A|sakusha@verizon.net|Josh Tran\0", "A|smpeters@outlook.com|Krista Lewis\0", "A|pgottsch@yahoo.ca|Andres Sanchez\0", "A|lahvak@comcast.net|Wanda Wilkerson\0", "A|seasweb@comcast.net|Sheldon Hampton\0", "A|fwitness@att.net|Aubrey Morgan\0", "A|privcan@live.com|Dan Abbott\0", "A|isorashi@att.net|Beatrice Maxwell\0", "A|maneesh@yahoo.com|Leonard Butler\0", "A|mrdvt@me.com|Gina Norris\0", "A|kassiesa@aol.com|Pedro Peterson\0", "A|ijackson@sbcglobal.net|Andy Mclaughlin\0", "A|goldberg@yahoo.com|Jodi Munoz\0", "A|salesgeek@comcast.net|Francis Woods\0", "A|ehood@me.com|Jennifer Bryant\0", "A|lstaf@verizon.net|Delores Mendoza\0", "A|sekiya@me.com|Jimmy Kelly\0", "A|dalamb@verizon.net|Abel Harmon\0", "A|amichalo@yahoo.ca|Wilson Robertson\0"}; char *messages[5] = { "PFrom: Processing Center To: %s Subject: Your Photos Hello %s, Your photos are ready to pickup. Thank You. Processing Team\0", "FFrom: Wilma Theater To: %s Subject: Fiesta Celebration Dear %s, Just a reminder that the Fiesta Party is this weekend at the Theater. Thank You Organizers\0", "LFrom: Betty Nugera To: %s Subject: Pot Luck tonight Hey %s, Guys, so as planned we are meeting at Betty's at 7:00 this evening. Thanks David\0", "BFrom: City Hospital To: %s Subject: Past Due Bill Dear %s, There is a past due bill payment. Please contact city hospital. Thank You City Hospital Billing Center\0", "EFrom: UTSSA Enrollments To: %s Subject: UTSSA Enrollments, Hello %s, UTSSA Fall enrollments starts June 01. Thank You UTSSA Enrollments Center\0"};

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

1. a. Start a new.c/cpp file. At global level, define the two string arrays (emailaddresses and messages) given to you (emailsandmessages.txt) b. define the following structure at global level struct Credentials ( char userEmail[25]; char userFullName[30]; char emailMsg [220]; b; 2. Next, a. In the main () open a file in binary append mode to write structure Credential instances b. Then ask the user to enter number of emails to be sent (see example in figure 1) and then store it. If the user entered a number not within the asking range, show an error message and ask to reenter /assignment08. exe nter Number of Emails to be sent (Enter a number between 1 and 5) Figure 1 3. Next ask for the type of email to be sent. See the example below (Figure 2). Let the user enter the choice Again, if the user entered an option other than (P, F, L, B, E) then show an error and ask for the option again Select Email Type to send P Photo Processing F Fiesta Celebration L Pot Luck Party Tonight B Past due hospital bill E UTSSA Enrol1ments Enter Option: Figure 2 4. If you look at the messages array given to you, the first character in each message matches the menu's option character. For example following ls one item from messages array. See the first character 'F matches with the menu's 'Fiesta Celebration' message "FFrom: Wilma Theater To: %s Subject: Fiesta Celebration Dear %s,injust a reminder that the Fiesta Party is this weekend at the Theater nnThank You Organizers1e" 1. a. Start a new.c/cpp file. At global level, define the two string arrays (emailaddresses and messages) given to you (emailsandmessages.txt) b. define the following structure at global level struct Credentials ( char userEmail[25]; char userFullName[30]; char emailMsg [220]; b; 2. Next, a. In the main () open a file in binary append mode to write structure Credential instances b. Then ask the user to enter number of emails to be sent (see example in figure 1) and then store it. If the user entered a number not within the asking range, show an error message and ask to reenter /assignment08. exe nter Number of Emails to be sent (Enter a number between 1 and 5) Figure 1 3. Next ask for the type of email to be sent. See the example below (Figure 2). Let the user enter the choice Again, if the user entered an option other than (P, F, L, B, E) then show an error and ask for the option again Select Email Type to send P Photo Processing F Fiesta Celebration L Pot Luck Party Tonight B Past due hospital bill E UTSSA Enrol1ments Enter Option: Figure 2 4. If you look at the messages array given to you, the first character in each message matches the menu's option character. For example following ls one item from messages array. See the first character 'F matches with the menu's 'Fiesta Celebration' message "FFrom: Wilma Theater To: %s Subject: Fiesta Celebration Dear %s,injust a reminder that the Fiesta Party is this weekend at the Theater nnThank You Organizers1e

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Accidental Data Scientist

Authors: Amy Affelt

1st Edition

1573877077, 9781573877077

More Books

Students also viewed these Databases questions

Question

x-3+1, x23 Let f(x) = -*+3, * Answered: 1 week ago

Answered: 1 week ago

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago