2019年6月12日

面向对象程序设计(C++)_实验6_流类库与I/O

摘要: 实验结论 Part1:验证性实验 运行结果截图: Part2:基础练习 源代码: #include <iostream> #include <fstream> using namespace std; int main() { ofstream fs("3.txt", ios_base::app | 阅读全文

posted @ 2019-06-12 21:40 Alexander_Yang 阅读(260) 评论(0) 推荐(0) 编辑

2019年6月2日

面向对象程序设计(C++)_实验5_类的继承、派生和多态(2)

摘要: 实验结论 Part1 验证性实验(1) Part2 验证性实验(2) 在本实验中,抽象类shape作为三个派生类Rectangle、Circle、Triangle的共同父类,通过纯虚函数area()为整个类族提供了通用的外部接口。根据赋值兼容规则,在printArea函数中可以通过基类指针shape 阅读全文

posted @ 2019-06-02 22:07 Alexander_Yang 阅读(318) 评论(0) 推荐(0) 编辑

2019年5月21日

面向对象程序设计(C++)_实验4_类的继承、派生和多态(1)

摘要: 一、实验结论 1.车辆信息管理 源代码: battery.h: #ifndef BATTERY_H #define BATTERY_H class Battery { public: Battery(int sz = 70) :batterySize(sz) {} int getSize() con 阅读全文

posted @ 2019-05-21 17:27 Alexander_Yang 阅读(403) 评论(0) 推荐(0) 编辑

2019年4月30日

面向对象程序设计期中考试编程题

摘要: 一、 data.cpp中补全代码如下: #include "date.h" #include "utils.h" #include <iostream> using std::cout; using std::endl; // 补足程序,实现Date类中定义的成员函数 Date::Date(){ y 阅读全文

posted @ 2019-04-30 14:49 Alexander_Yang 阅读(448) 评论(5) 推荐(0) 编辑

2019年4月23日

面向对象程序设计_实验三_类和对象

摘要: 一、实验内容 Part1 文件组织形式如下: 运行结果如图所示: (1) (2) (3) (4) (5) Part2 draw()函数函数体如图: 运行结果: Part3 二、实验结论 结论就是……下次一定不会把实验拖到deadline之前在做了 _(:з」∠)_ 我也知道这次做的不忍直视啦……如果 阅读全文

posted @ 2019-04-23 21:51 Alexander_Yang 阅读(152) 评论(0) 推荐(0) 编辑

2019年3月31日

面向对象程序设计(C++)_作业一_设计、定义并实现Complex类

摘要: 源代码: 运行结果: 阅读全文

posted @ 2019-03-31 13:26 Alexander_Yang 阅读(299) 评论(1) 推荐(0) 编辑

2018年12月10日

汇编语言_实验九_根据材料编程

摘要: 四、实验结论 1. 源程序: assume cs:code, ds:data data segment db 12 db 0,0 data ends code segment start: mov ax,data mov ds,ax mov ah,0 mov al,ds:[0] mov bl,10 阅读全文

posted @ 2018-12-10 20:37 Alexander_Yang 阅读(330) 评论(0) 推荐(0) 编辑

2018年11月26日

汇编语言_实验五_编写、调试具有多个段的程序

摘要: 四、实验结论 (1) ①data段中数据为 23 01 56 04 89 07 bc 0a ef 0d ed 0f ba 0c 87 09 ②cs=076C、ss=076B、ds=076A ③X-2,X-1 (2) ①data段中数据为 23 01 56 04 00 00 00 00 00 00 0 阅读全文

posted @ 2018-11-26 19:34 Alexander_Yang 阅读(193) 评论(0) 推荐(0) 编辑

2018年11月19日

汇编语言_实验四_[bx]和loop的使用

摘要: 四、实验结论 1. 实验内容1 (1)源代码: assume cs:code code segment mov ax,0b800h mov ds,ax mov bx,07b8h mov cx,16 s: mov [bx],0403h add bx,2 loop s mov ah,4ch int 21 阅读全文

posted @ 2018-11-19 20:20 Alexander_Yang 阅读(564) 评论(1) 推荐(0) 编辑

2018年11月18日

汇编语言_实验三_编程、编译、连接、跟踪

摘要: 四、实验结论 1. 练习1 第一步,在记事本中输入实验要求中提供的代码,结果如下: 将其以文件名t1.asm另存为到E:/masm。 第2步,为方便后续操作,此处先准备一个批处理文件: 同样将其放入E盘masm路径下,重命名为process.bat。 (1)进入并配置好DSBox环境,使用proce 阅读全文

posted @ 2018-11-18 20:34 Alexander_Yang 阅读(181) 评论(0) 推荐(0) 编辑

导航