Program that stores and converts a number

Assignment Help Computer Engineering
Reference no: EM1326863

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: EM1326863

Questions Cloud

Counter-argument to training leaders : A third possibility is that, even if certain theories could actually guide individuals in leadership situations and even if individuals could alter their style. What is your reaction to these arguments?
Students explore the reasons behind regulating banks : In the particular assignment due this week, students explore the reasons behind regulating banks also how that regulation relates.
Develop an application with the chosen dbms : A school intends to procure the integrated student management application holding all details of registered students including personal information, courses taken, and examination grades.
Discussing law of hire-purchase : Karim bought a second hand Toyota Hilux from Jamin Baik Sdn Bhd. On 15 January 2012, he signed a hire-purchase agreement for the car with OUR Bank.
Program that stores and converts a number : Write down a program that stores and converts a number entered in Roman numerals to an integer value. Your program should consist of a class named Roman.
Supply assistance to nation experiencing economic : The International Monetary Fund IMF supply assistance to nation experiencing economic woes.
Debate the moral responsibility of one agent : Debate the moral responsibility of one agent (Computer Programmer) associated with the two Therac-25 overdoses which occurred in Tyler, Texas.
Explaining moral leadership qualities : Do the means they choose also reflect on their moral leadership qualities?
Explaining the cars-r-us : Cars-R-Us (Cars) has several truck and car manufacturing plants throughout the United States. All its plants are unionized.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Concept of aloha

A large population of the ALOHA users manage to produce the 50 requests/sec., involving both the originals and retransmissions. Time is slotted in units of 40 msec. State the chance of success on the first attempt?

  Evaluating the post fixed expression

Approximate the post fixed expression a) Initialize an empty stack. While there exist more symbols within postfix string { b) If token is an operand, push it onto the stack. If token is an operator

  Determining the missing side of triangle

Write down a program which will figure out the missing side of the right triangle utilizing the Pythagorean Theorem. Suppose that the user entries will make a triangle.

  Explain the osi model and data frames

Why should network architects concern themselves.

  How to produce an average class with a public data

How to produce an Average class with a public data Produce an Average class with a public data member to collect the sum of integer entries and a public data member to hold the double average of the sum of the 10 integers.

  Functionalities of pharmacy information systems

Analyze the different functionalities of the pharmacy information systems which can aid in reduction of the medication errors and make at least two recommendations for the improvements in future systems.

  Queries in relational algebra

Queries in relational algebra.

  Describing the microsoft access

Describe what is going on within the Microsoft Access. What role do you think SQL is playing?

  Recognize how to locate fsmo roles

Recognize how to locate FSMO roles?

  Graph a flowchart or pseudocode

Graph a flowchart or pseudocode

  Generating an array for a particular structure

You should generate a structure student_t in order to store the student name and three exam scores. You will generate an array of this structure in the main function.

  Explain the reason for the project development

Two members of your project development team are differing about relative significance of training and documentation.

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