-
实验六
实验 6:文件 I/O 与异常处理 说明 阅读文档 请仔细阅读,明确任务要求、提交方式与截止时间。 实验任务说明 任务 1:验证性实验。读懂、运行、理解代码,掌握 I/O 流、异常处理基础操作。 任务 2:设计性实验。参照验证性任务,完成设计、编码。 实践建议 先独立思考、编码,再查工具;缺少“亲手 -
OOP-实验5
一、任务1 1、源代码: publish.hpp #pragma once #include <string> // 发行/出版物类:Publisher (抽象类) class Publisher { public: Publisher(const std::string &name_ = ""); -
实验6_CPP
任务1 源代码 contestant.hpp #pragma once #include <iomanip> #include <iostream> #include <string> struct Contestant { long id; // 学号 std::string name; // 姓 -
实验6 文件I/O与异常处理
task1: 1 #include <iostream> 2 #include <string> 3 4 struct Contestant { 5 long id; // 学号 6 std::string name; // 姓名 7 std::string major; // 专业 8 int s -
高级语言程序设计第十次作业
这个作业属于哪个课程:https://edu.cnblogs.com/campus/fzu/gjyycx 这个作业要求在哪里:https://edu.cnblogs.com/campus/fzu/gjyycx/homework/15596 学号:102500308 姓名:郭心悦 (1)编写一个程序, -
贪心策略、算法的相关理解
一、选点问题的贪心算法分析 问题定义 给定直线上 n 个闭区间 [a1,b1],[a2,b2],...,[an,bn],选择最少的点,使每个区间至少包含一个选定点。 贪心策略 排序:将所有区间按右端点从小到大排序。 选点:初始化选点 p=b1(排序后第一个区间的右端点),计数 coun -
实验六
实验任务1 源代码contestant.hpp 1 #pragma once 2 #include <iomanip> 3 #include <iostream> 4 #include <string> 5 struct Contestant { 6 long id; // 学号 7 std::st -
实验6 文件IO与异常处理
实验任务1 代码组织: contestant.hpp 结构体Contestant定义及其重载运算符函数>>和<<实现 utils.hpp 工具函数实现(排序函数、数据读/写) task1.cpp 应用代码 + main contestant.hpp #pragma once #include <io -
高级语言程序设计课程第十次个人作业
班级链接:https://edu.cnblogs.com/campus/fzu/gjyycx/ 作业链接:https://edu.cnblogs.com/campus/fzu/gjyycx/homework/15596 学号:102500324 姓名:卢龙腾 1. -
高级语言程序设计课程第十次个人作业
这个作业属于哪个课程:https://edu.cnblogs.com/campus/fzu/gjyycx 这个作业要求在哪里: https://edu.cnblogs.com/campus/fzu/gjyycx/homework/15596 学号:102500335 姓名:任柏宇 1. 2. 3. -
高级语言程序设计第十次作业
这个作业属于哪个课程:https://edu.cnblogs.com/campus/fzu/gjyycx 这个作业要求在哪里:https://edu.cnblogs.com/campus/fzu/gjyycx/homework/15596 学号:102500417 姓名:刘朝榕 设计程序 1编写一个 -
实验5
#任务1 ##代码 ###publisher.hpp 1 #pragma once 2 3 #include <string> 4 5 // 发行/出版物类:Publisher (抽象类) 6 class Publisher { 7 public: 8 Publisher(const std::st -
实验5 多态
实验任务1 实验代码: publisher.hpp: #pragma once #include <string> class Publisher { public: Publisher(const std::string& name_ = ""); virtual ~Publisher() = d -
实验5 多态
1. 实验任务1 publisher.hpp 1 #pragma once 2 3 #include <string> 4 5 // 发行/出版物类:Publisher (抽象类) 6 class Publisher { 7 public: 8 Publisher(const std::string -
实验5
实验五 实验任务一 代码 publisher.cpp #include <iostream> #include <string> #include "publisher.hpp" // Publisher类:实现 Publisher::Publisher(const std::string &nam -
实验五
实验一: 1 #include <memory> 2 #include <iostream> 3 #include <vector> 4 #include "publisher.hpp" 5 6 void test1() { 7 std::vector<Publisher *> v; 8 9 v.p -
高级语言程序设计课程第十次个人作业
这个作业属于哪个课程:https://edu.cnblogs.com/campus/fzu/gjyycx 这个作业要求在哪里:https://edu.cnblogs.com/campus/fzu/gjyycx/homework/15596 学号:102500326 姓名:罗炜 1 2 3 4 5 6 -
高级语言程序设计第十次作业
这个作业属于哪个课程:https://edu.cnblogs.com/campus/fzu/gjyycx 这个作业要求在哪里:https://edu.cnblogs.com/campus/fzu/gjyycx/homework/15596 学号 102500415 姓名 林帅前 1. 2. 3. 4 -
高级语言程序设计课程第十次个人作业
这个作业属于哪个课程:https://edu.cnblogs.com/campus/fzu/gjyycx 这个作业要求在哪里:https://edu.cnblogs.com/campus/fzu/gjyycx/homework/15596 学号:102500323 姓名:黄铭昊 一、编写一个程序,将 -
实验5 多态
实验一: 代码:task1.cpp: #include <memory> #include <iostream> #include <vector> #include "publisher.hpp" void test1() { std::vector<Publisher *> v; v.push_