Receive the names of corporations involved in this simulation as command-line arguments. Corporation names are guaranteed not to contain whitespace characters. For example, if your main method is in a class called Assignment07, then a command specifying two companies named Apple and WalMart would look like this:
java Assignment07 Apple WalMart
Maintain information about each corporation in an object that contains at least:
The corporation's cash on hand (initially $0)
The corporation's annual taxable income (initially $1 billion)
The corporation's annual tax-sheltered income (initially $0)
Process an arbitrary number of commands as input on standard input. Each command consists of one or three whitespace-delimited tokens, as follows:
taxable name value: Assigns a new amount of annual taxable income for the given corporation. name must be a valid name of a corporation, and value must be a decimal number in the range provided by Java's double type. For example:
taxable WalMart 10e9
1
Expert's answer
2018-03-29T08:05:26-0400
Corporation.java ====================================== class Corporation {
Comments
Leave a comment