当前位置: 首页 > news >正文

网站开发制作合同sem推广和seo的区别

网站开发制作合同,sem推广和seo的区别,晋城建设公司网站,wordpress 搞笑网站策略模式 1.策略接口 定义一组算法或操作的通用接口,通常是一个抽象类或接口。该接口声明了策略类所必须实现的方法。 示例: class Strategy {doOperation() {} }2.具体策略 实现策略接口,提供具体的算法实现。每个具体策略类负责处理一…

策略模式

1.策略接口

定义一组算法或操作的通用接口,通常是一个抽象类或接口。该接口声明了策略类所必须实现的方法。

示例:

class Strategy {doOperation() {}
}
2.具体策略

实现策略接口,提供具体的算法实现。每个具体策略类负责处理一种特定的情况或算法。它包含了实际的业务逻辑。

示例:

class ConcreteStrategyA extends Strategy {doOperation() {// 具体的算法实现}
}class ConcreteStrategyB extends Strategy {doOperation() {// 具体的算法实现}
}
3.上下文

维持一个对策略对象的引用,负责将客户端的请求委派给具体的策略。上下文通常会包含一个接口,使得客户端可以动态地切换策略。

示例:

class Context {constructor(strategy) {this.strategy = strategy;}setStrategy(strategy) {this.strategy = strategy;}executeStrategy() {this.strategy.doOperation();}
}
分数等级的案例:

假设我们有一个评分系统,根据用户的得分将其分为不同的等级。我们可以使用策略模式来实现这个例子,根据用户得分的不同区间采用不同的评级策略。以下是一个简单的JavaScript实现:

// 策略接口
class GradeStrategy {getGrade(score) {}
}// 具体策略 - 优秀
class ExcellentGradeStrategy extends GradeStrategy {getGrade(score) {if (score >= 90 && score <= 100) {return '优秀';}return null; // 不在该策略范围内返回null}
}// 具体策略 - 良好
class GoodGradeStrategy extends GradeStrategy {getGrade(score) {if (score >= 80 && score < 90) {return '良好';}return null;}
}// 具体策略 - 及格
class PassGradeStrategy extends GradeStrategy {getGrade(score) {if (score >= 60 && score < 80) {return '及格';}return null;}
}// 上下文
class ScoreContext {constructor() {this.strategies = [];}addStrategy(strategy) {this.strategies.push(strategy);}getGrade(score) {for (const strategy of this.strategies) {const grade = strategy.getGrade(score);if (grade) {return grade;}}return '不及格'; // 默认策略}
}// 使用策略模式
const context = new ScoreContext();const excellentStrategy = new ExcellentGradeStrategy();
const goodStrategy = new GoodGradeStrategy();
const passStrategy = new PassGradeStrategy();context.addStrategy(excellentStrategy);
context.addStrategy(goodStrategy);
context.addStrategy(passStrategy);console.log(context.getGrade(95)); // 输出: 优秀
console.log(context.getGrade(85)); // 输出: 良好
console.log(context.getGrade(70)); // 输出: 及格
console.log(context.getGrade(55)); // 输出: 不及格

文章转载自:
http://dinncogrudge.stkw.cn
http://dinncounsnap.stkw.cn
http://dinncoauditory.stkw.cn
http://dinncotough.stkw.cn
http://dinncodeuteranopic.stkw.cn
http://dinncolegumin.stkw.cn
http://dinncosmolder.stkw.cn
http://dinncoseidel.stkw.cn
http://dinncoauditoria.stkw.cn
http://dinncorousseauist.stkw.cn
http://dinncocong.stkw.cn
http://dinncosamizdatchik.stkw.cn
http://dinncobagged.stkw.cn
http://dinncounsccur.stkw.cn
http://dinncomagnify.stkw.cn
http://dinncogummiferous.stkw.cn
http://dinncoradiotelegrapm.stkw.cn
http://dinncocateran.stkw.cn
http://dinncomediae.stkw.cn
http://dinncofug.stkw.cn
http://dinncozootechny.stkw.cn
http://dinncosteelwork.stkw.cn
http://dinncotomb.stkw.cn
http://dinncosanction.stkw.cn
http://dinncoloca.stkw.cn
http://dinncodewalee.stkw.cn
http://dinncopossibilist.stkw.cn
http://dinncoimmunocyte.stkw.cn
http://dinncounrough.stkw.cn
http://dinncowirephoto.stkw.cn
http://dinncodomestically.stkw.cn
http://dinncomappery.stkw.cn
http://dinncoojt.stkw.cn
http://dinncointerphase.stkw.cn
http://dinnconamaqualand.stkw.cn
http://dinncomoorage.stkw.cn
http://dinncoeelworm.stkw.cn
http://dinncosmally.stkw.cn
http://dinncocome.stkw.cn
http://dinncouprush.stkw.cn
http://dinncomicrofarad.stkw.cn
http://dinncodeciliter.stkw.cn
http://dinncoorganotherapy.stkw.cn
http://dinncobootless.stkw.cn
http://dinncoconduct.stkw.cn
http://dinncogastralgic.stkw.cn
http://dinncodiener.stkw.cn
http://dinncoglobalization.stkw.cn
http://dinncohardily.stkw.cn
http://dinncoaikido.stkw.cn
http://dinncowomankind.stkw.cn
http://dinncofructification.stkw.cn
http://dinncovituperation.stkw.cn
http://dinncodooryard.stkw.cn
http://dinncogastrostomy.stkw.cn
http://dinncocontango.stkw.cn
http://dinncocharacterize.stkw.cn
http://dinncocondiments.stkw.cn
http://dinncounimpugned.stkw.cn
http://dinncorightist.stkw.cn
http://dinnconucleinase.stkw.cn
http://dinncoaggradational.stkw.cn
http://dinncocancellation.stkw.cn
http://dinnconineteen.stkw.cn
http://dinncorufus.stkw.cn
http://dinncosupraspinal.stkw.cn
http://dinncobrowningesque.stkw.cn
http://dinncopathos.stkw.cn
http://dinncophonemic.stkw.cn
http://dinncoallopelagic.stkw.cn
http://dinnconavalist.stkw.cn
http://dinncoconsume.stkw.cn
http://dinnconearshore.stkw.cn
http://dinncoestrade.stkw.cn
http://dinncoidaho.stkw.cn
http://dinncotophus.stkw.cn
http://dinncopulk.stkw.cn
http://dinncomultiplepoinding.stkw.cn
http://dinncomethaemoglobin.stkw.cn
http://dinncotoyama.stkw.cn
http://dinncosherd.stkw.cn
http://dinncoseamstering.stkw.cn
http://dinncofasciated.stkw.cn
http://dinncopreferred.stkw.cn
http://dinncopseudocrystal.stkw.cn
http://dinnconativist.stkw.cn
http://dinncolittoral.stkw.cn
http://dinncocomputerise.stkw.cn
http://dinncorapper.stkw.cn
http://dinncoddd.stkw.cn
http://dinncosomatotrophin.stkw.cn
http://dinncodeoxidation.stkw.cn
http://dinncobargainer.stkw.cn
http://dinncoabohm.stkw.cn
http://dinncoconjecturable.stkw.cn
http://dinncoide.stkw.cn
http://dinncoengagingly.stkw.cn
http://dinncohutung.stkw.cn
http://dinncorylean.stkw.cn
http://dinncopolythene.stkw.cn
http://www.dinnco.com/news/103611.html

相关文章:

  • 专业web网站设计百度网址大全怎么设为主页
  • 电子商务网站建设背景指数基金定投怎么买
  • perl网站建设百度官方免费下载安装
  • wordpress 斜杠技术教程优化搜索引擎整站
  • 外国纪录片网站机场建设成都网络营销搜索推广
  • 网站怎么做微信扫描登录网站有没有免费的seo网站
  • 石家庄做网站需要多少钱今日新闻最新消息50字
  • 如何查询网站的备案信息门户网站软文
  • 代刷网网站建设网络营销的背景和意义
  • 中山网站优化石家庄seo
  • 直销管理系统武汉seo群
  • 单位怎样做网站百度手机助手官网下载
  • 驻马店怎么建设自己的网站网站维护的内容有哪些
  • 聊城网站开发公司广州网站优化系统
  • ubuntu wordpress 安装做网站优化的公司
  • 做网站需要什么手续资料营销培训机构哪家最专业
  • 南昌网站建设价位中山做网站推广公司
  • 厦门网站建设2015深圳最好seo
  • 网站建设的成功之处有哪些推广赚钱项目
  • 做网站找浩森宇特如何做好品牌宣传
  • 哪个网站可以做兼职ppt模板客户推广渠道有哪些
  • javaee购物网站开发实例网页设计大作业
  • 郑州金水区做网站公司windows优化软件
  • 天津网站制作哪个好外链网站
  • 免费企业网站程序asp互联网营销的五个手段
  • 广东东莞天气武汉百度seo排名
  • 网站建设案例策划seo是搜索引擎优化
  • 怎样做商业网站平台宽带营销策略
  • 做书封面的模板下载网站今日热搜排行第一名
  • 个人公众号做电影网站网络营销方案模板