2025年12月2日
摘要: 实验任务1源代码: 1 #pragma once 2 3 #include <vector> 4 #include <array> 5 #include <string> 6 7 class GradeCalc { 8 public: 9 GradeCalc(const std::string& c 阅读全文
posted @ 2025-12-02 11:16 豪雅 阅读(1) 评论(0) 推荐(0)
  2025年11月24日
摘要: 实验任务1源代码: 1 #pragma once 2 #include <iostream> 3 #include <string> 4 class Button { 5 public: 6 Button(const std::string& label_); 7 const std::string 阅读全文
posted @ 2025-11-24 20:12 豪雅 阅读(9) 评论(1) 推荐(0)
  2025年10月28日
摘要: 实验任务1源代码: 1 #pragma once 2 #include <string> 3 // 类T: 声明 4 class T { 5 // 对象属性、方法 6 public: 7 T(int x = 0, int y = 0); // 普通构造函数 8 T(const T& t); // 复 阅读全文
posted @ 2025-10-28 20:55 豪雅 阅读(7) 评论(1) 推荐(0)
  2025年10月16日
摘要: 一、实验任务1源代码: 1 #include <iostream> 2 #include <string> 3 #include <vector> 4 #include <algorithm> 5 // 模板函数声明 6 template<typename T> 7 void output(cons 阅读全文
posted @ 2025-10-16 20:22 豪雅 阅读(7) 评论(1) 推荐(0)
  2023年12月16日
摘要: task4源代码: 1 #pragma once 2 3 #include<iostream> 4 #include<stdexcept> 5 #include<cassert> 6 #include<iomanip> 7 8 using namespace std; 9 10 template < 阅读全文
posted @ 2023-12-16 16:04 豪雅 阅读(19) 评论(0) 推荐(0)
  2023年12月13日
摘要: task3源代码: 1 #pragma once 2 3 #include<iostream> 4 #include<string> 5 6 using namespace std; 7 8 class MachinePets { 9 public: 10 MachinePets(const str 阅读全文
posted @ 2023-12-13 21:32 豪雅 阅读(10) 评论(0) 推荐(0)
摘要: task5源代码: 1 #pragma once 2 3 #include<iostream> 4 #include<string> 5 6 using namespace std; 7 8 class TextCoder { 9 public: 10 TextCoder() = default; 阅读全文
posted @ 2023-12-13 17:37 豪雅 阅读(21) 评论(0) 推荐(0)
  2023年11月5日
摘要: task1源代码: #pragma once #include <iostream> using std::cout; using std::endl; class Point { public: Point(int x0 = 0, int y0 = 0); ~Point() = default; 阅读全文
posted @ 2023-11-05 20:42 豪雅 阅读(27) 评论(0) 推荐(0)
  2023年10月23日
摘要: 任务三源代码: 1 #include "Complex.h" 2 #include<iostream> 3 #include<cmath> 4 5 Complex::Complex(double real, double imag): real{real}, imag{imag} {} 6 Comp 阅读全文
posted @ 2023-10-23 00:06 豪雅 阅读(15) 评论(0) 推荐(0)
  2023年10月19日
摘要: 1.实验任务一 task1源代码: 1 // 标准库string, vector, array基础用法 2 3 #include<iostream> 4 #include<string> 5 #include<vector> 6 #include<array> 7 8 // 函数模板 9 // 对满 阅读全文
posted @ 2023-10-19 21:16 豪雅 阅读(27) 评论(0) 推荐(0)