```
namespace CSharpDiscovery.Quest04
{
public class Car:Vehicule
{
public string Model { get; set; }
public Car()
{
Model = "Unknown";
}
public Car (string Model, string brand, string color, int CurrentSpeed):base(brand, color, CurrentSpeed)
{
this.Model = Model;
}
public override string ToString()
{
return string.Format("{0} {1} {2}", Color, Brand, Model);
}
public override void Accelerate(int Speed)
{
if (CurrentSpeed + Speed < 200)
{
CurrentSpeed += Speed;
}
else
{
CurrentSpeed = 200;
}
}
public override void Brake(int BrakePower)
{
if (CurrentSpeed - BrakePower > 0)
{
CurrentSpeed -= BrakePower;
}
else
{
CurrentSpeed = 0;
}
}
}
}
```
```
public int GetDistance(PointOfInterest other)
{
double rlat1 = Math.PI * Latitude / 180;
double rlat2 = Math.PI * other.Latitude / 180;
double rtheta = (Longitude - other.Longitude) * Math.PI / 180;
double dist =
Math.Sin(rlat1) * Math.Sin(rlat2) + Math.Cos(rlat1) *
Math.Cos(rlat2) * Math.Cos(rtheta);
dist = Math.Acos(dist);
dist = dist * 180 / Math.PI * 60 * 1.1515 * 1.609344;
return Convert.ToInt32(dist);
}
```
```
namespace CSharpDiscovery.Quest03
{
public class PointOfInterest
{
public string Name { get; set; }
public Double Latitude { get; set; }
public Double Longitude { get; set; }
public static string GoogleMapsUrlTemplate {get;} = "https://www.google.com/maps/place/{0}/@{1},{2},15z/";
public PointOfInterest()
{
Name = "Bordeaux Ynov Campus";
Latitude = 44.854186;
Longitude = -0.5663056;
}
public PointOfInterest(string name, double latitude, double longitude)
{
Name = name;
Latitude = latitude;
Longitude = longitude;
}
public string GetGoogleMapsUrl()
{
return string.Format(GoogleMapsUrlTemplate, Name.Replace(" ", "+"), Latitude, Longitude);
}
public override string ToString()
{
return string.Format("{0} (Lat={1}, Long={2})", Name, Latitude, Longitude);
}
```