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

  Write down differences in company policies of firm

For Firm ABC, each of the relations is in 3NF. Write down two differences should exist in company policies of Firm ABC? Explain your answer.

  Explain what is file type-from where file types come

What is "file type?" Where do file types come from? Write down some of the information that file types give (tip: think about copying and pasting, also importing/exporting between files)?

  Using one- and two-dimensional arrays with functions.

Objective using one- and two-dimensional arrays with functions.

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

  Who is holding return real time big data analysis

Who is holding return realtime bigg data analyssis? what is the future of data big?

  The program must use a loop

The program MUST use a loop to read in the series of integers from the user. The output is then displayed after the loop. Algorithm   or Pseudo Code  (as an outline): At the beginning or end or your program write the algorithm or pseudo code as a mul..

  First instruction executed if we start machine with counter

Suppose the memory cells at addresses 00 through 02 contain the following bit patterns. What would be the first instruction executed if we start the machine with its program counter containing 00?

  Describe operational-tactical and strategic reporting

Describe operational, tactical and strategic reporting. How do requirements drive reporting system inputs requirements and write down the ramifications of ignoring user requirements.

  Determine maximum number of telephones end office support

With mean call duration of six minutes. Ten percent of calls are long distance. Determine the maximum number of telephones an end office can support?

  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.

  Impact of activities called ping sweeps and port scans

Your boss has just heard about some nefarious computer activities called ping sweeps and port scans. He wants to know more about them and what the impact of these activities might be on your company.

  Find crc using modulo two arithmetic or polynomials

For a pattern P = 10011, and a message D = 10010011011, find, using modulo 2 arithmetic or polynomials, the CRC, then the string T to be transmitted.

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