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

  Would inventory turnover ratio be more important

Profit margins and turnover ratios vary from one industry to another. What differences would you expect to find between the turnover ratios, profit margins, and DuPont equations for a grocery chain and a steel company?

  Joe is 50 years old unmarried without children and has

joe is 50 years old unmarried without children and has earnings during 2011 of 8000. he is not claimed as a dependent

  Hiawatha corp is considering the purchase of a new piece of

hiawatha corp is considering the purchase of a new piece of equipment. the cost savings from the equipment would result

  Common size comparative balance sheet

Using vertical analysis, prepare a common size comparative balance sheet.

  Brummitt corporation is working on its direct labor budget

brummitt corporation is working on its direct labor budget for the next two months. each unit of output requires 0.05

  Dpreciation on a straight-line basis

Hercules Exercising Equipment Co. purchased a computerised measuring device two years ago for $60,000. The equipment has been depreciated on a straight-line basis over a six year useful life and can currently be sold for $23,800.

  The balance sheet and income statement for a company are

the balance sheet and income statement for a company are provided below along with selected additional financial

  Pacific products inc completed and transferred 55000

pacific products inc. completed and transferred 55000 particle board units of production from the pressing department.

  Flip earns a salary of 7500 per month during the year fica

flip earns a salary of 7500 per month during the year. fica taxes are 8 on the first 100000 of gross earnings. federal

  Expected value approach

A consultant developed the following projections of net cash flow (in thousands of dollars) for a five year planning horizon. All costs including the consultants fee are included. a. What decision should Lake Placid make using the expected value ap..

  Larson company issued 500000 of 8 5-year bonds at 106

larson company issued 500000 of 8 5-year bonds at 106. assuming straight-line amortization and annual interest payments

  Debra manufacturing has identified that the cost of a new

debra manufacturing has identified that the cost of a new computer will be 120000 but with the use of the new computer

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