Program to convert number to words

Assignment Help C/C++ Programming
Reference no: EM13946213

Write a program that stores and converts a number entered in Roman numerals to an integer value. Your program must consist of a class named Roman. An object of type Roman must do the following:

1.) Store the number as a Roman numeral,

2.) Convert and store the number also as an integer value,

3.) Print the number as a Roman numeral or integer number as requested by a method call,

4.) Implements a constructor.

So for example, you should be able to write a program that looks something like this:

Roman r = new Roman("MCXIV");

r.printInt(); //prints 1114

r.printRoman(); //prints MCXIV

Roman s = new Roman("CCCLIX");

s.printInt(); //prints 359

The Roman numerals are:

I = 1

V = 5

X = 10

L = 50

C = 100

D = 500

M = 1000

Reference no: EM13946213

Questions Cloud

Identify the full name of the author : Author and title: Identify the full name of the author and the title of the work. Genre: What type of writing is it (op-ed, newspaper article, magazine article, speech, book Excerpt, other)? What's it for
Should the manufacturer pay for an opinion : Calculate the breakeven point in sales dollars using the contribution margin ratio approach. How many pizzas must be sold to earn $60,000 profit per annum before tax?
Electrical heater of problem : Consider the electrical heater of Problem 7.49. If the blower were to malfunction, terminating airflow while the heater continued to operate at 1000 W/m, what tem- perature would the heater assume?
Common practice in chemical processing plants : Common practice in chemical processing plants is to clad pipe insulation with a durable, thick aluminum foil. The functions of the foil are to confine the batt insulation and to reduce heat transfer by radiation to the surroundings.
Program to convert number to words : Write a program that stores and converts a number entered in Roman numerals to an integer value. Your program must consist of a class named Roman.
Evaluate properties-appropriate film temperature : Consider the hot water pipe of Problem 7.56, but under convection coefficient as a function of only !iT = Ts - Too, where Ts is the sensor temperature. Evaluate properties at an appropriate film temperature and show what effect this approximation ..
Finite-difference method of solution : Use the finite-difference method of solution to obtain qf when the convection and radiation coefficients are based on local, rather than average, tem- peratures for the fin. How does your result compare with the analytical solution of part (a)?
Identify two risks in each of these strategies : Buy a system created for another school and modify it to fit this school's specific requirements
Estimate the surface temperature : An electric immersion heater, 10 mm in diameter and 300 mm long, is rated at 550 W. If the heater is horizon- tally positioned in a large tank of water at 20°C, estimate its surface temperature. Estimate the surface temperature if the heater is ac..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd