Let's do some work with money. Your job is to expand the functionality of a program that can manipulate currencies. For the specific currencies, see the task conditions. To start, create a private double field amount in the abstract Money class...
Currencies
- 16
Locked
Comments (8)
- Popular
- New
- Old
You must be signed in to leave a comment
Jurij Thmsn
25 February 2021, 15:39
Note: The getCurrencyName method in the Euro class should return "EUR", "RUB", "USD".
And you have to use "double amount" (primitive) not " Double amount"(Wrapper) in the Euro, Ruble and USD constructors to validate, even though the code works as well the other way.
+1
Jonaskinny Java Developer at Sandmedia
1 March 2022, 02:41
auto-boxing
0
joe
24 September 2020, 12:39
Verified without completing the last step
0
Petros
7 August 2020, 02:40
Even though I did this in one try, it exposed holes in my knowledge. These exercises are building a solid foundation.
+1
Josephine
6 June 2020, 05:40
why there is an abstract double getAmount()declared in money class?
.Can we create object of static class? Person paul = new Person("Paul");please explain.
0
Jonaskinny Java Developer at Sandmedia
1 March 2022, 02:44
abstract classes can hold state, very useful in hierarchies where you want to force subclassing (no instatiating abtracts) yet share some common behaviors that require state... so you may want to make some adjustments
0
Santosh Kumar
3 March 2019, 16:26
Please assist on this.
0
Roman
4 March 2019, 07:05
If you need help, something isn't right in your code, the server won't accept your solution (even if you are 100% sure that it is correct). Describe your question/issue in the HELP section at codegym.cc/help.
+1