Question: Using C++ language As a software programmer in a financial institution, you have been asked to develop a program that converts dollar amounts between $0

Using C++ language

As a software programmer in a financial institution, you have been asked to develop a program that converts dollar amounts between $0 and $9,999 from numbers to words. The program will only accept whole numbers. For instance, it takes $815 and converts it into eight hundred fifteen.

Design a class called Converter to be used in this program. The class should have one integer member variable; int value, and a static array of string objects that specifies how to convert dollar amounts into the desired format. For example:

string below20[20] =

{"zero", "one", ..., "eighteen", "nineteen"};

string hundreds = "hundred;

string thousands = "thousand";

The Converter class will include a constructor that accepts a nonnegative integer to initialize the Converter object. The class will also include a member function display() that displays the word description of the Converter object. The class will be used in a main function that asks the user to enter a number within the specified range and then displays the word description.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!