//$marc = new NamePopularityRecord('Marc', 'M', 1962, 1500, 900000, metaphone('Marc')); //$marc->setName('Marc'); //$marc->setGender('M'); //$marc->setYear(1962); //$marc->setCount(1500); //$marc->setTotal(900000); //$jill = new NamePopularityRecord('Jill', 'F', 1990, 3000, 1000000, metaphone('Jill')); //$jill->setName('Jill'); //$jill->setGender('F'); //$jill->setYear(1990); //$jill->setCount(3000); //$jill->setTotal(100000); $metaphone = isset($_GET[METAPHONE_KEY]) ? $_GET[METAPHONE_KEY] : 'MR'; $gender = isset($_GET[GENDER_KEY]) ? $_GET[GENDER_KEY] : 'F'; $records = new MetaphoneSet($metaphone, $gender, NUM_BARS); $chart = new MetaphoneBarChart($records->getRecords(), BAR_CHART_HEIGHT); ?> <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Week 9 Object-Orientated Programming</title> <link rel="stylesheet" href="includes/week9.css.php" type="text/css"> <script src="includes/week9.js.php"></script> </head> <body> <div class="center"><h1>Report for <?php echo $metaphone; ?>
//$jill->setGender('F'); //$jill->setYear(1990); //$jill->setCount(3000); //$jill->setTotal(100000); //$records = new NameSet('Keith', 'M', 'MRK'); $records = new MetaphoneSet('MRK', 'M', 50); //$chart = new BarChart($records->getRecords(), 400); ?> <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Week 9 Object-Orientated Programming</title> <link rel="stylesheet" href="includes/week9.css.php" type="text/css"> <script src="includes/week9.js.php"></script> </head> <body> <pre> <?php foreach ($records->getRecords() as $record) { MetaphoneSet::$count++; $record->setRank(MetaphoneSet::$count); } print_r($records); MetaphoneSet::whatAmI(); ?> </pre> </body> </html>