Skip to content
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

Adds calculation of fee #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Adds calculation of fee #13

wants to merge 1 commit into from

Conversation

skopczynska
Copy link
Owner

No description provided.

for (int i = 0; i < accounts.Length; i++)
{
account = accounts[i];
if (account.accountType == Account.PREMIUM || account.accountType == Account.PREMIUM_PLUS) totalFee += .0125 * ( // 1.25% broker's fee
Copy link

@norbertpilat norbertpilat Nov 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jeżeli konto byłoby inne niż Premium i Premium Plus to co wtedy ?

a.rate = 0.5;
myAccounts[0] = a;
a = new Account() { principal = 1.5, rate = 0.75 };

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

brakuje inicjalizacji zmiennej dayActiv


}

public static double calculateFee(Account[] accounts)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

metoda nie jest używana poza tą klasą wiec powinna być private

{
public double principal, rate; int daysActive, accountType;
public static const int STANDARD = 0, BUDGET = 1, PREMIUM = 2, PREMIUM_PLUS = 3;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accountType jest zdefiniowane jako double, a powinno być enum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants