Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective: Write a program called userInfo.cpp that will accept the data shown in Table 1 from the user and verify whether they meet the criteria

image text in transcribed

Objective: Write a program called userInfo.cpp that will accept the data shown in Table 1 from the user and verify whether they meet the criteria described. Once the user has provided the inputs correctly output the message "Results Ok!". Each validation step must use a function that you have created. You must validate each input individually, i.e. you should get the First Name and validate it and then move onto Middle Name only if the First Name is valid Table 1 User input and validation criteria Input from user First Name Criteria it must satisfv Must not have less than 2 characters or more than 10 characters. The first name must start with a capital letter and all other characters must be lower case letters. The first name must not have any numeric digits or special characters Is optional, but the user must tell you none if they don't want to provide a middle name. If the user provides a middle name other than none, it must not have less than 2 characters or more than 10 characters. The middle name must start with a capital letter and all other characters must be lower case letters. The middle name must not have any numeric digits or special characters Must not have less than 2 characters or more than 10 characters. The last name must start with a capital letter and all other characters must be lower case letters. The last name must not have any numeric digits or special characters Must be 2 characters exactly, and both must be uppercase Must be 5 characters exactly, all must be digits. You must also validate that the zip code is a valid zip code. To validate the zip code, you must check whether the first three digits (i.e. the prefix) of the zip code match the list of valid prefix codes. A list of valid zip code prefixes can be downloaded by entering the following command on Polaris wget tars.clarkson.edu/cs141/hw3/zipcodes.txt Middle Name Last Name State Code Zip Code Phone Number Must be either in the form: (123) -456-7890 or 123-456-7890. You must make sure all the digits are numbers

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

Step: 3

blur-text-image

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

Seven NoSQL Databases In A Week Get Up And Running With The Fundamentals And Functionalities Of Seven Of The Most Popular NoSQL Databases

Authors: Aaron Ploetz ,Devram Kandhare ,Sudarshan Kadambi ,Xun Wu

1st Edition

1787288862, 978-1787288867

More Books

Students also viewed these Databases questions

Question

Define sensory adaptation.

Answered: 1 week ago