Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a function named testPassword that takes string as a paramenter. Define this function to test if the string contains characters such as # ?

Write a function named testPassword that takes string as a paramenter. Define this function to test if the string contains characters such as "#" "?" and "@." If it contains any of these then throw the string containing these 3 characters.

Part 2: write a main code where you use the try and catch format to check if password contains these characters. If so then print "error invalid characters" using cout statement.

***Please do it in C++***

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

More Books

Students also viewed these Databases questions