-
实验3
任务1 源代码 button.hpp 点击查看代码 #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label); const std::strin -
实验3
实验3 类和对象_基础编程2 任务1:组合类的定义和使用(GUI 窗口与按钮) 1. button.hpp #pragma once #include <iostream> #include <string> class Button { public: Button(const std::stri -
实验三
实验一 问题一 是组合关系,在window类中,buttons_被声明为std::vectorButtonbuttons_;这里使用的是值。Button对象的生命周期完全由Window对象掌控着,如果Window被销毁,里面的按钮也会跟着消失。 问题二 1.优点是可以直接外部调用,不需要依靠公有函数 -
实验三
实验3 类和对象_基础编程2 一、实验目的 理解类的组合(has-a)关系,掌握组合类的定义与使用方法。 区分深拷贝与浅拷贝,掌握动态内存管理场景下拷贝构造函数、析构函数、赋值函数的编写。 熟练使用std::vector、std::string容器,掌握迭代器与常用STL算法。 运用面向对象思想设计 -
实验3
四、实验结论 1.实验任务1 button.hpp: #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label); const std::stri -
实验3
实验任务1 源代码 button.hpp 点击查看代码 #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label); const std::str -
实验三
实验3 任务1 代码 #pragma once #include<iostream> #include<string> class Button{ public: Button(const std::string &label); const std::string& get_label() con -
高级语言程序设计课程第六次个人作业
高级语言程序设计第六次作业 这个作业属于哪个课程:https://edu.cnblogs.com/campus/fzu/2026gjyycxsj 这个作业要求在哪里: https://edu.cnblogs.com/campus/fzu/2026gjyycxsj/homework/16752 学号: -
高级语言程序设计第6次作业
高级语言程序设计第六次作业 这个作业属于哪个课程:https://edu.cnblogs.com/campus/fzu/2026gjyycxsj 这个作业要求在哪里: https://edu.cnblogs.com/campus/fzu/2026gjyycxsj/homework/16752 学号: -
高级语言程序设计课程第六次个人作业
1.代码 1.运行结果 2.代码 2.运行结果 3.代码 3.运行结果 4.代码 4.运行结果 5.代码 5.运行结果 6.代码 6.运行结果 7.代码 7.运行结果 8.代码 8.运行结果 9.代码 9.运行结果 10.代码 10.运行结果 11.代码 11.运行结果 12.代码 12.运行结果 -
高级语言程序设计课程第六次个人作业
https://edu.cnblogs.com/campus/fzu/2026gjyycxsj https://edu.cnblogs.com/campus/fzu/2026gjyycxsj/homework/16752 杨郑伟 102500425 -
第四章贪心问题
“删数问题”分析、证明及复杂度 【问题分析】 给定一个n位正整数a,去掉其中任意k(k<=n)个数字后,剩下的数字按原次序排列组成一个新的正整数。目标是找出剩下数字组成的新数最小的删数方案。 【贪心策略】 为了让剩下的数字组成的数最小,我们需要让高位(靠左)的数字尽可能小。 贪心策略如下:从左向右扫 -
第四章贪心算法
1.贪心策略:要从左到右保留n-k个数字,使结果最小;核心思想是高位数字越小,整个数越小。扫描输入的数字串,扫描到当前数字d比栈顶小,且在还能删数的情况下,删掉栈顶,让前一位更大的数被更小的低位数替换。扫描完后如果还剩删除名额k,从末尾删,最后去掉前面0的部分,若全删完则输出0 2.贪心选择性质证明 -
第二次团队作业
三元 Agent 工作室 第二次团队作业——原型设计+概要设计 作业所属课程 作业要求 作业的目标 在第一次选题基础上,完成 MyAgent 的原型设计与概要设计:产出可交互的原型、自顶向下的功能模块与 UML 设计、数据库概念/逻辑设计,并以周为单位固化团队协作计划 团队名称 三元 Agent 工 -
高级语言程序第六次个人作业
高级语言程序第六次作业: 本次作业来自:https://edu.cnblogs.com/campus/fzu/2026gjyycxsj 本次作业的要求: https://edu.cnblogs.com/campus/fzu/2026gjyycxsj/homework/16752 姓名:白嘉成 学号: -
高级语言程序设计第六次作业
高级语言程序设计第六次作业 这个作业属于哪个课程:https://edu.cnblogs.com/campus/fzu/2026gjyycxsj 这个作业要求在哪里:https://edu.cnblogs.com/campus/fzu/2026gjyycxsj/homework/16752 学号:0 -
第二次团队作业(原型设计+概要设计)
BMPT第二次团队作业——原型设计+概要设计 作业所属课程 计科24级78班(广东工业大学 - 计算机学院) 作业要求 团队项目第二次作业 原型设计+概要设计 作业的目标 在第一次作业需求分析的基础上,完成前台与后台原型设计、UML 建模与数据库设计,并给出可执行的迭代计划与分工,为编码阶段提供依据 -
高级语言程序设计课程第六次个人作业
这个作业属于2026级高级语言程序设计课程:https://edu.cnblogs.com/campus/fzu/2026gjyycxsj 这个作业的要求:https://edu.cnblogs.com/campus/fzu/2026gjyycxsj/homework/16752 学号:010260 -
实验3
实验任务1 源码 button.hpp #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string& label); const std::string& get -
实验3
实验3 任务1 源代码 button.hpp #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string& label); const std::string&