Ejemplo n.º 1
0
        // Big Three:
        // Encapsulation - allows us to build abstractions by hiding details.
        // Iheritance
        // Polymorphism
        static void Main(string[] args)
        {
            // The code has been abstracted (encapsulation) so that you do not have to understand the intricacies
            // of the underlying code.
            // This is similar to a driver getting into a car without understanding exactly how
            // the engine operates.

            var loader   = GetLoaderFor(args[0]);
            var parser   = new StockQuoteCsvParser(loader);
            var analyzer = new StockQuoteAnalyzer(parser);

            foreach (var reversal in analyzer.FindReversals())
            {
                PrintReversal(reversal);
            }
        }
Ejemplo n.º 2
0
 public StockQuoteAnalyzer(StockQuoteCsvParser parser)
 {
     Quotes = parser.ParseQuotes().ToList();
 }