Order Now
whatsapp
sample banner

209 Downloads

Question

Create the roman.h and implement the Roman class in roman.cpp. Make sure that you put in measures to prevent multiple inclusion of the header file. Test your implementation using task2a.cpp

Answer

#include"Number.h"
#include
#include
#include
#include
#include
Number::Number()
{
  number = 0;
  int_to_EURO();
  int_to_US();
}
Number::Number(int n) {   number = n;   int_to_US();   int_to_EURO(); } void Number::int_to_US() {   stringstream ss;   ss.imbue(locale(""));   ss << fixed << number;   US = ss.str(); } void Number::int_to_EURO() {   stringstream ss;   ss.imbue(locale(""));   ss << fixed << number;   EURO = ss.str();   replace(EURO.begin(), EURO.end(), ',', '.'); } string Number::get_US_style() const {   return US; } // Returns int as a string in Euro style. string Number::get_EURO_style() const {   return EURO; } // Returns the int. int Number::get_number() const {   return number; } // Sets the value of int, US, and EURO. void Number::set_number(int n) {  number = n;  int_to_US();  int_to_EURO(); }
Download Full Sample Here
HIRE EXPERT
Email ID *
Subject
Pages
Deadline