示例#1
0
int main()
{
    CV johnsCV{ "John Jonson", 1978,"C++, Java" };
        JobRecord johnsJR1{ 1996,2002,"senior","Microsoft" };
        JobRecord johnsJR2{ 1990,1995,"junior","IBM" };
        johnsCV.addJobRecord(johnsJR1);
        johnsCV.addJobRecord(johnsJR2);

        CV dansCV("Dan Davidson", 1988, "C++, Java"/*, "IBM 1996-1997"*/);
        JobRecord dansJR1{ 1996,1997,"developer","IBM" };
        dansCV.addJobRecord(dansJR1);

        CV willsCV{ "Will Walker", 1971, "C++, Java"/*, "IBM 1990-1999; Microsoft 1999-2010" */};
        JobRecord willsJR1{ 1990, 1999, "junior developer", "IBM" };
        JobRecord willsJR2{ 1999, 2010, "senior software developer", "Microsoft" };
        willsCV.addJobRecord(willsJR1);
        willsCV.addJobRecord(willsJR2);

        std::vector<CV> cvList{ johnsCV, dansCV, willsCV };

        for (const auto& cv : cvList)
        {
            if (cv.isValid())
            {
                cv.print();
            }
            else
            {
                std::cout << "ERROR: CV is invalid" << std::endl;
            }
        }

        return 0;
}
示例#2
0
文件: main.cpp 项目: pgmvp/cvmanager
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;


 }
示例#3
0
int main()
{
    CV johnsCV {"John Jonson", 1978,"C++, Java", "IBM 1990-1995; Microsoft 1996-2002"};

    CV dansCV("Dan Davidson", 1988, "C++, Java", "IBM 1996-1997");

//    std::array<CV, 3> cvList {johnsCV, dansCV, {"Will Walker", 197, "C++, Java", "IBM 1990-1999; Microsoft 1999-2010"} };
    std::vector<CV> cvList {johnsCV, dansCV, {"Will Walker", 197, "C++, Java", "IBM 1990-1999; Microsoft 1999-2010"} };

    for (const auto& cv: cvList)
    {
        if (cv.isValid())
        {
            cv.print();
        }
        else
        {
            std::cout << "ERROR: CV is invalid" << std::endl;
        }
    }

    return 0;
}
示例#4
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;
}