Skip to content

Михалев Кирилл#14

Open
Foxovsky-bit wants to merge 1 commit intoRTF-Angular-2021:masterfrom
Foxovsky-bit:change
Open

Михалев Кирилл#14
Foxovsky-bit wants to merge 1 commit intoRTF-Angular-2021:masterfrom
Foxovsky-bit:change

Conversation

@Foxovsky-bit
Copy link

5 заданий

const RU = [10, 50, 100, 500, 1000, 5000];
let countCopy = count;

for (let banknote of this._repository) {

Choose a reason for hiding this comment

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

Это не жадный алгоритм

public takeUsersMoney(moneyUnits: any): any {

public takeUsersMoney(moneyUnits: IMoneyUnit): void {
this._moneyRepository.takeMoney(moneyUnits);

Choose a reason for hiding this comment

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

нет проверки на авторизацию

public giveOutUsersMoney(count: any): any {

public giveOutUsersMoney(count: number): void {
this._moneyRepository.giveOutMoney(count, this._authorizedUser.cards[0]['currency']);

Choose a reason for hiding this comment

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

нет проверки на авторизацию

public changeAuthorizedUserSettings(option: UserSettingOptions, argsForChangeFunction: any): any {

public changeAuthorizedUserSettings(option: UserSettingOptions, argsForChangeFunction: string): void {
this._userSettingsModule.changeUserSettings(option, argsForChangeFunction);

Choose a reason for hiding this comment

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

нет проверки на авторизацию

public convertMoneyUnits(fromCurrency: Currency, toCurrency: Currency, moneyUnits: any): any {

public convertMoneyUnits(fromCurrency: Currency, toCurrency: Currency, moneyUnits: IMoneyUnit): void {
this._currencyConverterModule.convertMoneyUnits(fromCurrency, toCurrency, moneyUnits);

Choose a reason for hiding this comment

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

нет проверки на авторизацию

if (this._moneyRepository.giveOutMoney(moneyUnits.count * denomination, toCurrency))
return moneyUnits.count * denomination * 70;

}

Choose a reason for hiding this comment

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

3 бала

}
else
return this.registerForUserNewCard(argsForChangeFunction);
}

Choose a reason for hiding this comment

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

3 бала

if (card.id === cardId)
return true;
}
return false;

Choose a reason for hiding this comment

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

3 бала


public giveOutMoney(count: any, currency: any): any {
public giveOutMoney(count: number, currency: Currency): boolean {
const US = [1, 2, 5, 10, 20, 50, 100];

Choose a reason for hiding this comment

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

Эти купюры находятся в массиве private _repository: Array;

public takeMoney(moneyUnits: any): any {

public takeMoney(moneyUnits: IMoneyUnit): void {
this._repository.push(moneyUnits);

Choose a reason for hiding this comment

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

0 балов

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