Question: in c ++ QUESTION 1(10 pts): Implement the class Price that represents prices in the Jordanian currency (dinars and piasters). The class should have: 1.

in c ++
QUESTION 1(10 pts): Implement the class Price that represents prices in the Jordanian currency (dinars and piasters). The class should have: 1. data members to represent a. dinars (int), amount of dinars, must be >= 0 b. piasters (int), amount of piasters, must be in the range 0 to 99 inclusive 2. A parametrized constructor Price (with appropriate validation) 3. Appropriate setters for all data members (with appropriate validation, force user to input correct values) 4. Getters for all data members 5. void printPrice, a member function to print the prize in JD and piasters Submit two files for this part, price.h (for the class interface) and price.cpp (for the class implementation)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
