Make an instance of romannumerals

Assignment Help Basic Computer Science
Reference no: EM13166957

Make an instance of RomanNumerals and invoke the method toRoman(int n). Enter a number in the Arabic notation and it will convert it to a Roman numeral. For example 17 will be converted to XVII.You will notice a test suite that we provide with the code. Run the test suite by right-clicking on RomanNumeralsTest and choosing Test All. You will notice a total of eight tests of which two fail. 1. Your first task is to study the given code, identify why the two tests fail, and correct the code. 2. On studying the code further, you will notice a few more bugs/limitations in the provided code (i.e. the provided code will not give the correct Roman numeral conversion for some numbers). Identify them and correct the code to handle those situations also. 3. Also, the test suite itself has a bug, i.e. it will flag an error in a particular case even when the code gives the right answer. Identify that situation and correct it. 4. Add five more tests to RomanNumeralsTest to give you confidence that all numbers between 1 and 3,000 will be converted correctly. By the end you will have code that converts from Arabic numerals to Roman numerals which handles all possibilities and is fully tested by an additional five tests (hence, a total of 13 tests: eight we provide and five you write).

Reference no: EM13166957

Questions Cloud

Exhibit an algorithm that detects automation : Exhibit an algorithm that detects whether one finite automaton accepts a subset of the set accepted by another machine.
A text file students.txt contains student records : A text file students.txt contains student records (name, date of birth, and GPA). Write a program that reads student records from students.txt and creates an array of student structures
Write a program that has user enter : Write a program that has user enter a sentence and then determine how many lower case letter were entered. You need to write a logically coherent function that will determine if character is lower case or not. Main will also display the total?
The computerization of health records : A health care issue that has been in the news lately is the computerization of health records. This probability is being approached cautiously because of sensitive privacy and security concerns, among others.
Make an instance of romannumerals : Make an instance of RomanNumerals and invoke the method toRoman(int n). Enter a number in the Arabic notation and it will convert it to a Roman numeral. For example 17 will be converted to XVII.You will notice a test suite that we provide with the..
Calculate display the area of a rectangle (length * width) : Use the input.txt file. Have it read in the number of records to work on. Then for each record read in a character. If it is a C then read in a value and calculate and display the area of a circle (pi*r 2 ), a R then read in two values and calculate ..
Your program will read the array : Your program will read the array from the file, check the diagonal and print a report containing the size and the status of the diagonal. A typical report would look like: The matrix is 3x3 and all the numbers on the main diagonal are the same.
Create a data flow diagram : Create a data flow diagram for Online library management system. It should include search, hold, add items, issue, recall, and add user. It should support books, dvds, and cds. The flows should include each data element, the levels must be balance..
A local department store hires you to write : A local department store hires you to write an automated checkout program to expedite customers in a hurry. The checkout line can only accept five items for any one purchase. Design a program that asks for the price of each item, and then displays..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Multiplexing-modulation techniques-line of sight propagation

Write about Multiplexing and Modulation techniques in detail with respect to Line of Sight Propagation. What is meant by Geo stationary orbit? Write down the advantages of Geo synchronous satellites?

  Function whose job is to output some sequence

Write a function whose job is to output some sequence of "interesting" #'s. The numbers should be separated from one another somehow so they don't all run together. This function may need to call another function, where the second function determines..

  Describe a violation of opsec principles

Describe a violation of OPSEC principles that plays a major role in the plot of a movie you have seen, then describe briefly how the 5 step process.

  This code uses separate chaining

This code uses separate chaining ...implement it using double hashing. Implement a separate-chaining table in which each integer x is hashed twice using two different hash functions h1(x) and h2(x). This will perhaps produce two different location..

  Compute expected payback percentage of machine

Compute the expected "payback" percentage of the machine. In other words, for each coin played, what is the expected coin return?

  Explain throughput and capacity for effectiveness of system

Do you agree or disagree that throughput and capacity are finding factors for effectiveness of system more so than processor speed?

  Determining smallest-last vertex ordering

Determine a smallest-last vertex ordering and plot degree when deleted diagram for given random geometric graphs.

  Jane''s farm stand sells a variety of vegetables

Jane's farm stand sells a variety of vegetables. Write a program that produces an output file of vegetables sold, sorted by the biggest selling vegetable in terms of money made to the poorest selling.

  Compare and contrast the in terms of cores/microprocessors

Compare and contrast the following, in terms of cores (or microprocessors), random access memory (RAM), disk storage, and networking capabilities.

  Explaining dui and charges of domestic violence

You will be handling sensitive information and may end up in court as a technical or expert witness. How can things such as a DUI, charges of domestic violence and other items affect your career?

  Potential vulnerabilities in making purchase with debit card

Recognoze any potential vulnerabilities in making purchase with debit card, and which area of CIA triad they apply to.

  Encourage cooperation consistent with standards

Encourage cooperation from all, make it suitable to clean up, be consistent with standards - Who will put it away? Explain where will it be put away? When will it be put away?

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