Пример #1
0
        static void Main(string[] args)
        {
            //
            // write all data files to Data folder
            //
            GenerateDataFiles.InitializeXmlFile();

            List <Product> productList = ReadAllProductsFromXml();

            OrderByCatagory(productList);

            OrderByCatagoryAnoymous(productList);

            //
            // Write the following methods
            //

            // OrderByUnits(): List the names and units of all products with less than 10 units in stock. Order by units.
            OrderByUnitsAnonymous(productList);

            // OrderByPrice(): List all products with a unit price less than $10. Order by price.
            OrderedByPriceAnonymous(productList);

            // FindExpensive(): List the most expensive Seafood. Consider there may be more than one.
            FindExpensiveAnonymous(productList);

            // OrderByTotalValue(): List all condiments with total value in stock (UnitPrice * UnitsInStock). Sort by total value.
            OrderByTotalValueAnonymous(productList);

            // OrderByName(): List all products with names that start with "S" and calculate the average of the units in stock.
            OrderByNameAnonymous(productList);

            // Query: Student Choice - Minimum of one per team member
            OrderByGrainCereal(productList);
        }
Пример #2
0
        static void Main(string[] args)
        {
            Console.WindowWidth = 150;

            //
            // write all data files to Data folder
            //
            GenerateDataFiles.InitializeXmlFile();

            List <Product> productList = ReadAllProductsFromXml();

            OrderByCatagory(productList);

            OrderByCatagoryAnoymous(productList);

            OrderByUnits(productList);

            OrderByPrice(productList);

            FindExpensive(productList);

            OrderByTotalValue(productList);

            OrderByName(productList);

            AveragePricePerCategory(productList);

            FullList(productList);
        }
Пример #3
0
        static void Main(string[] args)
        {
            //
            // write all data files to Data folder
            //
            //GenerateDataFiles.InitializeXmlFile();

            List <Product> productList = GenerateDataFiles.InitializeProductList();

            OrderByCatagory(productList);            // -- Example, John

            OrderByCatagoryAnoymous(productList);    // -- Example, John

            OrderByCatagoryExpensive(productList);   // -- Morgan

            OrderByLowOnStock(productList);          // -- Morgan - student choice

            OrderByTotalValueAnonymous(productList); // -- Wyatt

            OrderByNameAnonymous(productList);       // -- Wyatt

            OrderByStockAnonymous(productList);      // -- Wyatt, custom

            OrderByStartingWithL(productList);       // -- Justina

            OrderByUnits(productList);               // -- Justina

            OrderByPrice(productList);               // -- Justina

            //
            // Write the following methods
            //

            // OrderByUnits(): List the names and units of all products with less than 10 units in stock. Order by units. -- Justina

            // OrderByPrice(): List all products with a unit price less than $10. Order by price. -- Justina

            // FindExpensive(): List the most expensive Seafood. Consider there may be more than one. -- Morgan

            // OrderByTotalValue(): List all condiments with total value in stock (UnitPrice * UnitsInStock). Sort by total value. -- Wyatt

            // OrderByName(): List all products with names that start with "S" and calculate the average of the units in stock. -- Wyatt

            // Query: Student Choice - Minimum of one per team member
        }