Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102853783
ch-07-ex-01-solution.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Feb 24, 21:20
Size
719 B
Mime Type
text/x-c
Expires
Wed, Feb 26, 21:20 (1 d, 20 h)
Engine
blob
Format
Raw Data
Handle
24441576
Attached To
R1106 Programming Concept Rouaze
ch-07-ex-01-solution.cpp
View Options
/*
* chapter-07-exercise-01.cpp
*
* Student management classes
*
* Created on: Oct 25, 2012
* Author: Radu Popescu <radu.popescu@epfl.ch>
*/
#include <iostream>
#include "Student.hpp"
#include "GraduateStudent.hpp"
#include "PhDStudent.hpp"
int main(int argc, char* argv[])
{
Student bill("Bill", 255.75, 999.99);
std::cout << "Bill owes: " << bill.MoneyOwed() << std::endl;
Student jeff("Jeff", -50.2, 999.99);
std::cout << "Jeff owes: " << jeff.MoneyOwed() << std::endl;
GraduateStudent dave("Dave", 10000.99, false);
std::cout << "Dave owes: " << dave.MoneyOwed() << std::endl;
PhDStudent brian("Brian", true);
std::cout << "Brian owes: " << brian.MoneyOwed() << std::endl;
return 0;
}
Event Timeline
Log In to Comment