SHARE
TWEET

Untitled

a guest Sep 18th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7.  
  8. namespace Lab1.Exercises.RealEstateAgency_U1_6
  9. {
  10.     class Program
  11.     {
  12.  
  13.         static void Main(string[] args)
  14.         {
  15.             //CLASS SETTINGS
  16.             string fileName = "HousesList.csv";
  17.             string selectedType = "Brick";
  18.             int BrickArea = 100;
  19.             string outputFileName = "M100.csv";
  20.  
  21.             // READING THE FILE && PRINTING RAW FILE TO CONSOLE(for testing)
  22.             List<House> AllHouses = InOutUtils.ReadFile(fileName);
  23.             //InOutUtils.PrintResultsToConsole(AllHouses);
  24.  
  25.             //PRINT RAW FILE TO TXT AS TABLE
  26.             InOutUtils.WriteHousesToTXT(AllHouses, "pradiniai.txt");
  27.  
  28.             //FINDING THE OLDEST HOUSE(S) & PRINTING RESULTS
  29.             List<House> housesBuildYears = HouseUtils.FindHousesByBuildYear(AllHouses, (int)HouseUtils.OldestHouseStreets(AllHouses));
  30.             Console.WriteLine("Oldest houses:");
  31.             InOutUtils.PrintLimitedResultsToConsole(housesBuildYears); //ar tikrai tinkama funkcija nes viska isspausdina?
  32.  
  33.             /*
  34.             //FINDING THE OLDEST HOUSE(S) & PRINTING RESULTS
  35.             List<House> housesBuildYears = HouseUtils.OldestHouseStreets(AllHouses, selectedType);
  36.             Console.WriteLine("");
  37.             Console.WriteLine("{0} filtered houses:", selectedType);
  38.             InOutUtils.PrintLimitedResultsToConsole(housesBuildYears);
  39.             */
  40.  
  41.             // FINDING THE MOST SOLD HOUSE(S) IN STREET
  42.             Console.WriteLine("The most sold houses in street: ");
  43.             InOutUtils.PrintStringListToConsole(HouseUtils.FindHousesByAmount(AllHouses, HouseUtils.FindMaxHouseCountByStreet(AllHouses)));
  44.  
  45.             /*
  46.            
  47.             //SORTING BY BRICK HOUSE AREA & PRINTING RESULTS
  48.             List<House> housesByAge = HouseUtils.FindHousesByAge(AllHouses, oldCarAgeLimit);
  49.             InOutUtils.WriteCarsToCSV(carsByAge, outputFileName);
  50.             */
  51.             Console.ReadKey();
  52.         }
  53.  
  54.     }
  55. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top