Pure Programmer
Blue Matrix


Cluster Map

Project: Currency Class

Write a class for converting between different currencies. The class should be immutable. Create a single constructor that takes a double value and a string representing the currency. Write a getter that take a currency type string and returns the value in that currency as a double. Include currencies for USD, EUR, JPY, GBP, CAD, CNY, RUB, MXN, AUD, INR and Bitcoin (XBT). Have a method for setting the current conversion rates by passing a map. Also have a toString() like method that takes a currency code and then returns the value formatted with its currency symbol.

See [[wikipidea or link]]
See other project

Output
$ swiftc CurrencyClass.swift -I . -L . -lUtils error: link command failed with exit code 1 (use -v to see invocation) ld: library not found for -lUtils clang: error: linker command failed with exit code 1 (use -v to see invocation)

Solution