Converts a number entered in roman numerals

Assignment Help JAVA Programming
Reference no: EM13860524

Write a program that converts a number entered in Roman numerals to decimal form. Your program should consist of a class, say RomanType. An object of romanType should do the following:

a. Store the number as a Roman numeral.

b. Convert and store the number into decimal form.

c. Print the number as a Roman numeral or decimal number as requested by the user.

The decimal values of the Roman numerals are:

M 1000

D 500

C 100

L 50

X 10

V 5

I 1

d. Your class must contain the method romanToDecimal to convert a Roman numeral into its equivalent decimal number.

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

Reference no: EM13860524

Questions Cloud

What is network intrusion detection system : What is Network Intrusion Detection System? Goals and Strategies of NIDS Architecture and Working of NIDS What happens after a NIDS detects an attack?
Details the facts of the incident and the specific : Details the facts of the incident and the specific communication problems encountered
Develop a crows foot erd using oracle data modeler : Develop a crow's foot ERD using Oracle Data Modeler or ER assistant that captures the following requirements: An employee has a unique employee number, a name, a position, and an optional office number.
Describe different levels of government interrelate : Identify the advantages and disadvantages in the ways that the governments involved work together.
Converts a number entered in roman numerals : Write a program that converts a number entered in Roman numerals to decimal form. Your program should consist of a class, say RomanType. An object of romanType should do the following: a. Store the number as a Roman numeral.b. Convert and store the ..
Calculate the number of multiply-and-add operations : Calculate the number of multiply-and-add operations the processor can use to work out the numerical value of each output sample of the digital filter and from this deduce the maximum filter order that can be implemented. Explain your logic clearly.
Hat types of activities are conducted by your interest group : hat types of activities are conducted by your interest group?
What are the leadership implications in these circumstances : Does the manager's failure to acknowledge the contributions of his staff constitute an ethical violation? Why or why not and would the answer to this question differ in different cultures or contexts?
Eliminate the last comma in the string output : Eliminate the last comma in the String Output which includes array output values from "hourlyTemp[i]" (entire list). My guess is that this needs to incorporate "%d" somehow but my online book won't accept the use of "%d" for some reason. From the boo..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Calculates the cost of a mortgage

Write a class called Mortgage that calculates the cost of a mortgage. Prompt the user to enter the principal amount, the term in years, and the interest rate per year.

  Write a java sorting application with two classes

Problem. Write a Java Sorting Application with two classes, JavaSort and JavaSortTest. Your JavaSort Class, as a minimum must contain sorting methods for BubbleSort, InsertionSort, ShellSort, MergeSort, and QuickSort.

  Write a thread function to initialize 2d array

write a thread function to initialize int 2D array x (NxN) so that each thread initializes its portion with i+j in each slot. Note that i and j relate to the entire array.

  Prepare an application that creates object of the classes

Write a CarbonFootPrint with only a pure virtual getCarbonFootprint method -  Have each of your classes inherit from the abstract class and implement the getCarbonFootprint method to compute an appropriate carbon footprint for that class.

  Design and implement your own simple class to represent

Design and implement your own simple class to represent any household item of your choice (toaster, fan, hair dryer, piano ...) Your class should have a constructor, one additional method and at least one member variable (e.g. boolean isOn to turn th..

  A program that reads a four-digit number from the keyboard

Write a program that reads a four-digit number from the keyboard as a string and then converts it into decimal. For example, if the input is 1100, the output should be 12. Hint: Break the string into characters and then convert each character to a va..

  Create an application for disney''s cottages

Create an application for Disney's Cottages, a weekend getaway resort that rents cottages and boats to use on the local lake

  Create a java class named headphone

Create a Java class named HeadPhone to represent a headphone set. The class contains: ? Three constants named LOW, MEDIUM and HIGH with values of 1, 2 and 3 to denote the headphone volume.

  Create a gui client side application that is a java version

q1. create a gui client side application that is a java version of notepad giving the ability to open modify and save

  Write a program with an exception handler

Write a program with an exception handler that deals with nonnumeric operands; then write another program without using an exception handler to achieve the same objective.

  Java is considered to be safe from buffer overflows

Java is considered to be safe from buffer overflows. Does that make it more appropriate to use as a s development language when security is concerned? Be sure and weight all if the risks involved in product development, not just the security aspec..

  String as input and returns the reverse of that string

Write a method that takes a String as input and returns the reverse of that String. Then write a second method that uses the first method to test whether or not an input String is a palindrome.

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