Skip to content

Михайловский Евгений#12

Open
EvgenyMikhailovsky wants to merge 2 commits into
RTF-Angular-2021:masterfrom
EvgenyMikhailovsky:Михайловский-Евгений

Hidden character warning

The head ref may contain hidden characters: "\u041c\u0438\u0445\u0430\u0439\u043b\u043e\u0432\u0441\u043a\u0438\u0439-\u0415\u0432\u0433\u0435\u043d\u0438\u0439"
Open

Михайловский Евгений#12
EvgenyMikhailovsky wants to merge 2 commits into
RTF-Angular-2021:masterfrom
EvgenyMikhailovsky:Михайловский-Евгений

Conversation

@EvgenyMikhailovsky
Copy link
Copy Markdown

No description provided.

Comment thread src/task_2/index.ts
cards?: Array<ICard>;
}

export class BankOffice {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Файл не валидный.

Comment thread src/task_2/index.ts Outdated
public authorize(userId: any, cardId: any, cardPin: any): any {

public authorize(userId: string, cardId: string, cardPin: string): boolean {
for (let users of this._users) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

this_users - должен быть коллекций, а он одиночный объект, по этому ошибка.

Comment thread src/task_3/index.ts Outdated

private changeUserName(newName: any): any {

private changeUserName(newName: String): boolean {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Зачем тип с большой буквы?

Comment thread src/task_4/index.ts Outdated
moneyUnits.forEach(x => amount += x.count * Number(x.moneyInfo.denomination));
let fromRub = fromCurrency === Currency.RUB;
let money = fromRub ? (amount - amount % 70) / 70 : Math.floor(amount) * 70;
return this._moneyRepository.convertMoney(money, fromRub ? Currency.USD : Currency.RUB, moneyUnits);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Этого метода нет в репозитории.

Comment thread src/task_5/index.ts Outdated
if(!this._bankOffice.authorize(user.id, card.id, cardPin)) return false;
{
this._authorizedUser = user;
this._usersCard = card;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Такого поля нет в классе

Comment thread src/task_4/index.ts Outdated
let fromRub = fromCurrency === Currency.RUB;
let money = fromRub ? (amount - amount % 70) / 70 : Math.floor(amount) * 70;
return this._moneyRepository.convertMoney(money, fromRub ? Currency.USD : Currency.RUB, moneyUnits);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0 балов

Comment thread src/task_3/index.ts Outdated
} else {
return this.registerForUserNewCard(argsForChangeFunction);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

3 бала

Comment thread src/task_2/index.ts Outdated
}
}
return false;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0 балов

Comment thread src/task_1/index.ts Outdated
this._repository.forEach(point =>{
for (let pin in point) {

if (point[currency] === currency && counter >= point[count]) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

У объекта point Нет поля currency - это не будет работать.
К тому же тут нужно было сделать жадный алгоритм

Comment thread src/task_1/index.ts

public takeMoney(moneyUnits: IMoneyUnit): void {
this._repository.push(moneyUnits);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0 балов

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Посмотрите, я исправил решение

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Метод теперь работает верно 2 бала

@m-abrosimov
Copy link
Copy Markdown

Теперь за всё задание 7 балов у тебя

Comment thread src/task_4/index.ts

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

public convertMoneyUnits(fromCurrency: Currency, toCurrency: Currency, moneyUnits: IMoneyUnit[]): IMoneyUnit[] {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Этот метод не может возвращать массив купюр к выдаче. Потому что купюра не может быть дробной. Этот метод должен возвращать сумму, которая передаётся в _moneyRepository

Comment thread src/task_5/index.ts
public giveOutUsersMoney(count: number) {
if (this._authorizedUser)
{
this._moneyRepository.giveOutMoney(count, this._card.currency);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Добавь уменьшение денег на авторизованной карте. Изменение баланса карты

Comment thread src/task_3/index.ts
else if (option === UserSettingOptions.newCard)
return this.registerForUserNewCard(argsForChangeFunction);
}
} No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

3 бала

Comment thread src/task_2/index.ts

public isCardTiedToUser(cardId: string): boolean {
return this._users.filter(x=> x.cards.find(y=> y.id === cardId)).length > 0;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

2 бала

Comment thread src/task_1/index.ts

public takeMoney(moneyUnits: IMoneyUnit): void {
this._repository.push(moneyUnits);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Метод теперь работает верно 2 бала

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