Question: For lab 7 , use C + + to work on the file: CS 3 1 1 _ lab 7 _ spring 2 0 2
For lab use C to work on the file: CSlabspringcpp and finish the two questions. I do not know how to throw exceptions or use recursion. Also, assume I don't know how to program. Please explain every step even things you think I should know
Question : Exception handling
Finish all the TODOs from CSlabspringcpp
Questions : Recursion
Finish all the TODOs from CSlabspringcpp
CSMWSpringcpp : This file contains the 'main' function. Program execution begins and ends there.
#include
TODO: included header files as needed:
TODO: created a class: AccountLocked.
Inside this class, override the what function and
return the message: "Your account is locked! Contact the admin."
TODO: before the main function create a function: login
throw the exception: AccountLocked we just created.
TODO: build a function for reversing a string loop:
TODO: Definition of recursive function
int main
TODO: in the main call login catch the exception.
Account Locked
TODO:use the code to test your question solution:calling reverse function using some strings
std::cout "Reverse of 'ABCD': reverseStringABCD std::endl;
std::cout "Reverse of 'Hello': reverseStringHello std::endl;
std::cout "Reverse of 'Bye': reverseStringBye std::endl;
std::cout "Reverse of 'ABCD': reversestringrecABCD std::endl;
std::cout "Reverse of 'Hello': reversestringrecHello std::endl;
std::cout "Reverse of 'Bye': reversestringrecBye std::endl;
return ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
