Skip to content

currency converter finished #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

public interface ConvertableCurrency {
default Double convert(CurrencyType currencyType) {
return Double.MAX_VALUE;
return currencyType.getRate()/this.getCurrencyType().getRate();
}

CurrencyType getCurrencyType();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package io.zipcoder.currencyconverterapplication;

public class CurrencyChange extends CurrencyConverter{




}
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package io.zipcoder.currencyconverterapplication.currencies;

import io.zipcoder.currencyconverterapplication.ConvertableCurrency;
import io.zipcoder.currencyconverterapplication.CurrencyType;

public class AustralianDollar implements ConvertableCurrency {
@Override
public CurrencyType getCurrencyType() {
return CurrencyType.AUSTRALIAN_DOLLAR;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package io.zipcoder.currencyconverterapplication.currencies;

import io.zipcoder.currencyconverterapplication.ConvertableCurrency;
import io.zipcoder.currencyconverterapplication.CurrencyType;

public class CanadianDollar implements ConvertableCurrency {
@Override
public CurrencyType getCurrencyType() {
return CurrencyType.CANADIAN_DOLLAR;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package io.zipcoder.currencyconverterapplication.currencies;

import io.zipcoder.currencyconverterapplication.ConvertableCurrency;
import io.zipcoder.currencyconverterapplication.CurrencyType;

public class ChineseYR implements ConvertableCurrency {
@Override
public CurrencyType getCurrencyType() {
return CurrencyType.CHINESE_YR;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package io.zipcoder.currencyconverterapplication.currencies;

import io.zipcoder.currencyconverterapplication.ConvertableCurrency;
import io.zipcoder.currencyconverterapplication.CurrencyType;

public class Euro implements ConvertableCurrency {
@Override
public CurrencyType getCurrencyType() {
return CurrencyType.EURO;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package io.zipcoder.currencyconverterapplication.currencies;

import io.zipcoder.currencyconverterapplication.ConvertableCurrency;
import io.zipcoder.currencyconverterapplication.CurrencyType;

public class Franc implements ConvertableCurrency {
@Override
public CurrencyType getCurrencyType() {
return CurrencyType.FRANC;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package io.zipcoder.currencyconverterapplication.currencies;

import io.zipcoder.currencyconverterapplication.ConvertableCurrency;
import io.zipcoder.currencyconverterapplication.CurrencyType;

public class Pound implements ConvertableCurrency {
@Override
public CurrencyType getCurrencyType() {
return CurrencyType.POUND;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package io.zipcoder.currencyconverterapplication.currencies;

import io.zipcoder.currencyconverterapplication.ConvertableCurrency;
import io.zipcoder.currencyconverterapplication.CurrencyType;

public class Ringgit implements ConvertableCurrency {
@Override
public CurrencyType getCurrencyType() {
return CurrencyType.RINGGIT;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package io.zipcoder.currencyconverterapplication.currencies;

import io.zipcoder.currencyconverterapplication.ConvertableCurrency;
import io.zipcoder.currencyconverterapplication.CurrencyType;

public class Rupee implements ConvertableCurrency {
@Override
public CurrencyType getCurrencyType() {
return CurrencyType.RUPEE;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package io.zipcoder.currencyconverterapplication.currencies;

import io.zipcoder.currencyconverterapplication.ConvertableCurrency;
import io.zipcoder.currencyconverterapplication.CurrencyType;

public class SingaporeDollar implements ConvertableCurrency {
@Override
public CurrencyType getCurrencyType() {
return CurrencyType.SINGAPORE_DOLLAR;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package io.zipcoder.currencyconverterapplication.currencies;

import io.zipcoder.currencyconverterapplication.ConvertableCurrency;
import io.zipcoder.currencyconverterapplication.CurrencyType;

public class USDollar implements ConvertableCurrency {
@Override
public CurrencyType getCurrencyType() {
return CurrencyType.US_DOLLAR;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package io.zipcoder.currencyconverterapplication.currencies;

import io.zipcoder.currencyconverterapplication.ConvertableCurrency;
import io.zipcoder.currencyconverterapplication.CurrencyType;

public class UniversalCurrency implements ConvertableCurrency {
@Override
public CurrencyType getCurrencyType() {
return CurrencyType.UNIVERSAL_CURRENCY;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package io.zipcoder.currencyconverterapplication.currencies;

import io.zipcoder.currencyconverterapplication.ConvertableCurrency;
import io.zipcoder.currencyconverterapplication.CurrencyType;

public class Yen implements ConvertableCurrency {
@Override
public CurrencyType getCurrencyType() {
return CurrencyType.YEN;
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.