- 博客(21)
- 收藏
- 关注
原创 我的C++
不知不觉,学习C++已经快一年的时间了,因为还有一周C++课程就要结课了。总的来说,自己对这一年来C++的学习感觉不尽人意,主要原因当然在自己,大学的学习就是这样。 这一年的C++学习,总体感觉像是过山车。刚开始学习的时候,内容比较简单,作业少,任务轻,学起来是很轻松。随着学习的继续,内容有些加深加多,在自己还没有意识到的时候,似乎有些落后了,有些问题会看不懂,做不出,这个时候,只能翻开书
2012-06-13 16:50:29 715 1
原创 第十五周任务(1)
头文件 class Triangle{public : Triangle(){a = 1;b = 1;c = 1;} Triangle (double x,double y,double z){a = x; b = y;c = z;} double perimeter(void); double area(void);private : double a,b
2012-05-30 17:26:15 620
原创 第十三周任务(1)
#include using namespace std;class Vehicle {public: void run() const { cout << "run a vehicle. "<<endl; } //(2) run()为虚函数}; class Car: public Vehicle {public: void run() con
2012-05-15 18:00:21 477 1
原创 第十二周任务(2)
#include #include#include using namespace std;class Teacher{public: Teacher(string nam,int Age,int Sex,char *Department, int phone,string title1); ~Teacher( ); void display();
2012-05-09 16:38:09 490
原创 第十二周任务(2)
#include #include#include using namespace std;enum vehicleStaus {rest, running}; //车辆状态:泊车、行进class vehicle //车辆类{protected: int maxSpeed; //最大车速 int currentSpeed; //当前速度 int weig
2012-05-09 16:36:11 842
原创 第十二周任务(1)
#include#includeusing namespace std;class Student //(1)修改student类中各数据成员和成员函数的访问限定符,并观察发生的现象{public: Student(int n,string nam,char s) { num=n; name=nam; sex=s; } ~Student( ){
2012-05-09 16:27:32 504 1
原创 第十周任务(2)
#include #include #include //setw:设置输出数据的宽度,使用时应#include using namespace std; class CPerson { protected: char *m_szName; char *m_szId; int m_nSex;//0:women,
2012-04-25 16:14:52 3838 1
原创 第十周任务(1)
#include#includeusing namespace std;class Point //定义坐标点类{public: int x,y; //点的横坐标和纵坐标 Point(){x=0;y=0;} Point(int x0,int y0) {x=x0; y=y0;} void PrintP(){cout}; class Line: publ
2012-04-25 16:09:27 427
原创 第九周实验报告(4)
#include using namespace std; class Douary { public: Douary(int m, int n);//构造函数:用于建立动态数组存放m行n列的二维数组(矩阵)元素,并将该数组元素初始化为 Douary(const Douary &d);//构造函数:用于建立动态数组存放m行n列的二维数
2012-04-17 22:05:02 470
原创 第九周实验报告(3)
#include using namespace std; class CFraction { private: int nume; // 分子 int deno; // 分母 public: CFraction(int nu=0,int de=1):nume(nu),deno(de){}
2012-04-17 22:03:54 390
原创 第九周实验报告(2)
#include using namespace std; class CTime { private: unsigned short int hour; // 时 unsigned short int minute; // 分 unsigned short int second; // 秒
2012-04-17 22:02:18 398
原创 第九周实验报告(1)
#include using namespace std; class Complex { public: Complex(){real = 0; imag = 0;} Complex(double r, double i){real = r; imag = i;} friend istream& oper
2012-04-17 21:59:47 442
原创 第八周任务二
#include using namespace std; class CTime { private: unsigned short int hour; // 时 unsigned short int minute; // 分 unsigned short int second; // 秒 public: CTime(in
2012-04-10 22:11:19 478
原创 第八周任务一(2)
韩云龙 201158504405 四月十号 #includeusing namespace std;class Complex{public: Complex(){real=0;imag=0;} Complex(double r,double i){real=r;imag=i;} friend Complex operator+(Complex &c1,
2012-04-10 22:07:03 406
原创 第八周任务一(1)
韩云龙 47088270 四月十号 #includeusing namespace std;class Complex{public: Complex(){real=0;imag=0;} Complex(double r,double i){real=r;imag=i;} Complex operator+(Complex &c2);
2012-04-10 22:05:19 856 1
原创 第七周 任务1
/* (程序头部注释开始) * 程序的版权和版本声明部分 * Copyright (c) 2011, 烟台大学计算机学院学生 * All rights reserved. * 文件名称: * 作 者: 韩云龙 * 完成日期: 2012 年 4 月 3日 * 版 本
2012-04-03 20:54:17 376
原创 第六周
韩云龙 114-4 (1)class C{private: int x; public: C(int x){this->x = x;} int getX(){return x;}};void main(){ const C c(5); cout system("pause");}(有点不明白) (2)#inclu
2012-03-27 22:48:06 392 1
原创 第五周(1)
#include#includeusing namespace std;class Triangle{public: Triangle(double x=1,double y=1,double z=1); double perimeter(void);//计算三角形的周长 double area(void);//计算并返回三角形的面积 void showMess
2012-03-19 20:39:57 900 1
原创 第四周(1)
#includeusing namespace std;class Triangle{public: void Setabc(float x,float y, float z); void Getabc(float *x,float* y,float *z); float Perimeter(void); float Area(void);private:
2012-03-19 20:37:13 479
原创 第三周(补)
/* (程序头部注释开始) * 程序的版权和版本声明部分 * Copyright (c) 2011, 烟台大学计算机学院学生 * All rights reserved. * 文件名称: * 作 者:韩云龙 * 完成日期: 2012 年 3 月 19日 * 版 本 号: * 对任务及求解方法的描述部分 * 输入描述: * 问题描述: * 程序输出: * 程序头部的注释结束 */ 3. 完成任务的时
2012-03-19 20:29:43 365
原创 第二周(新发)
1-1#include using namespace std;void d2b(int n){ if( n==0 ) cout else { cout d2b(n/2); } } int main() { int a; cin>>a;//输入十进制数 d2b(a);//转换成二进制数输出
2012-03-19 20:25:15 1048
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人