Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

Input and Output Specification Your code should include a function which takes an ordered array of trade strings and returns the correct tax amount...

I am currently trying to code a FIFO tax calculator in Java for a challenge in class I am trying to do. The challenge is finishing in 6 hours.

  • Attachment 1
  • Attachment 2
  • Attachment 3
  • Attachment 4
Input and Output SpecificationYour code should include a function which takes an ordered array of trade strings and returns the correct tax amount as a string in accounting notation. Each trade is represented by a string with the following format:. Date (YYYY—MM-DD) - Ticker Symbol - Buy(B)/Se|l (S) indicator - Quantity - Price Example list of trade strings:2015-01-03,AAPL,B,50,80.02015-01-05,AAPL,B,60,100.02015-02-05,AAPL,S,70,130.02015—02—08,AAPL,S,10,90.02015-03-10 ,AAPL,S , 80 , 120 . 02015-03-12 ,AAPL,B, 10 , 70 . 02015-04-08 ,AAPL,B, 70 , 160 . 0 The tax amount should be represented as a string in accounting notation , that is, the value should be rounded/padded to two decimal places and include a dollar sign. Negative values should be surrounded withparentheses. Example of accounting notation amount strings: $625.00 $0 .25 $0 . 00 ($0 .50) ($125.00)
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question