Programowanie zwinne
Programowanie zwinne Programowanie zwinne
Wydzielenie metody ze zmiennymi do odczytu void raport(DataList data, string title) { Console.WriteLine(’***** {0} *****’, title); Console.WriteLine(’ Raport z dn. {0} ’, DateTime.Now); Console.WriteLine(’*************************’); } foreach(DataElement d in data) { Console.WriteLine(d.toString()); } Console.WriteLine(’***************************’); Console.WriteLine(’********** Koniec *********’); Console.WriteLine(’***************************’);
Wydzielenie metody ze zmienną void naglowek(string title) { Console.WriteLine(’********* {0} *******’, title); Console.WriteLine(’ Raport z dn. {0} ’, DateTime.Now); Console.WriteLine(’************************’); } void stopka() { Console.WriteLine(’****************************’); Console.WriteLine(’*********** Koniec *********’); Console.WriteLine(’****************************’); } void raport(DataList data, string title) { naglowek(title); foreach(DataElement d in data) Console.WriteLine(d.toString()); }
- Page 1 and 2: Programowanie zwinne Marcin Młotko
- Page 3 and 4: Kiedy refaktoryzować Refaktoryzacj
- Page 5 and 6: Powielony kod Kiedy refaktoryzować
- Page 7 and 8: Prosty przykład void raport(DataLi
- Page 9: Kiedy refaktoryzować Refaktoryzacj
- Page 13 and 14: Przykład po refaktoryzacji double
- Page 15 and 16: Opis Kiedy refaktoryzować Refaktor
- Page 17 and 18: Opis procedury Kiedy refaktoryzowa
- Page 19 and 20: Kiedy refaktoryzować Refaktoryzacj
- Page 21 and 22: Krok 2 Kiedy refaktoryzować Refakt
- Page 23 and 24: Krok 3 Kiedy refaktoryzować Refakt
- Page 25 and 26: Krok 5: tworzenie metody szablonowe
- Page 27 and 28: Kiedy refaktoryzować Refaktoryzacj
- Page 29 and 30: Przykład Kiedy refaktoryzować Ref
- Page 31 and 32: Wydzielenie klasy Kiedy refaktoryzo
- Page 33 and 34: Długa metoda Kiedy refaktoryzować
- Page 35 and 36: Kiedy refaktoryzować Refaktoryzacj
- Page 37 and 38: Jak to zrobić Kiedy refaktoryzowa
- Page 39 and 40: Warianty metody Kiedy refaktoryzowa
- Page 41 and 42: Kiedy refaktoryzować Refaktoryzacj
- Page 43 and 44: Rozwiązanie Kiedy refaktoryzować
- Page 45 and 46: Zalety rozwiązania krótsza liczba
- Page 47 and 48: Kiedy refaktoryzować Refaktoryzacj
- Page 49 and 50: Kiedy refaktoryzować Refaktoryzacj
- Page 51 and 52: float podsuma(Macierz M, wiersz, su
- Page 53 and 54: Kiedy refaktoryzować Refaktoryzacj
- Page 55 and 56: Kiedy refaktoryzować Refaktoryzacj
- Page 57 and 58: Plan wykładu Kiedy refaktoryzować
- Page 59 and 60: Kiedy stosujemy Kiedy refaktoryzowa
Wydzielenie metody ze zmienną<br />
void naglowek(string title) {<br />
Console.WriteLine(’********* {0} *******’, title);<br />
Console.WriteLine(’ Raport z dn. {0} ’, DateTime.Now);<br />
Console.WriteLine(’************************’);<br />
}<br />
void stopka() {<br />
Console.WriteLine(’****************************’);<br />
Console.WriteLine(’*********** Koniec *********’);<br />
Console.WriteLine(’****************************’);<br />
}<br />
void raport(DataList data, string title) {<br />
naglowek(title);<br />
foreach(DataElement d in data)<br />
Console.WriteLine(d.toString());<br />
}