/************************************************************************* * * Homework 4: Exploring continuous deployment. * * File Name: quote.cpp * Course: CPTR 245 * */ #include "Quotes.h" #include #include #include Quotes::Quotes(unsigned int seed) { this->seed = seed; quotes = { {"Andrew Platner", "", ""}, {"Austin Garner", "Men talk of killing time, while time quietly kills them.", "Dion Boucicault"}, {"Cameron Bierwagen", "", ""}, {"Elon Bontemps", "True humility is not thinking less of yourself; it is thinking of " "yourself less", "C.S. Lewis"}, {"Ivan Guillen", "Logic will get you from A to B. Imagination will take you " "everywhere.", "Albert Einstein"}, {"James Foster", "The most disastrous thing that you can ever learn is your first " "programming language.", "Alan Kay"}, {"Jarod Owen", "I do not fear computers. I fear lack of them.", "Isaac Asimov"}, {"Jeff Peters", "God does not play dice with the universe.", "A. Einstein"}, {"Kaelan Willauer", "Action without a name, a 'who' attached to it, is meaningless.", "St. Jerome"}, {"Luke Hagan", "", ""}, {"Luke Irvine", "Life is what happens when you're busy making other plans.", "Lennon"}, {"Michael Stacy", "Measuring programming progress by number of lines " "is like measuring aircraft build process by the weight", "anonymous author"}, {"Nelson Phillips", "Ogres are like onions, they have layers", "Shrek"}, {"Noah Olsen", "The greatest teacher, failure is", "Master Yoda"}, {"Owen Hoffman", "", ""}, {"Welcome! Please select a menu option.", "Talk is cheap. Show me the code.", "Linus Torvalds"}, {"Samuel Nguyen", "", ""}, {"Trevor Claridge", "Its easy to make frends if you let pepul laff at you.", "Daniel Keyes"}, {"Trevor Natiuk", "Before you marry a person, you should first make " "them use a computer with slow Internet to see who they really are", "Will Ferrell"}, {"Will Hensel", "The question of whether a computer can think is no more " "interesting than the question of whether a submaring can swim.", "Edsger W. Dijkstra"}, }; } Quote Quotes::getRandomQuote() { int index = rand_r(&seed) % quotes.size(); return quotes.at(index); } Quote Quotes::getQuote(int id) { int index = id % quotes.size(); return quotes.at(index); }