随笔分类 -  aardio语言

摘要://Car 实现封装继承多态 import console //父类 class Car{ ctor(make, model, color, year) {//构造函数,用于初始化对象的属性 this.make = make //制造商 this.model = model //型号 this.co 阅读全文
posted @ 2024-05-26 18:40 Axuanup 阅读(90) 评论(0) 推荐(0)
摘要:1 //calculate 简单工厂模式 2 3 //简单工厂模式 4 import console; 5 6 //运算类 7 class operation{ 8 ctor(){}; 9 numberA = 0; 10 numberB = 0; 11 getResult = function(){ 阅读全文
posted @ 2024-05-26 18:39 Axuanup 阅读(49) 评论(0) 推荐(0)
摘要:1 //queue队列结构 2 //队列的特点:先进先出 3 import console; 4 class queueEx{ 5 ctor(){ 6 this.items = {} 7 }; 8 //排队 9 入队 = function(element){ 10 ..table.push(this 阅读全文
posted @ 2024-05-26 18:29 Axuanup 阅读(67) 评论(0) 推荐(0)