russkiymalchik / code-refactoring-22-23

0 stars 0 forks source link

Duplicate code_Lab1_Rev_Hotel Management #11

Open russkiymalchik opened 1 year ago

russkiymalchik commented 1 year ago

Duplicate code refers to sections of code that are identical or very similar in multiple places within a codebase.

Example 1
ref : class "Food" ``` case 1:price=quantity*50; break; case 2:price=quantity*60; break; case 3:price=quantity*70; break; case 4:price=quantity*30; break; ``` The code contains repetitive calculations for determining the price based on the item number.