

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


c:\documents and settings\usman.younis\my documents... studio 2010\Projects\Classes\Classes\Classes.cpp 1 #include
c:\documents and settings\usman.younis\my documents... studio 2010\Projects\Classes\Classes\Classes.cpp 2 int main (void) { Car Maserati, Toyota; Maserati.set_mileage( 5. 3 ); Toyota.set_mileage( 13. 4 ); Maserati.re_fuel( 5000 ); Toyota.re_fuel( 5000 ); Maserati.check_fuel(); Toyota.check_fuel(); Maserati.drive( 100 ); Toyota.drive( 100 ); Maserati.check_fuel(); Toyota.check_fuel(); Maserati.drive( 200 ); Toyota.drive( 200 ); Maserati.check_fuel(); Toyota.check_fuel(); Car Toyota 2 (Toyota); Toyota 2 .check_fuel(); Car Maserati 2 = Maserati; Maserati 2 .check_fuel(); Maserati 2 .dump_fuel(Toyota 2 ); Maserati 2 .check_fuel(); Toyota 2 .check_fuel(); return 0 ; }