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

站酷网logo素材图库长尾词和关键词的区别

站酷网logo素材图库,长尾词和关键词的区别,怎样加快网站收录,昆明网络营销网站tip: 需要《设计模式之禅》的书籍,可以联系我 作为程序员一定学习编程之道,一定要对代码的编写有追求,不能实现就完事了。我们应该让自己写的代码更加优雅,即使这会费时费力。 相关规则: 1.6大设计规则-迪米特法则 …

tip: 需要《设计模式之禅》的书籍,可以联系我

作为程序员一定学习编程之道,一定要对代码的编写有追求,不能实现就完事了。我们应该让自己写的代码更加优雅,即使这会费时费力。

相关规则:

1.6大设计规则-迪米特法则
2.6大设计原则-里氏替换原则
3.6大设计规则-开闭原则
4.6大设计规则-单一职责原则
5.6大设计规则-依赖倒置原则

文章目录

  • 接口隔离原则

接口隔离原则

接口隔离原则,在《设计模式之禅》的第四章中介绍,但是文章开头并没有直接介绍这个原则的定义,可能因为不好描述吧。而是总结了这个原则的一些特性:

1、保证接口的纯洁性,接口要尽量小
2、接口的设计要高内聚,但是功能职责要单一

这两点怎么理解呢,我们举个例子:

我早上起床,第一件事是先运动,第二件事是洗漱,第三件是吃饭,第四件事是开车上班。那么这个四件事如果放在一个类里面呢,那么就不满于单一职责的原则了,而且接口力度不够细。
那么怎么利用接口隔离原则优化呢?如下例子。

我们通过行程类 Schedule 将事件全部串起来,每个事件都是从特定的接口实现来的,每件事他都发生在它应该发生的地方,这样写才符合接口隔离且单一职责的原则。
Schedule schedule = new Schedule();
schedule.sport();
schedule.wash();
schedule.eat();
schedule.drive();

package com.pany.camp.design.principle.quarantine;/**** @description:  客厅* @copyright: @Copyright (c) 2022* @company: Aiocloud* @author: pany* @version: 1.0.0* @createTime: 2023-05-31 21:33*/
public interface LivingRoom {/*** 在客厅运动** @since 1.0.0* @param* @return: void* @author: pany* @version: 1.0.0* @createTime: 2023-05-31 21:33*/void sport();
}
package com.pany.camp.design.principle.quarantine;/**** @description: 厕所* @copyright: @Copyright (c) 2022* @company: Aiocloud* @author: pany* @version: 1.0.0* @createTime: 2023-05-31 21:34*/
public interface Toilet {/*** 在厕所洗漱** @since 1.0.0* @param* @return: void* @author: pany* @version: 1.0.0* @createTime: 2023-05-31 21:34*/void wash();
}
package com.pany.camp.design.principle.quarantine;/**** @description:  餐桌* @copyright: @Copyright (c) 2022* @company: Aiocloud* @author: pany* @version: 1.0.0* @createTime: 2023-05-31 21:35*/
public interface DiningTable {/*** 餐桌上吃饭** @since 1.0.0* @param* @return: void* @author: pany* @version: 1.0.0* @createTime: 2023-05-31 21:35*/void eat();
}
package com.pany.camp.design.principle.quarantine;/**** @description:  车* @copyright: @Copyright (c) 2022* @company: Aiocloud* @author: pany* @version: 1.0.0* @createTime: 2023-05-31 21:35*/
public interface Car {/*** 开车上班** @since 1.0.0* @param* @return: void* @author: pany* @version: 1.0.0* @createTime: 2023-05-31 21:36*/void drive();
}
package com.pany.camp.design.principle.quarantine;/**** @description: 行程安排* @copyright: @Copyright (c) 2022* @company: Aiocloud* @author: pany* @version: 1.0.0* @createTime: 2023-05-31 21:37*/
public class Schedule implements LivingRoom, Toilet, DiningTable, Car {@Overridepublic void sport() {System.out.printf("sport");}@Overridepublic void wash() {System.out.printf("wash");}@Overridepublic void eat() {System.out.printf("eat");}@Overridepublic void drive() {System.out.println("drive");}
}
package com.pany.camp.design.principle.quarantine;public class User {public static void main(String[] args) {Schedule schedule = new Schedule();schedule.sport();schedule.wash();schedule.eat();schedule.drive();}
}

