Please solve usnig c++ programming language. Number Converter Program as described in the UML has the following functionality. 1. Read a number from the user and find its base. If number is exceeding the limit of 16-bits, ask user to re-enter the number. Use parameterized constructor Conversion(char *) to initialize the data member. int FindBase(char []); There are a few assumptions. i) If all digits of a number are 0 or 1, the number is binary. For example, 1010 will be considered a Binary number only. ii) A hexa-decimal number must have letter A, B, C, D, E or F. Otherwise the number will not be considered a hexa-decimal. iii) Decimal number must have minimum one digit greater than 7. Otherwise, the number can be considered as Octal if it does not meet the criteria in point no. i and ii. 2. Converting the number to Binary if the number is not Binary.
Please solve usnig c++ programming language.
Number Converter Program as described in the UML has the following functionality.
1. Read a number from the user and find its base. If number is exceeding the limit of 16-bits,
ask user to re-enter the number. Use parameterized constructor Conversion(char *) to
initialize the data member.
int FindBase(char []);
There are a few assumptions.
i) If all digits of a number are 0 or 1, the number is binary. For example, 1010 will be
considered a Binary number only.
ii) A hexa-decimal number must have letter A, B, C, D, E or F. Otherwise the number will
not be considered a hexa-decimal.
iii) Decimal number must have minimum one digit greater than 7. Otherwise, the number
can be considered as Octal if it does not meet the criteria in point no. i and ii.
2. Converting the number to Binary if the number is not Binary.
char * ToBinary(char *);
3. Converting the number to Octal if the number is not Octal.
char * ToOctal(char *);
4. Converting the number to Hexa-decimal if the number is not Hexa-decimal.
char * ToHexaDecimal(char *);
5. Converting the number to Decimal if the number is not Decimal.
char * ToDecimal(char *);
Note: You may convert char * to char [] etc. within a function but function parameters and
return type cannot be changed.
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)