PV 168 Seminar 03 Agenda - Project topics - Project assignment: Schedule and Instructions - Seminar task - Working with branches in Git - Calculator refactoring - Seminar task reflection Project topics ● Timesheet for Freelancer (Evidence odpracované doby OSVČ) ● Food & Nutrition Assistant (Pomocník pro nutriční plánování) ● Hotel Reservation System (Systém pro rezervace v hotelu) ● Home Accounting (Domácí účetnictví) This list may be extended Project assignment: Schedule and Instructions ● Specification for all topics will be published before 22. 10. 2020 17:00 ● Establishing the teams until 24. 10. 2020 17:00 ○ Each team will have four members, one of them will be team leader ○ Team leader will send list of team members to both seminar tutors via e-mail ○ If you have no team, use course discussion forum (předmětové diskusní fórum) in IS ● Signing for topics 24. 10. 2020 17:00 – 26. 10. 2020 23:59 ○ Using Topic Lists (rozpisy témat) in IS ○ Only team leader from each team will sign up for topic ○ Up to two teams can sign up for the same topic in each seminar group (first come, first serve) Seminar task - You will be now split to teams consisting of four students - Create and push the branch (see the next slides) - Refactor the code (see the next slides) - You have 50 minutes to solve all the tasks - If you need any help, raise your hand in Zoom Working with branches in Git ● Clone the project (if you has not do it yet) ● Create new local branch ○ based on commit 52d493a7 (current head of master branch) ○ with name week03-group0X-roomY (0X is seminar group, Y is breakout room number) ○ If you from group PV168/01 and breakout room 3, branch name is week03-group01-room3 ● Pavel Hrdina or Petr Adámek will give you write access to calculator repository ○ Only one person per breakout room - the one who will use the computer for coding ○ Petr or Pavel will visit your breakout room to ask who is this person ○ In the meantime work on other tasks ● Push the branch to origin repository Seminar task: Calculator refactoring ● Perform the steps from previous slide (create and push git branch) ● Do the following refactorings, commit and push each step (with reasonable granularity) ● Do not forget to execute tests after each step! ○ Keep in mind that main(String[]) method is not covered with tests ● Find and solve occurences of these code smells ○ Mysterious name (s0, s1, s2, l, b?, te, f, p) ○ Duplicated Code (with operation evaluation) ○ Long function (actionPerformed(...), main(...)) ○ Comments (Note: some of them can be resolved together with other refactorings) ○ Duplicated Code (button creation in main method; do this as the last one) Conclusion Any questions?