INITIALIZING ALL DATA

If you will examine the example program named INHERIT3.CPP, you will find that we have fixed the initialization problem that we left dangling in the last example program.

The method named init_truck() now contains all four of the parameters as input data which get transferred to the four variables. Following the initialization, it is permissible to call the semi.efficiency() method in line 67 and 68 of the main program.

Be sure to compile and execute this program following your detailed study of it.

Share
Tweet
Share
Pin