1_9tdiMamkaMu

Bus

Apr 21st, 2021 (edited)
348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.56 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4.  
  5. namespace Vehicles.Models
  6. {
  7.    public class Bus : Vehicle
  8.     {
  9.         public Bus(double fuelQuantity, double fuelConsum, double tankCapacity) : base(fuelQuantity, fuelConsum , tankCapacity)
  10.         {
  11.  
  12.         }
  13.         public override void Drive(double distance)
  14.         {
  15.             this.FuelConsumption += 1.4;
  16.             base.Drive(distance);
  17.         }
  18.         public void DriveEmpty(double distance)
  19.         {
  20.             base.Drive(distance);
  21.         }
  22.        
  23.     }
  24. }
  25.  
Add Comment
Please, Sign In to add comment