Комментарии:
using System;
namespace MyFirstProgram
{
class Program
{
static void Main(string[] args)
{
// abstract classes = modifier that indicates missing components or incomplete implementation
Car car = new Car();
Bicycle bicycle = new Bicycle();
Boat boat = new Boat();
//Vehicle vehicle = new Vehicle(); //can't create a vehicle object
Console.ReadKey();
}
}
abstract class Vehicle
{
public int speed = 0;
public void go()
{
Console.WriteLine("This vehicle is moving!");
}
}
class Car : Vehicle
{
public int wheels = 4;
int maxSpeed = 500;
}
class Bicycle : Vehicle
{
public int wheels = 2;
int maxSpeed = 50;
}
class Boat : Vehicle
{
public int wheels = 0;
int maxSpeed = 100;
}
}
clean and simple in short video. thank you so much.
ОтветитьI bless the universe that you exist in the same lifetime as me. Thank you so much. I was battling with classes and you narrowed it down for me. I hope this applies well to the work I'm about to do. Thank you once more.
Ответитьrdm comment good vid
Ответитьje je je
ОтветитьThanks bro
ОтветитьRandom comment
ОтветитьI loved that example 😂
Ответитьrandom comment down below
ОтветитьWow! Nice!
ОтветитьBetter explanation than a c# book and ChatGPT. Bravo !
ОтветитьDoesn't the static keyword do the same thing?
ОтветитьYou made it so easy to understand that I just came here to comment. Straight to the point videos are so valuable! Already liked the video and subscribed to your channel🎉
ОтветитьYour videos are perfect. It’s great that you’re sharing the videos in a few minutes
ОтветитьAwesome video man
ОтветитьRandom randomComment = new Random();
ОтветитьThx Bro, the repetition in the end massaged the information into my brain!
Ответитьlove u bro you are the best teacher i have got
ОтветитьBro explained this so well that I'm compelled to comment saying that he did so
ОтветитьAwesome content, very simple
Ответить