There is a belief that if all digits of a house number were added up together to have only ONE digit, which is a special digit that could be in the range from 1 to 9, and carries a special meaning as well.

The special digits and their meanings are described in the following table:

Special Digit Meaning
1 Bingo! Lucky House
2 For You! Sweet House
3, 4, 5, 6 Normal! Formal House
7 Heaven! Dream House
8 Faith! Holy House
9 Fine! Well House

Write a C++ program, with OOP style, that asks user to enter a house number, then calculates and displays on screen its special digit, in word (i.e. eight not 8, or four not 4 see in Required Output), and the corresponding meaning as described in the above table.

Allow your program continues to run until user wants to quit it.

Your full name must be displayed (only) before the termination of the program.

NOTE:

  • Your program must not be crashed at run time by any reason, and must avoid infinite loop.
  • All illegal house number entered that is not a whole number (including empty value) must be rejected with a corresponding error message.
  • The below Required Output is exactly required in the display on screen.
  • Sample Testing Data and Required Output:
Entered Number Required Output Reason
8045 It is eight, “Faith”, Holy House! 8+0+4+5 = 17 = 1+7 = 8
327 It is three, “Normal”, Formal House! 3+2+7 = 12 = 1+2 = 3
11497 It is four, “Normal”, Formal House! 1+1+4+9+7 = 22 = 2+2 = 4
4420 It is one, “Bingo”, Lucky House! 4+4+2+0 = 10 = 1+0 = 1
Oops! No value entered? Empty value
123abc ERROR! It must be an integer! Illegal house number
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.