CSC207-2022F-UofT / course-project-bill-gates

A bill recording software developed by team "Bill Gates."
9 stars 4 forks source link

[+] Add insertEntry usecase #36

Closed Yunshan-522 closed 1 year ago

Yuhan-Ut commented 1 year ago

I think your use-case implements will work after this change, good jobs

ScottCTD commented 1 year ago

The only problem is that we actually don't need a presenter, view interface, and view model for this use case.

As illustrated in https://github.com/CSC207-2022F-UofT/course-project-bill-gates/discussions/37#discussioncomment-4185696, we can call the UpdateBillUseCase after your insertEntry use case finishes its job.

ScottCTD commented 1 year ago

The only problem is that we actually don't need a presenter, view interface, and view model for this use case.

As illustrated in #37 (comment), we can call the UpdateBillUseCase after your insertEntry use case finishes its job.

Therefore, an easy way to fix this is simply to remove the view interface, view model, and the presenter.

Yuhan-Ut commented 1 year ago

After checking my use-case implements and discussing with group members, now I have deeper understanding about usecases, so please let me to redo my review about this pull request.

First of all, everything is looking good here and I think this use case will work as we expected!

But as a use case that change recorded information in the database, I may assume there is no need for output port, viewmodel or presenter, we can left the job to be done by the update_bill use case, so duplicate code is avoided.

Sorry for the misleading I may made, and hope you will keep on going with this excellent job.

ps. some quick tips for fixing the presenter issue, remove view interface, view model, and the presenter and the lines I will mark in the usecase.java file