[C++] Implement a number class to represent integers in accordance with the foll
ID: 3931291 • Letter: #
Question
[C++]
Implement a number class to represent integers in accordance with the following UML class diagram. The number class represents integers. The integer value it represents is passed into the constructor and stored in member variable n. The setValue function takes an integer argument, which it copies into it's private member variable n. The isPrime function returns true if member variable n is prime and false if not prime. The isLucky function returns true if the member variable n is divisible by 7. In the main function of your program, provide test code for the isPrime and isLucky functions. Use assert statements for this purpose. Make sure that your test code executes every line of code in the 2 functions.Explanation / Answer
question is not able to see
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.