Roman numerals to a positive integer

Assignment Help Basic Computer Science
Reference no: EM13520236

Write a program that converts a number entered in Roman numerals to a positive integer. Your program should consist of a class, say, romanType. An object of type romanType should do the following:
a. Store the number as a Roman numeral.
b. Convert and store the number as a positive integer. Print the number as a Roman numeral or positive integer as requested by the user.
c. Print the number as a Roman numeral or positive integer as requested by the user.

The integer values of the Roman numerals are:
M 1000
D 500
C 100
L 50
X 10
V 5
I 1

d, Test your program using the following Roman numerals: MCXIV, CCCLIX, MDCLXVI.

Reference no: EM13520236

Questions Cloud

Prepare a cost of goods sold statement : Prepare a cost of goods manufactured statement and prepare a cost of goods sold statement.
Write a c++ program to help a local restaurant automate : Write a C++ program to help a local restaurant automate its breakfast billing system. The program should do the following:a. Show the customer the different breakfast items offered by the restaura
State the noble gas abbreviation ground state electronic : Write the noble gas abbreviation ground state electronic configurations for Ag and for Ag+. which is paramagnetic
How to estimate the constant-volume molar heat capacity : Use the equipartition theorem to estimate the constant-volume molar heat capacity of (a) I2, (b) CH4, (c) C6H6 in the gas phase at 25oC.
Roman numerals to a positive integer : Write a program that converts a number entered in Roman numerals to a positive integer
Determine the impedance at given frequency : A series RLC circuit consists of a 42.0 ? resistor, a 2.70 mH inductor, and a 460 nF capacitor. Determine the impedance at frequency 3000 Hz
Define the complete balanced molecular and ionic : Write the complete balanced molecular, ionic, and net ionic equations for the reaction of potassium phosphate + aluminum nitrate. Which product, if any, is a precipitate
Linear cost relation of the cost-volume-profit model : The linear cost relation of the cost-volume-profit model for a single-product firm, and use the following answer key:
Depict the structure for the major diels-alder product : Draw the structure for the major Diels-Alder product of the reaction betwen 1,3-cyclohexadiene and fumaric acid, the trans isomer of maleic acid.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Write a java application called newtetristhat

A user can add tetriminos into the middle band tocreate a meaningful shape. A tetrimino that is no longer useful can be deleted byputting it into the bottom band.

  Write program calculates and prints the average several int

Write a program that calculates and prints the average of several integers. Assume the last value read with scanf is the sentinel 9999

  Information system to use for stocks and trading futures

Write down some of the many considerations in selecting right information system to use for trading futures and stocks?

  Nonlinear regression equation converted in linear regression

Illustrtae how nonlinear regression equation Y = AX**B can be converted into linear regression equation solvable by method of Least Squares.

  Find probability of having no umbrella if it rains

When rain is forecast, Mr. Pickwick takes his umbrella. When rain is not forecast, he takes it with  probability 1/3. Find the probability that Pickwick has no umbrella, given that it rains.

  What bit pattern will be in memory cell

What bit patterns will be in registers 0, 1, and 2 when the machine halts? What bit pattern will be in the memory cell at address 30 when the machine halts?

  Networks present of opportunities for security challenges

1. Networks present a lot of opportunities for security challenges. What type of network are you on, and what security elements are employed? Are they effective? Why or why not?

  Evaluate an expression and display one value

What function would you use in Access to evaluate an expression and display one value when the expression is true, and another value when the expression is false?

  Determine smallest value of x for which is safe state

System has 4 processes and 5 allocatable resources. The current allocation and maximum needs are as follows: Determine the smallest value of x for which this safe state.

  Write the definition of a class counter containing

Write the definition of a class Counter containing: An instance variable named counter of type int An instance variable named limit of type int . A constructor that takes two int arguments and assigns the first one to counter and the s..

  Techniques attacker use to access information on system

Recognize all potential security threats on home personal computer. Recognize some of techniques the attacker might use to access some information on system.

  Determining most effective it projects

Not sure what will suit their requirements in achieving better organization between branches by updating their information systems. What will you suggest they do to find out most effective IT projects?

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