First commit

This commit is contained in:
2025-11-17 13:34:43 -06:00
commit bde690c9cb
36 changed files with 1363 additions and 0 deletions

10
3 Classes/cross.json Normal file
View File

@@ -0,0 +1,10 @@
{
"info": {
"description": "Change Me",
"short_name": "changeme",
"short_name_pretty": "Change Me",
"type": "console"
},
"name": "ClassExample",
"version": "1.0.0.0-prod"
}

View File

@@ -0,0 +1,5 @@
func main(args)
{
var cls = new Times(6,7);
cls.Print();
}

View File

@@ -0,0 +1,40 @@
class BaseClass {
public abstract getOp();
public abstract getA();
public abstract getB();
public abstract Print();
public ToString()
{
return $"{this.A} {this.Op} {this.B}";
}
}
class Times : BaseClass {
private a;
private b;
public Times(a,b)
{
this.a = a;
this.b = b;
}
public getA()
{
return this.a;
}
public getB()
{
return this.b;
}
public getOp()
{
return "*";
}
public Print()
{
Console.WriteLine($"{this} = {this.a * this.b}");
}
}