Expand the program's ability to manipulate currencies.
1. Create a private double field amount in the abstract Money class.
2. Create a public getter for the field amount (public double getAmount()) so you can access it outside the Money class.
3. In the separate files, create Euro, Ruble, and USD classes, which will be descendants of the Money class.
4. In the Euro, Ruble, and USD classes, implement the getCurrencyName method, which will return the abbreviated name of the currency (String) (EUR, RUB, USD).
5. In the Euro, Ruble, and USD classes, implement a public constructor that takes one argument and calls the constructor of the base class (super class) with this argument.
6. Populate the allMoney list with all possible currency objects in accordance with the task conditions and the functionality of the program.
- The Money class must have a private double field amount.
- The Money class must implement a public constructor with one double parameter, which sets the variable amount to the passed parameter.
- The Money class must implement a public getAmount method that returns the value of the field amount.
- The Euro, Ruble, and USD classes must be descendants of the Money class and be located in separate files.
- The Euro, Ruble and USD classes must implement the getCurrencyName method.
- The getCurrencyName method must return the abbreviated name of the corresponding currency (String).
- The Euro, Ruble, and USD classes must implement a public constructor with one double parameter. This constructor must set the value of the Money class's field amount by calling the parent class's constructor with the same argument.