Console.WriteLine("Set firstValue");
decimal first = Convert.ToDecimal(Console.ReadLine());
first variable
Console.WriteLine("Set Changeable Value");
decimal changeable = first + 5;
second value depends on first value
Console.WriteLine("Set firsValue again");
first=Convert.ToDecimal(Console.ReadLine());
when change first value change otomatically changeable value. But I want to use observer and strategy design pattern really I mess up
Aucun commentaire:
Enregistrer un commentaire