Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please implement the following problem in basic C++ code and include detailed comments so that I am able to understand the processes for the solution.

Please implement the following problem in basic C++ code and include detailed comments so that I am able to understand the processes for the solution. Thanks in advance.

image text in transcribed

Design a program that will repeatedly ask the user to enter student ID (9 digit). If the entered IID is less or greater than 9 digits, the program will throw an exception, generate appropriate error message and terminate. Write this program using the following function declaration *Prompts the user to input 9 digit WSU student id and returns the id *If the length of the student id is 9, * a logic error exception is thrown string getID The output of the program should match the following: OSCWINDOWs1system321cmd.exe Please enter your 9 digit WSU student ID: 004380111 ID: 004380111 Please enter your 9 digit Wsu student ID: 004380222 ID: e04380222 Please enter your 9 digit WSU student ID: 0043801 Caught an exception: String length underflow Of type: class std::logic_error Press any key to continue

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2019 Wurzburg Germany September 16 20 2019 Proceedings Part 2 Lnai 11907

Authors: Ulf Brefeld ,Elisa Fromont ,Andreas Hotho ,Arno Knobbe ,Marloes Maathuis ,Celine Robardet

1st Edition

3030461467, 978-3030461461

More Books

Students also viewed these Databases questions

Question

Question 1 1 What is the decimal value of 0 1 1 0 2 ?

Answered: 1 week ago

Question

8. Explain competency models and the process used to develop them.

Answered: 1 week ago