Problem regarding the creating classes

Assignment Help Accounting Basics
Reference no: EM13923332

Creating Classes

The purpose of this lab is to gain experience in the design and implementation of a simple Java class.  You will create a class definition and write a simple main method that will test the methods of your class to ensure they work as expected.

The required task is to create a class definition for the concept of a Roman numeral.  When a Roman numeral object is declared, it should hold a representation of the Roman numeral (e.g., MMXV) and provide the following functionality:

  • A constructor that initializes the Roman numeral to the value supplied as the parameter to the constructor in Roman numeral format
  • A constructor that initializes the Roman numeral to the value supplied as the parameter to the constructor in decimal format
  • A method that returns the value of the Roman numeral
  • A method that returns the decimal equivalent of the value of the Roman numeral

Note: a Roman numeral object is only allowed to permanently store the Roman numeral representation of the number (i.e., adding an int member for the decimal equivalent is not allowed).

Your test program must create Roman numeral objects and enable the user to sufficiently test the class methods for correctness.  I/O can be console based - e.g., you may want to prompt the user for a Roman numeral, create a Roman numeral object and then output the numeral in both Roman numeral and decimal format.

The extended task is to add functionality to the class to add Roman numerals.  Note to get any credit for this method this addition must be done using the Roman numeral format of the numbers, not by converting them to decimal values and adding those.  Your test code should be extended to allow the user to exercise the add function as many times as desired.

As a reminder, these are the decimal values of the Roman numeral "digits":

M    1000
D    500
C    100
L    50
X    10
V    5
I    1

Reference no: EM13923332

Questions Cloud

Unique configuration of the office space : Five (5) of the deployments experienced delays due to the unique configuration of the office space which required modification to install the proper wiring.
Describe how each of three performance measures is calculate : Describe how each of the three performance measures is calculated. State whether each measure assumes that the relevant risk is systematic, unsystematic, or total. Explain how each measure relates excess return and the relevant risk.
Diagram or a fully developed description : Question 1: Based on the following narrative, develop either an activity diagram or a fully developed description for the use case of Add a new vehicle to an existing policy in a car insurance system.
Description of the quality or safety issue : Post by Day 3 a description of the quality or safety issue you selected and a brief summary of the impact that this issue has on health care delivery. Describe at least one quality improvement strategy used to address this issue
Problem regarding the creating classes : The purpose of this lab is to gain experience in the design and implementation of a simple Java class.  You will create a class definition and write a simple main method that will test the methods of your class to ensure they work as expected.
Explain what roll meant by the benchmark error : Explain what Roll meant by the benchmark error, and identify the specific problem with this benchmark. In evaluating portfolio performance, describe the general procedure, with emphasis on the bench mark employed.
Type of sampling technique was used to collect the data : Enter the Data set (see next page: 50 samples of employee of two offices in Dubai & Abu Dhabi) into MINITAB stat software, run the required analysis, and answer the listed questions:
Directions for the skills based assessment : The final exam for this course is a comprehensive lab activity. You may consult with other students on this lab if you wish, but each student should submit a separate lab that represents your own work.
Completing the project follows a normal distribution : The mean time to complete a construction project is 52 weeks with a standard deviation of 3 weeks. Assuming the probability of completing the project follows a normal distribution, what is the probability of completing the project between 56 week..

Reviews

Write a Review

Accounting Basics Questions & Answers

  Prepare the wang cash budget

Prepare the Wang cash budget for 2014. Date the budget simply "2014" and denote the beginning and ending cash balances as "beginning" and "ending." Assume the company expects 2014 to be the same as 2013, but with the following changes:

  Contemporary designs inc is an interior-decorating firm

contemporary designs inc. is an interior-decorating firm. customers must pay 50 percent of their estimated bill before

  A fleet of refrigerated delivery trucks is acquired on

a fleet of refrigerated delivery trucks is acquired on january 5 2009 at a cost of 1200000 with an estimated useful

  Prepare journal entries to record the benefit of loss

Prepare journal entries to record the benefit of loss carry back and loss carry forward oprion. Prepare entries necessay at end of 2014 assuming not ll carry forward will be realized in future.

  Context corporation reports the following components of

context corporation reports the following components of stockholders equity on december 31 2011. common stock-10 par

  How would you make sure a payment is actually for what it

how would you make sure a payment is actually for what it was stated for?how would you make sure the payment is

  The overall revenue and spending variance ie the variance

vandall corporation manufactures and sells a single product. the company uses units as the measure of activity in its

  Journal entry for sorter company

On January 16, 2011, Sorter Company determined that its receivable from Ordonez Company of $8,000 will not be collected, and management authorized its write-off. a) Prepare the journal entry for Sorter Company to write off the Ordonez receivable.

  Determining profit margin of burger company

Burger Corp has $500,000 of assets, and it uses only common equity capital (zero debt). Its sales for the last year were $600,000, and its net income after taxes was $25,000.

  Ross has four offers to acquire the stock and land

Ross would like to dispose of some land he acquired five years ago because he believes that it will not continue to appreciate. Its value has increased by $50,000 over the five-year period. He also intends to sell stock that has declined in va..

  Instructions on research paper

Instructions on Research Paper

  Prepare a balance sheet and cash flow statement

Prepare a Balance sheet, income statement, and cash flow statement for the data below?

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