10 2023 档案

摘要:public class 中介者模式 { public static void main(String[] args) { Mediator mediator=new ConcreteMediator(); ColleagueA colleagueA=new ColleagueA(mediator) 阅读全文
posted @ 2023-10-31 22:23 辞楠 阅读(6) 评论(0) 推荐(0) 编辑
摘要:import java.util.ArrayList; import java.util.List; public class 访问者结构 { public static void main(String[] args) { Visit visit1=new VisitA(); Visit visi 阅读全文
posted @ 2023-10-31 21:32 辞楠 阅读(6) 评论(0) 推荐(0) 编辑
摘要:public class 策略模式 { public static void main(String[] args) { Strategy add=new ConcreteStrategyA(); Strategy sub=new ConcreteStrategyB(); Strategy mult 阅读全文
posted @ 2023-10-31 19:31 辞楠 阅读(5) 评论(0) 推荐(0) 编辑
摘要:public class 状态模式 { public static void main(String[] args) { Context context=new Context(); context.Request(); context.Request(); context.Request(); / 阅读全文
posted @ 2023-10-31 17:37 辞楠 阅读(5) 评论(0) 推荐(0) 编辑
摘要:import java.util.ArrayList; import java.util.List; public class 观察者模式 { public static void main(String[] args) { Subject subjectA = new ConcreteSubjec 阅读全文
posted @ 2023-10-31 16:31 辞楠 阅读(6) 评论(0) 推荐(0) 编辑
摘要:public class 命令模式 { public static void main(String[] args) { Tv tv=new Tv(); Command onCommand=new OnCommand(tv); Command offCommand=new OffCommand(tv 阅读全文
posted @ 2023-10-31 15:15 辞楠 阅读(4) 评论(0) 推荐(0) 编辑
摘要:import java.nio.channels.Pipe; public class 享元模式 { public static void main(String[] args) { pieceFactory factory=new pieceFactory(); Piece whitePiece= 阅读全文
posted @ 2023-10-30 21:49 辞楠 阅读(2) 评论(0) 推荐(0) 编辑
摘要:public class 装饰器模式 { public static void main(String[] args) { //第一种写法 Person person=new Student("张三"); person.Operation(); System.out.println(); perso 阅读全文
posted @ 2023-10-30 20:53 辞楠 阅读(3) 评论(0) 推荐(0) 编辑
摘要:import java.util.ArrayList; import java.util.List; public class 组合模式 { public static void main(String[] args) { AbstractFile fileA=new File("fileA"); 阅读全文
posted @ 2023-10-30 19:45 辞楠 阅读(4) 评论(0) 推荐(0) 编辑
摘要:类图 代码 package test; import java.util.ArrayList; import java.util.List; public class Test4 { public static void main(String[] args) { Director director 阅读全文
posted @ 2023-10-26 21:46 辞楠 阅读(5) 评论(0) 推荐(0) 编辑
摘要:类图 代码 package test; import java.util.Scanner; public class test3 { public static void main(String[] args) { Factorys factory=null; ProductA productA=n 阅读全文
posted @ 2023-10-26 21:22 辞楠 阅读(2) 评论(0) 推荐(0) 编辑
摘要:类图 代码 package test; import java.util.Scanner; public class Test2 { public static void main(String[] args) { System.out.println("请输入你选择的算法"); Scanner s 阅读全文
posted @ 2023-10-26 20:31 辞楠 阅读(3) 评论(0) 推荐(0) 编辑
摘要:六寻址 立即寻址最快,寄存器寻址次之,直接寻址较慢,寄存器间接寻址最慢 阅读全文
posted @ 2023-10-26 20:20 辞楠 阅读(2) 评论(0) 推荐(0) 编辑
摘要:类图 package test; import java.util.Scanner; public class test1 { public static void main(String[] args) { Scanner sc=new Scanner(System.in); String typ 阅读全文
posted @ 2023-10-26 20:19 辞楠 阅读(1) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示