Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Accounting Basics Expert

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

Accounting Basics, Accounting

  • Category:- Accounting Basics
  • Reference No.:- M91596220
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in Accounting Basics

Question - parent inc purchased all of the outstanding

Question - Parent Inc. purchased all of the outstanding shares of Sub Ltd. on January 1, Year 1 for $214,000. Amortization of the acquisition differential amounted to $16,000 in each of Years 1 and 2. Parent Inc. reporte ...

Question - a revenue of 62000 was earned but only 45000 was

Question - a. Revenue of $62,000 was earned, but only $45,000 was collected. Expenses of $36,000 were incurred, but only $30,000 was paid. What is reported operating income? b. Wages of $5,000 are paid every Friday for a ...

Question - bubbles cos reported 2018 beginning inventory of

Question - Bubbles Co's reported 2018 beginning inventory of $1,800,000, purchases of $9,000,000, and sales of $11,400,000. A physical inventory count at 12/31/2018 reported ending inventory of $2,100,000. Bubbles' gross ...

Question - assume that green cos total assets at the end of

Question - Assume that Green Co.'s total assets at the end of the prior year and at the end of the current year were $937,000 and $1,019,000, respectively. Calculate ROI (based on operating income) for the current year u ...

Question -nbsp international chemical companys special

Question -  International Chemical Company's special order also requires 1 000 kilograms of genatope, a solid chemical regularly used in the company's products. The current stock of genatope is 8 000 kilograms at a carry ...

Question - mr young operates a photography studio as a sole

Question - Mr. Young operates a photography studio as a sole proprietorship. His average annual income from the business is $100,000. Because Mr. Young does not need the entire cash flow for personal consumption, he is c ...

Question - great outdoze company manufactures sleeping bags

Question - Great Outdoze Company manufactures sleeping bags, which sell for $65 each. The variable costs of production are as follows: Direct material$20 Direct labor 11 Variable manufacturing overhead 8 Budgeted fixed o ...

Question - overhead variances two- and three-variance

Question - Overhead Variances, Two- And Three-Variance Analyses Oerstman, Inc., uses a standard costing system and develops its overhead rates from the current annual budget. The budget is based on an expected annual out ...

Question - revenue recognitionmidwest health club mhc

Question - Revenue Recognition Midwest Health Club (MHC) offers 1-year memberships. Membership fees are due in full at the beginning of the individual membership period. As an incentive to new customers, MHC advertised t ...

Question as the first step of your final project select

Question: As the first step of your final project, select three companies to evaluate for determining which is in the best financial health and would, therefore, be the most profitable investment. • What considerations m ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As