In: Computer Science
Write two classes Class A and Class B in class A you should read from the keyboard a number and you should call a public method of the class B that will print on the screen whether the number that was read from the keyboard in class A is multiple of 7 and has the last digit 5.
There can be multiple approches to this problem, One such approch is using inheritance, where class A inherits class B. This will in turn give class A the ability to use class B functions.
I have implemented the above program in c++ and python.
Python implementation
C++ Implementation