实验

实验5 继承和多态

四、实验结论 实验任务3 pets.hpp #pragma once #include<iostream> #include<string> using namespace std; class MachinePets { public: MachinePets(const string &s = ......

实验5

#include<iostream> #include<string> using namespace std; class MachinePets { private: string nickname; public: MachinePets(const string s) :nickname{ ......

实验五

找出最大最小值 指向x【0】的地址 返回最大值的地址 sizeof计算数据类型所占据的空间,比如字节长度,而strlen计算字符串的长度,从第一个字符遇到结束符停止。sizeof包含“\0”,strlen则不计算。 #define N 80void encoder(char *str); // 函数 ......

百度api实验总结

通过这次实验还是反映了之前讲到的,修改代码必须要建立在看懂的情况下,同样避免错误也是一样的,刚开始拿到这样一个json返回值的时候很蒙,饭后想到了之前看到的提取其中的值,我就说查一下吧 查到了不过是python的不过原理都一样我就说改改吧但是不成功,用为python的json包导进去很简单,直接im ......
api

实验一百度api具体操作步骤

首先登录百度翻译的网站: 百度翻译开放平台 (baidu.com) 获取百度翻译官方接口API与密钥并授权至软件或插件的方法 - 知乎 (zhihu.com) 根据上面博主就能创建: 在开发者信息这里点进去可以看见id和密钥 然后像前一篇一样新建粘贴代码填入id然后运行就会得到这样的结果: 图片上面 ......
步骤 api

实验一:百度机器翻译SDK实验--代码及遇到的问题

首先这是代码:具体的操作步骤下面一篇 窗口的: package baidu; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; pu ......
机器 代码 问题 SDK

实验5

3.hpp #include<iostream> #include<string> using namespace std; class MachinePets { public: MachinePets(const string s); MachinePets(); string get_nick ......

C0P8000计算机组成原理实验系统24位控制位功能

因为做到了这个课设 所以存一下相关内容 24位控制位 XRD : 外部设备读信号,当给出了外设的地址后,输出此信号,从指定外设读数据。 EMWR: 程序存储器 EM 写信号。 EMRD: 程序存储器 EM 读信号。 PCOE: 将程序计数器 PC 的值送到地址总线 ABUS 上。 EMEN: 将程序 ......
原理 C0P8000 功能 计算机 系统

实验五

任务一 publisher.hpp 1 #pragma once 2 3 #include <iostream> 4 #include <string> 5 6 using std::cout; 7 using std::endl; 8 using std::string; 9 10 // 发行/出 ......

.Net实验一 语言基础

一、实验目的 熟悉Visual Stido.NET 实验环境; 掌握控制台程序的编写方法; 掌握C#程序设计语言的语法基础; 掌握控制语句和数组的使用。 二、实验要求 根据题目要求,编写 C#程序,并将程序代码和运行结果写入实验报告。 三、实验内容 编写一个控制台应用程序,输入三角形或者长方形边长, ......
语言基础 语言 基础 Net

实验5 C语言指针应用编程

1.实验任务1 1 #include <stdio.h> 2 #define N 5 3 4 void input(int x[], int n); 5 void output(int x[], int n); 6 int *find_max(int x[], int n); 7 8 int mai ......
指针 语言

软件设计实验 24:模板方法模式

实验 24:模板方法模式 本次实验属于模仿型实验,通过本次实验学生将掌握以下内容: 1、理解模板方法模式的动机,掌握该模式的结构; 2、能够利用模板方法模式解决实际问题。 [实验任务一]:数据库连接 对数据库的操作一般包括连接、打开、使用、关闭等步骤,在数据库操作模板类中我们定义了connDB()、 ......
模板 模式 方法 软件

第五次实验

任务1-1 //验证性实验:指针变量作为函数参数,指针变量作为函数的返回值 #include<stdio.h> #define N 5 void input(int x[],int n); void output(int x[],int n); void find_min_max(int x[],i ......

实验5 继承和多态

