int main() { JobRecord jfirstj {1991, 2001, "Global", "junior developer"}; JobRecord jsecondj {2001, 2002, "Global", "junior developer"}; CV johnsCV {"John Jonson", 1978,"C++, Java"}; if (jfirstj.isValid() && jsecondj.isValid()) { johnsCV.addJobRecord(jfirstj); johnsCV.addJobRecord(jsecondj); } JobRecord dfirstj {1994, 2000, "Global", "junior developer"}; JobRecord dsecondj {1994, 2000, "Global", "junior developer"}; CV dansCV("Dan Davidson", 1988, "C++, Java"); if (dfirstj.isValid() && dsecondj.isValid()) { dansCV.addJobRecord(dfirstj); dansCV.addJobRecord(dfirstj); } vector<CV> resume_list {johnsCV, dansCV}; int min_exp {5}; for ( auto& cv: resume_list) { int sum_ex = cv.Total_experience(); if (cv.isValid() && sum_ex >= min_exp) cv.print(); } return 0; }
int main() { CV johnsCV {"John Jonson", 1978,"C++, Java"}; JobRecord JohnsRecord {1991,1993,"junior","Microsoft"}; JobRecord JohnsRecord2 {1993,1995,"developer","IBM"}; johnsCV.addJobRecord(JohnsRecord); johnsCV.addJobRecord(JohnsRecord2); CV dansCV("Dan Davidson", 1988, "C#, Objective C"); JobRecord DansRecord {1993,1995,"junior","Microsoft"}; JobRecord DansRecord2 {1995,2000,"senior software developer","Apple Inc"}; dansCV.addJobRecord(DansRecord); dansCV.addJobRecord(DansRecord2); CV jeffsCV("Jeff Hardy", 1973, "C/C++"); JobRecord JeffsRecord {2005,2007,"junior","IBM"}; JobRecord JeffsRecord2 {2009,2014,"developer","Microsoft"}; jeffsCV.addJobRecord(JeffsRecord); jeffsCV.addJobRecord(JeffsRecord2); // std::array<CV, 3> cvList {johnsCV, dansCV, {"Will Walker", 197, "C++, Java", "IBM 1990-1999; Microsoft 1999-2010"} }; std::vector<CV> cvList {johnsCV, dansCV , jeffsCV}; for (const auto& cv: cvList) { if (cv.isValid()&&(cv.TotalJobTime>5)) { cv.print(); } else { std::cout << "ERROR: CV is invalid" << std::endl; } } return 0; }
int main() { CV johnsCV {"John Jonson", 1978,"C++, Java"}; CV dansCV("Dan Davidson", 1988, "C++, Java"); johnsCV.addJobRecord(JobRecord(1997,2000,"Junior Developer", "Microsoft" )); dansCV.addJobRecord(JobRecord(1999, 2001, "Developer", "IBM")); std::vector<CV> cvList {johnsCV, dansCV}; for (const auto& cv: cvList) { if (cv.isValid()) { cv.print(); } else { std::cout << "Error: CV is invalid" << std::endl; } } return 0; }