David Newton wrote:That went well.
rehman ali wrote:i m having problem in these steps.
3. A method fuelNeeded() that will take distance (in kilo meter) as an argument. It will calculate the amount of fuel needed for the given distance and will return the value of fuel needed for given distance. You can use the attributes ‘Fuel consumption’ defined within above Vehicle class to determine the fuel needed for the given distance. You are required to implement this functionality by yourself.
in step 3:
there is not distance declared in data members so who we will pass the argument to fuelNeeded() method.
rehman ali wrote:
kindly check these method and tell me the logical & stynax mistake in it.
David Newton wrote:Please UseCodeTags when posting code or configuration. Unformatted code and configuration is very difficult to read. You can edit your post to include them by using the button.