manipulating strings - queue/deque

Closed - This job posting has been filled and work has been completed.
Web, Mobile & Software Dev Other - Software Development Posted 1 year ago

Fixed Price

Delivery by November 9, 2013

$20.00

Budget

Details

Must be done in Netbeans.  Must use Java

The program should prompt the user to input a single string that represents a
sequence of transactions. Use semicolon (‘;’) to separate the transactions in the  
input string. For example, the program should support the following input string:
“buy 100 share(s) at $20 each; buy 20 share(s) at $24 each; buy 200
share(s) at $36 each; sell 150 share(s) at $30 each; buy 50
share(s) at $25 each; sell 200 share(s) at $35 each;”
The output of the program should be the total capital gain(or loss) for the entire
sequence, using the FIFO protocol as explained. For instance, the output
for the example input should be: $1070.
The program should be able to handle wrong inputs.
Consider using built-in Java classes, e.g., classes that implement the interface
java.util.Queue.


About the Client

(4.90) 11 reviews

United States
Sun City 08:48 AM

10 Jobs Posted
90% Hire Rate, 1 Open Job

$478 Total Spent
13 Hires, 0 Active

$5.98/hr Avg Hourly Rate Paid
16 Hours

Member Since Mar 12, 2013