摘要: 实验任务1 contestant.hpp #pragma once #include <iomanip> #include <iostream> #include <string> struct Contestant { long id; // 学号 std::string name; // 姓名 阅读全文
posted @ 2025-12-24 00:24 15468483 阅读(4) 评论(1) 推荐(0)
摘要: 实验任务1 publisher.hpp #pragma once #include <string> // 发行/出版物类:Publisher (抽象类) class Publisher { public: Publisher(const std::string &name_ = ""); // 构 阅读全文
posted @ 2025-12-17 00:28 15468483 阅读(3) 评论(1) 推荐(0)
摘要: 实验任务1 GradeCalc.hpp #pragma once #include <vector> #include <array> #include <string> class Gradecalc { public: Gradecalc(const std::string &cname); v 阅读全文
posted @ 2025-12-03 00:26 15468483 阅读(5) 评论(1) 推荐(0)
摘要: 实验任务1 window.hpp #pragma once #include <iostream> #include <vector> #include <algorithm> #include "button.hpp" // 窗口类 class Window{ public: Window(con 阅读全文
posted @ 2025-11-26 00:56 15468483 阅读(7) 评论(1) 推荐(0)
摘要: 实验任务1 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 @ 2025-10-29 01:16 15468483 阅读(7) 评论(1) 推荐(0)
摘要: 任务一 代码: // 现代C++标准库、算法库体验 // 本例用到以下内容: // 1. 字符串string, 动态数组容器类vector、迭代器 // 2. 算法库:反转元素次序、旋转元素 // 3. 函数模板、const引用作为形参 #include <iostream> #include <s 阅读全文
posted @ 2025-10-17 23:52 15468483 阅读(11) 评论(1) 推荐(0)
摘要: 任务1 task1 #include "Complex.hpp" #include <iostream> #include <fstream> #include <stdexcept> // 测试1:复数模板类测试 void test1() { using namespace std; Comple 阅读全文
posted @ 2023-12-17 21:57 15468483 阅读(16) 评论(0) 推荐(0)
摘要: 任务3 pets #include <iostream> #include <string> #pragma once using namespace std; class MachinePets { private: string nickname; public: MachinePets(con 阅读全文
posted @ 2023-12-04 00:17 15468483 阅读(12) 评论(0) 推荐(0)
摘要: 任务5 Textcoder #include<iostream> #include<string> using namespace std; class Textcoder { public: Textcoder(string t); string get_ciphertext(); string 阅读全文
posted @ 2023-11-30 15:10 15468483 阅读(17) 评论(0) 推荐(0)
摘要: 任务1 #ifndef T_H #define T_H #include <iostream> #include <string> using namespace std; class T { public: T(int x = 0, int y = 0); T(const T &t); T(T & 阅读全文
posted @ 2023-10-22 23:33 15468483 阅读(16) 评论(0) 推荐(0)