//Question 5
//Q5.1 - 1
//application class created
program CandidatePaperUI;

{$APPTYPE CONSOLE}

{$R *.res}

uses
  System.SysUtils,
  uCandidate in 'uCandidate.pas',
  uResearchPaper in 'uResearchPaper.pas',
  uCandidatePaperManager in 'uCandidatePaperManager.pas';

var

  cpm : tCandidatePaperManager;
begin
  try
    { TODO -oUser -cConsole Main : Insert code here }
    //Q5.2 - 1
    //create CandidatePaperManager object
    cpm := TCandidatePaperManager.Create();
    //Q5.3  - 1
    //calling the displayAllCandidates method
    WriteLn(cpm.displayAllCandidates());

    //Q5.4 - 2
    //calling the sortByYear method and redisplaying
    cpm.sortByYear();
    WriteLn(cpm.displayAllCandidates());

    //Q7.3 - 1
    //call the reviewResearchPapers method
    WriteLn(cpm.reviewResearchPapers());
    //Q8.2 - 2
    //call the doctoralCandidates method in correct place
    WriteLn(cpm.doctoralCandidates());
    ReadLn;

  except
    on E: Exception do
      Writeln(E.ClassName, ': ', E.Message);
  end;
end.
