Write a program to create a vehicle Class with nax_speed and mileage instance attributes
using System;
using System.Collections.Generic;
using System.IO;
class Vehicle
{
double max_speed;
double mileage;
public Vehicle(double max_speed, double mileage)
{
this.max_speed = max_speed;
this.mileage = mileage;
}
}
class Program
{
static void Main(String[] args)
{
Vehicle car = new(111, 2500);
}
}
Comments
Leave a comment