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

  Accountant during partner liquidation

What accounting transactions are not recorded by an accountant during partner liquidation?

  General formula for calculating adjusted basis of property

Identify and describe the general formula for calculating the adjusted basis of property. What is Leon's recognized gain

  Goddard company has used the fifo method of inventory

goddard company has used the fifo method of inventory valuation since it began operations in 2010. goddard decided to

  The noncash assets were then sold for 120000 and the

the h i and j partnership was about to enter liquidation with the following account balancescash90000. noncash

  Your company is in need of quick cash to afford a project

a your company is in need of quick cash to afford a project opportunity so the firm decides to factor 100000 of its

  Post the adjusting journal entry

At December 31, the unadjusted trial balance of H& R Tacks reports Interest Payable of $ 0 and Interest Expense of $ 0. Interest incurred and owed in December totals $ 500. Prepare the adjusting journal entry on December 31. In separate T- accounts f..

  Provide the journal entry for the asset revaluation

The capital accounts of Hope and Indiana have balances of $115,000 and $95,000, respectively. Clint and Casey are to be admitted to the partnership.

  Indicate the accounts amounts and accounting equation effect

Using the information given, indicate the accounts, amounts, and accounting equation effects (1 for increase, 2 for decrease, and NE for no effect) of transactions (a) and (b). Using the information given, prepare the journal entries that would be re..

  A piece of wire 22 m long is cut into two pieces one piece

a piece of wire 22 m long is cut into two pieces. one piece is bent into a square and the other is bent into a circle.a

  What are the auditors alternatives

When such an event occurs and is appropriately reflected in the financial statements, what are the auditor's alternatives with respect to dating the audit report and the conditions applicable to each alternative?

  Depreciation schedules for the equipment

Prepare two different depreciation schedules for the equipment-one using the double-declining balance method, and the other using the straight-line method. (Round to the nearest dollar).

  Accounts receivable arising from trade transactions

accounts receivable arising from trade transactions amounted to 44000 and 53000 at the beginning and end of the year

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