实验任务3pets.hpp源码 1 #include <iostream> 2 using std::string; 3 class MachinePets { 4 private: 5 string nickname; 6 public: 7 MachinePets(const string s) ......

实验5

#program once #include<iostream> #include<string> using namespace std; class TextCoder{ private: string text; void encoder(); #include "textcoder.hpp" ......

实验四-现代C++标准库与类模板

1 #include <iostream> 2 3 using std::cout; 4 using std::endl; 5 6 class A{ 7 public: 8 A(int x0, int y0): x{ x0 }, y{ y0 } {} 9 void show() const { co ......
模板 标准

实验4

实验任务5 #include<iostream> #include<string> using namespace std; class TextCoder { public: TextCoder() = default; TextCoder(string str); string get_ciph ......

实验四

#program once #include<iostream> #include<string> using namespace std; class TextCoder{ private: string text; void encoder(); void decoder(); public: ......

实验四 现代c++ 标准库与类的模板

任务5 #include <iostream> #include <string> class TextCoder { private: std::string text; void encoder() { for (char &c : text) { if (isalpha(c)) { char ......
模板 标准

实验4 现代C++标准库与类模板

实验任务5: TextCoder.hpp文件源码: 1 #ifndef TEXTCODER_HPP 2 #define TEXTCODER_HPP 3 4 #include <string> 5 6 class TextCoder { 7 private: 8 std::string text; 9 ......
模板 标准

实验4

任务5 #pragma once #include<iostream> #include<string> using namespace std; class TextCoder { public: TextCoder(string text0) : text{ text0 } {}; string ......

实验四_OOP_张文瑞_202213260018

实验任务5TextCoder.hpp源码 1 #include<iostream> 2 #include<string> 3 4 using std::string; 5 6 class TextCoder { 7 private: 8 string text; 9 void encoder(); ......
202213260018 OOP

实验4 现代C++标准库与类模板

实验任务5 textcoder.hpp #program once #include<iostream> #include<string> using namespace std; class TextCoder{ private: string text; void encoder(); void ......
模板 标准

实验四 现代C++标准库类与模板

实验任务1 task1.cpp源码 task1_1.cpp: #include <iostream> using std::cout; using std::endl; //类A的定义 class A { public: A(int x0, int y0) : x{ x0 }, y{ y0 } {} ......
模板 标准

实验4 现代C++标准库与类模板

实验任务5 1 #include <iostream> 2 #include <string> 3 using namespace std; 4 class TextCoder 5 { 6 public: 7 TextCoder() = default; 8 TextCoder(string str ......
模板 标准

实验4

实验任务5 1 #include <iostream> 2 #include <string> 3 using namespace std; 4 5 class TextCoder { 6 private: 7 string text; 8 void encoder(); 9 void decode ......

STM32F4的ADC采集光敏传感器电压实验

前言 光敏电阻和ADC采集电压引脚如下: 光照越强,LS1导通程度越高,ADC采集电压越接近于0,光照越弱,采集电压则接近3.3V。 一.ADC简介 1.实验原理 本次实验选用12位ADC采集电压,12位采用逐次逼近的思想,将采集到的电压与内部DAC输出的模拟电压进行比较,多次比较由DAC得出ADC ......
传感器 电压 STM 32F ADC

实验四 现代c++ 标准库与类的模板

1.普通数组、array、vector的相关性,以及,区别 相关性 存储多个元素:1. 普通数组: 使用 C 风格数组声明和定义,大小固定。2. array: 是 C++11 引入的标准库容器,提供了数组的替代,大小固定。3. vector: 是 C++ 标准库中的动态数组,大小可以动态调整。 元素 ......
模板 标准

实验4 现代c++标准库与类模板

实验任务1 task1.cpp源码 task1_1.cpp: 1 #include <iostream> 2 3 using std::cout; 4 using std::endl; 5 6 //类A的定义 7 class A{ 8 public: 9 A(int x0, int y0): x{x ......
模板 标准

实验四

实验任务5 #pragma once #include<iostream> #include<string> using namespace std; class TextCoder { public: TextCoder() = default; TextCoder(string str); st ......