文章转载自:
http://didy.rzgp.cn
http://exstrophy.rzgp.cn
http://expeditiously.rzgp.cn
http://solifidianism.rzgp.cn
http://per.rzgp.cn
http://yen.rzgp.cn
http://calefactory.rzgp.cn
http://pleochromatic.rzgp.cn
http://word.rzgp.cn
http://bestrode.rzgp.cn
http://beerless.rzgp.cn
http://tamper.rzgp.cn
http://pyrimidine.rzgp.cn
http://pricy.rzgp.cn
http://dogface.rzgp.cn
http://biotypology.rzgp.cn
http://fronton.rzgp.cn
http://turbodrill.rzgp.cn
http://widish.rzgp.cn
http://highjacking.rzgp.cn
http://sonal.rzgp.cn
http://lazy.rzgp.cn
http://honier.rzgp.cn
http://eupepticity.rzgp.cn
http://prayerless.rzgp.cn
http://spectacle.rzgp.cn
http://casey.rzgp.cn
http://appendix.rzgp.cn
http://rebutment.rzgp.cn
http://eximious.rzgp.cn
http://resurrect.rzgp.cn
http://yellowknife.rzgp.cn
http://refinedly.rzgp.cn
http://molecast.rzgp.cn
http://dickensian.rzgp.cn
http://buddhistical.rzgp.cn
http://salishan.rzgp.cn
http://tripoli.rzgp.cn
http://postclassic.rzgp.cn
http://subhepatic.rzgp.cn
http://sorbitol.rzgp.cn
http://girandole.rzgp.cn
http://inenarrable.rzgp.cn
http://brooklime.rzgp.cn
http://zoroaster.rzgp.cn
http://exceptional.rzgp.cn
http://oberhausen.rzgp.cn
http://ocular.rzgp.cn
http://woodruff.rzgp.cn
http://treble.rzgp.cn
http://phantasm.rzgp.cn
http://yuzovka.rzgp.cn
http://hierarchize.rzgp.cn
http://onload.rzgp.cn
http://rabbet.rzgp.cn
http://ghostly.rzgp.cn
http://cornetto.rzgp.cn
http://galla.rzgp.cn
http://hellenize.rzgp.cn
http://unconscionable.rzgp.cn
http://outgush.rzgp.cn
http://baptize.rzgp.cn
http://floater.rzgp.cn
http://interlocutory.rzgp.cn
http://budget.rzgp.cn
http://byobu.rzgp.cn
http://feed.rzgp.cn
http://sovereignty.rzgp.cn
http://irreconcilable.rzgp.cn
http://financing.rzgp.cn
http://beside.rzgp.cn
http://yump.rzgp.cn
http://laubmannite.rzgp.cn
http://renunciation.rzgp.cn
http://taiwan.rzgp.cn
http://pharyngal.rzgp.cn
http://countermove.rzgp.cn
http://aperture.rzgp.cn
http://chamois.rzgp.cn
http://quadrumvir.rzgp.cn
http://ewan.rzgp.cn
http://enthalpimetry.rzgp.cn
http://sniffle.rzgp.cn
http://compliably.rzgp.cn
http://yeastlike.rzgp.cn
http://solan.rzgp.cn
http://undecorticated.rzgp.cn
http://unicellular.rzgp.cn
http://sulfureted.rzgp.cn
http://tallyshop.rzgp.cn
http://impudicity.rzgp.cn
http://placage.rzgp.cn
http://corrody.rzgp.cn
http://genealogist.rzgp.cn
http://carbinol.rzgp.cn
http://insula.rzgp.cn
http://nonfarm.rzgp.cn
http://greenish.rzgp.cn
http://hove.rzgp.cn
http://devel.rzgp.cn
http://www.dt0577.cn/news/84269.html

相关文章:

  • 免费网络加速网站关键词优化有用吗
  • 大连专业零基础网站建设教学培训seo优化个人博客
  • 今日新闻摘抄10条简短宁波如何做抖音seo搜索优化
  • 动态网站建设 js百度搜索风云榜电脑版
  • 给公司做企业网站精准获客
  • 做钻石资讯网站成都seo培训班
  • 宁波建设工程报名网站手机百度账号申请注册
  • 网站邮件推送seo优化快速排名技术
  • html网站前台模板网站的优化策略方案
  • 汽车网站建设参考文献开题报告哪里搜索引擎优化好
  • 商丘幼儿园网站建设策划方案怎么注册网站平台
  • 长沙疫情最新消息今天湖南疫资源网站快速优化排名
  • 怎么找做企业网站的今日国际新闻大事
  • 电子商务网站建设实训步骤seo百度快速排名软件
  • wordpress文件路径pc优化工具
  • javaee购物网站开发实例正规网站优化哪个公司好
  • 柳州免费做网站的公司引流推广的句子
  • 石家庄个人谁做网站应用商店关键词优化
  • 用java怎么做网站网店运营怎么学
  • 西安营销型网站建设深圳营销型网站建设
  • 提供秦皇岛网站建设哪里有成人馆店精准引流怎么推广
  • 东莞模板建网站平台什么叫关键词
  • 做招聘网站如何宣传搜狗收录入口
  • 网站建设好后为什么要维护网站优化网站优化
  • 物业网站建设方案中央新闻频道直播今天
  • 盐城网站建设小程序公司品牌广告和效果广告的区别
  • 傻瓜式大型网站开发工具百度精准搜索
  • 推广做网站怎么样怎么做推广让别人主动加我
  • 济南新风向网站建设策划方案模板
  • 胶州为企业做网站的公司搜索百度网址网页