Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F85708194
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
Tue, Oct 1, 11:55
Size
725 B
Mime Type
text/x-c
Expires
Thu, Oct 3, 11:55 (2 d)
Engine
blob
Format
Raw Data
Handle
21248625
Attached To
R9360 PCSC_git
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 "GraduateStudent.hpp"
#include "PhDStudent.hpp"
#include "Student.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