摘要:
[实验任务一]:向量的原型 用C++完成数学中向量的封装,其中,用指针和动态申请支持向量长度的改变,使用浅克隆和深克隆复制向量类,比较这两种克隆方式的异同。 #include <iostream> using namespace std; //向量类 class Vector{ private: i 阅读全文
posted @ 2024-10-30 08:22
yblll
阅读(12)
评论(0)
推荐(0)
摘要:
[实验任务一]:计算机组装 使用建造者模式,完成下述任务:计算机组装工厂可以将CPU、内存、硬盘、主机等硬件设备组装在一起构成计算机,计算机的类型可以是笔记本,也可以是台式机。 package test5; public class Computer { private String CPU; pr 阅读全文
posted @ 2024-10-30 08:19
yblll
阅读(17)
评论(0)
推荐(0)
摘要:
[实验任务一]:人与肤色 使用抽象工厂模式,完成下述产品等级结构: package test4; public class BlackFactory implements MWFactory { public Man produceMan() { return new BlackSkinMan(); 阅读全文
posted @ 2024-10-30 08:19
yblll
阅读(23)
评论(0)
推荐(0)
摘要:
[实验任务一]:加密算法 目前常用的加密算法有DES(Data Encryption Standard)和IDEA(International Data Encryption Algorithm)国际数据加密算法等,请用工厂方法实现加密算法系统。 package test3; import java 阅读全文
posted @ 2024-10-30 08:18
yblll
阅读(30)
评论(0)
推荐(0)
摘要:
2555 阅读全文
posted @ 2024-10-30 08:17
yblll
阅读(9)
评论(0)
推荐(0)
摘要:
24444 阅读全文
posted @ 2024-10-30 08:17
yblll
阅读(9)
评论(0)
推荐(0)
摘要:
23333 阅读全文
posted @ 2024-10-30 08:16
yblll
阅读(6)
评论(0)
推荐(0)
摘要:
2222 阅读全文
posted @ 2024-10-30 08:16
yblll
阅读(9)
评论(0)
推荐(0)
摘要:
21111 阅读全文
posted @ 2024-10-30 08:16
yblll
阅读(7)
评论(0)
推荐(0)
摘要:
18888 阅读全文
posted @ 2024-10-30 08:15
yblll
阅读(26)
评论(0)
推荐(0)
摘要:
1777 阅读全文
posted @ 2024-10-30 08:15
yblll
阅读(12)
评论(0)
推荐(0)
摘要:
16666 阅读全文
posted @ 2024-10-30 08:15
yblll
阅读(7)
评论(0)
推荐(0)
摘要:
15555 阅读全文
posted @ 2024-10-30 08:14
yblll
阅读(12)
评论(0)
推荐(0)
摘要:
[实验任务一]:女娲造人 使用简单工厂模式模拟女娲(Nvwa)造人(Person),如果传入参数M,则返回一个Man对象,如果传入参数W,则返回一个Woman对象,如果传入参数R,则返回一个Robot对象。请用程序设计实现上述场景。 package test2; public class Man i 阅读全文
posted @ 2024-10-30 08:14
yblll
阅读(10)
评论(0)
推荐(0)
摘要:
[实验任务一]:UML复习 阅读教材第一章复习UML,回答下述问题: 面向对象程序设计中类与类的关系都有哪几种?分别用类图实例说明。 1. 继承关系 继承指的是一个类(称为子类、子接口)继承另外的一个类(称为父类、父接口)的功能,并可以增加它自己的新功能的能力。在UML类图设计中,继承用一条带空心三 阅读全文
posted @ 2024-10-30 08:12
yblll
阅读(34)
评论(0)
推荐(0)

浙公网安备 33010602011771号