String loginID and integer userAge are read from input. Complete the try block to output…
Jump to turn (9)
- 1String loginID and integer userAge are read from input. Complete the try block t
- 2#include #include using namespace std; int main() { string loginID; int userAge;
- 3Two strings, code1 and code2, are read from input as two states' codes. headObj
- 4Integer rabbitCount is read from input as the number of input values that follow
- 5Integer rabbitCount is read from input as the number of input values that follow
- 6Multiple integers are read from input and inserted into a linked list of WeightN
- 7#include using namespace std; class BearNode { public: BearNode(int cubsValue);
- 8Complete the BearNode class destructor. The destructor prints "Deallocating Bear
- 9DO NOT EXPLAIN, GIVE THE CODE ONLY FOR / Your code goes here / The program reads
- User
String loginID and integer userAge are read from input. Complete the try block to output loginID followed by ": Profile created" with error checking:
If loginID's length is < 4 or > 8, throw a runtime exception with the message "User name's length must be between 4 and 8". If userAge is > 55, throw a runtime exception with the message "Age must be no more than 55". Ex: If input is Ralitza 19, then the output is:
Ralitza: Profile created Ex: If input is Yu 19, then the output is:
Error: User name's length must be between 4 and 8 Ex: If input is Ralitza 56, then the output is:
Error: Age must be no more than 55 Note: loginID.length() returns the length of string loginID.
- Assistant