facebook messenger
WhatsApp
Hi there πŸ‘‹
Struggling with Assignments?

Our experts can help you!
Get Quote

We are here to help.

Chat with our expert writers on WhatsApp

for any kind of assignment queries.

Click to chat!
Struggling with Assignments? WhatsApp Us
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


Thank You!

We will get back to you as soon as possible.


Your friends could use our help too! Tell them about us also!