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

  What functions does the ciso perform

What functions does the CISO perform? What are the key qualifications and requirements for the position?

  Write a mips program to complete the following functions

Write a MIPS program to complete the following functions. You must write comments and follow the register convention.

  Explain two standard apis supported by jaxp

Explain two standard APIs supported by JAXP (Java API for XML processing) and give a comprison between two mechanism.

  Create a data file in the specified format

Create a data file in the specified format. Write a script that would read from the file floatnums.dat into a matrix, round the numbers, and write the matrix in the desired format to a new file called "intnums.dat."

  Which of the following input technologies has been

1. telewire a mobile manufacturer offers free connections to customers who buy its mobile phones. this cost of

  Methods-majority of target audience can play applications

What are some methods that we can guarantee that majority of target audience can play applications?

  Can you imagine any multilevel computer not lowest levels

can you imagine any multilevel computer in which the device level and digital logic levels were not the lowest levels? explain

  Write a program that prompts the user for a measurement

write a program that prompts the user for a measurement in meters and then converts it to miles, feet and inches.

  How many frames are destroyed

In a Standard Ethernet LAN, the average size of a frame is 1000 bytes. If a noise of 2 ms occurs on the LAN, how many frames are destroyed? Also repeat this problem with Gigabit Ethernet LAN.

  Expalin programs like ping and some of scanning tools

When using programs such as ping and some of the scanning tools to do forensic investigations, we may easily tip off the suspect that is under investigation

  Led paybyphone to switch to an ip-based network

What are the reasons that led PayByPhone to switch to an IP-based network?

  Determine five challenges faced by multiprocessors when

discussion 1registers memory and pipelining please re spond to the followingexplain whether or not programs should use

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