摘要: 1.实验任务一 Complex.hpp #pragma once #include <iostream> #include <stdexcept> // 声明 //////////////////////////////////////////////////// // 复数模板类声明 templa 阅读全文
posted @ 2024-12-18 15:28 黄靖然 阅读(9) 评论(0) 推荐(0)
摘要: 实验任务1 publisher.hpp #pragma once #include <iostream> #include <string> using std::cout; using std::endl; using std::string; // 发行/出版物类:Publisher (抽象类) 阅读全文
posted @ 2024-12-07 00:02 黄靖然 阅读(23) 评论(0) 推荐(0)
摘要: 实验任务1: task1_1.cpp #include <iostream> using std::cout; using std::endl; // 类A的定义 class A { public: A(int x0, int y0); void display() const; private: 阅读全文
posted @ 2024-11-21 18:43 黄靖然 阅读(10) 评论(0) 推荐(0)
摘要: 实验一: button.hpp #pragma once #include <iostream> #include <string> using std::string; using std::cout; // 按钮类 class Button { public: Button(const stri 阅读全文
posted @ 2024-11-04 23:16 黄靖然 阅读(24) 评论(0) 推荐(0)
摘要: 实验一 t.h源码: #pragma once #include <string> // 类T: 声明 class T { // 对象属性、方法 public: T(int x = 0, int y = 0); // 普通构造函数 T(const T& t); // 复制构造函数 T(T&& t); 阅读全文
posted @ 2024-10-26 23:59 黄靖然 阅读(11) 评论(0) 推荐(0)
摘要: 任务1: 运行结果如图: 任务2: 运行结果如图: 任务3: 运行结果如图: 任务4: 运行结果如图: 任务5: 运行结果如图: 任务6: 阅读全文
posted @ 2024-10-15 23:02 黄靖然 阅读(9) 评论(0) 推荐(0)