自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(80)
  • 收藏
  • 关注

原创 bank第二版

/* * 版权所有(c) 2015, 烟台大学计算机学院 * 文件名称: mian.cpp * 文件标识:无 * 内容摘要:程序实现的主函数 * 其它说明:无 * 当前版本: V1.0 * 作 者:刘志力 * 完成日期:2015.7.17 * 修改记录:0 * 修改日期 * 版本号: V1.0 * 修改人: * 修改内容: */ #include

2015-07-18 09:34:34 858

原创 银行系统第一版

职员账户100~104,密码123456 客户账户10000~10100,密码123456 main.cpp #include #include //从文件中读数据包含的头文件 #include //system,Sleep,exit函数的调用需要的头文件 #include //调用getch需

2015-07-16 10:29:05 826

原创 2015.6.14用文件保存学生名单

#include #include #include #include using namespace std; //定义学生类 class Student { public: Student() {}; string get_mame(){return name;} double get_cpp(){return cpp;} double

2015-06-14 10:50:17 808

原创 2015.6.3立体雷族的抽象类

#include using namespace std; class CSolid { public: virtual double area()=0; virtual double volume()=0; }; class CCube:public CSolid { private: double dLong; double dWidth

2015-06-03 09:22:33 686

原创 2015.6.3动物这样叫

#include using namespace std; class Animal { public: virtual void cry() { cout<<"不知哪种动物,让我如何学叫?"<<endl; } }; class Mouse:public Animal { string name; char sex;

2015-06-03 08:40:13 341

原创 2015.2.27摩托车继承自行车类和机动车类

#include #include #include using namespace std; enum vehicleStaus {rest, running}; //车辆状态:泊车、行进 class vehicle //车辆类 { protected: int maxSpeed; //最大车速 int currentSpeed; //当前速度 int weig

2015-05-27 12:12:14 567

原创 2015.5.27日期时间类

#include using namespace std; class Date { protected: int year; int month; int day; public: Date(int y=0,int m=0,int d=0):year(y),month(m),day(d){}; void setDate(int y,in

2015-05-27 08:34:47 317

原创 2015.5.26教师兼干部类

#include using namespace std; class Teacher { protected: string name; string title; int age; char sex; string addr; char telephone[11]; public: Teacher(){}; Teacher(str

2015-05-26 11:27:03 435

原创 2015.5.20点类派生直线类

#include #include using namespace std; class Point //定义坐标点类 { public: Point():x(0),y(0) {}; Point(double x0, double y0):x(x0), y(y0) {}; void PrintPoint(); //输出点的信息 double get_x(){retu

2015-05-20 16:47:28 381

原创 2015.5.20类

#include using namespace std; class Point { protected: double p_X; double p_Y; public: Point(){} Point(double x,double y):p_X(x),p_Y(y) {} void cin_XY(double x,double y); void

2015-05-20 13:45:28 352

原创 2015.5.20职工有薪水了

#include #include using namespace std; class CPerson { protected: string m_szName; string m_szId; int m_nSex; int m_nAge; public: CPerson(string name,string id,int sex,i

2015-05-20 08:24:32 289

原创 2015.5.19储存班长信息的学生类

#include #include using namespace std; class Stu { public: Stu(int n,string nam); void display(); protected: int num; string name; }; Stu::Stu(int n,string nam) { num=n; name=n

2015-05-19 13:23:22 430

原创 2015.5.19我的向量

#include using namespace std; class MyVector //定义向量类 { public: MyVector(int m); //构造函数,共有m个元素的向量,元素值预置为0 MyVector(const MyVector &v); //复制构造函数 ~MyVector(); //析构函数:释放动态数组所占用的存储

2015-05-19 10:49:58 438

原创 2015.5.19方程也是类

#include using namespace std; class CEquation { private: double a; double b; char unknow; public: CEquation(double aa=0,double bb=0); friend istream& operator>>(istream&,CEquation&

2015-05-19 10:49:49 360

原创 2015.5.13time类中的运算符重载(续)

#include using namespace std; class CTime { private: short int hour; short int minute; short int second; public: CTime(int h=0,int m=0,int s=0); void setTime(int h,int m,

2015-05-13 09:24:34 355

原创 2015.5.13复数类的运算符重载(续)

#include using namespace std; class Complex { public: Complex(){real=0;imag=0;} Complex(double r,double i){real=r;imag=i;} Complex operator+(const Complex &c2); Complex operato

2015-05-13 08:36:54 335

原创 2015.5.9字符数组的运算符重载

#include #include using namespace std; class String { public: String(); String(const char*a); ~String(); void display(); String operator+(const String &a); String

2015-05-09 13:37:10 514

原创 2015.5.9复数类的运算符的重载

#include using namespace std; class Complex { public: Complex(){real=0;imag=0;} Complex(double r,double i){real=r;imag=i;} Complex operator+(const Complex &c2); Complex operato

2015-05-09 11:28:06 404

原创 2015.5.9时间类的运算符的重载

#include using namespace std; class CTime { private: short int hour; short int minute; short int second; public: CTime(int h=0,int m=0,int s=0); void setTime(int h,int m,

2015-05-09 11:23:53 498

原创 2015.5.9分数运算符的重载

#include using namespace std; class CFraction { private: int nume; int deno; public: CFraction(int a=0,int b=0); CFraction operator+(const CFraction &a); CFraction oper

2015-05-09 11:19:56 438

原创 2015.4.15友元类时间

#include using namespace std; class Date; class Time { public: Time(int a,int b,int c):hour(a),minute(b),sec(c) {}; void add_a_second(Date &); //增加1秒,1秒后可能会到了下一天,乃到下一月、下一年 void display(Da

2015-04-15 13:19:59 318

原创 2015.4.15成员函数,友元函数,一般函数的区别

#include #include using namespace std; class Cpoint { private: double x; // 横坐标 double y; // 纵坐标 public: Cpoint(double xx=0,double yy=0):x(xx),y(yy){} double distance2(Cpo

2015-04-15 09:10:18 286

原创 2015.4.15我的数组类

#include using namespace std; class MyArray { private: int *arrayAddr; //保存一个有len个整型元素的数组的首地址 int len; //记录动态数组的长度 int max; //动态数组中的最大值(并非动态数组中必须要的数据成员) public: My

2015-04-15 08:28:38 254

原创 2015.4.15人数不定的工资类

#include using namespace std; class Salary { public: Salary(int n); //n为职工人数,初始化时完成空间的分配 ~Salary(); //析构函数中释放初始化时分配的空间 void input_salary(); void show_salary(); private:

2015-04-15 08:26:40 298

原创 2015.4.14深复制体验

#include #include using namespace std; class A { private: char*a; public: A(char*aa) { a=new char[strlen(aa)+1]; strcpy(a,aa); } ~A() { delete[]a; }

2015-04-14 16:44:38 277

原创 2015.4.8静态成员应有,时间类的转换

#include #include using namespace std; class Time { public: Time(int=0,int=0,int=0); void show_time(); void add_seconds(int); void add_minutes(int); void add_hours(int);

2015-04-08 09:08:58 493 1

原创 2015.4.8体验常成员函数

#include #include"Cpoint.h" using namespace std; int main() { Cpoint a(3,4),b,c; double dA1,dA2; cout<<"输入b点的坐标(以x,y的形式)"<<endl; b.input(); dA1=a.Distance1(b); cout<<

2015-04-07 11:34:48 290

原创 2015.4.1指向学生类的指针

#include using namespace std; class Student { private: int num; double score; public: Student(int a,double b):num(a),score(b) {}; void set_students(); void get_students()

2015-04-01 08:47:02 260

原创 2.05.3.31用对象数组操作长方柱类

#include using namespace std; class Bulk { private: double length; double width; double height; double area; double volume; public: Bulk(double x=1,double y=1,double

2015-03-31 18:28:42 283

原创 2015.3.31分数类的雏形

#include using namespace std; #include"CFraction.h" int main() { CFraction q1; int iChioce; cout<<"0.原样输出(默认)"<<endl; cout<<"1.化简形式输出"<<endl; cout<<"2.以几又几分之几的形式输出"<<endl;

2015-03-31 17:23:35 318

原创 2015.3.31三角形类的构造函数

1带参数的构造函数 #include"Triangle.h" int main() { Triangle Tri(7,8,9); Tri.showMessage(); return 0; } #ifndef TRIANGLE_H_INCLUDED #define TRIANGLE_H_INCLUDED class Triangle { public:

2015-03-31 17:20:43 370

原创 2015.3.28数组作数据成员3.4.5

#include"Salary.h" int main() { Salary a; a.in_salary(); a.sort_salary(); a.out_salary(); a.show_salary(); return 0; } #ifndef SALARY_H_INCLUDED #define SALARY_H_I

2015-03-28 15:50:55 226

原创 2015.3.27数组作成员函数2

#include using namespace std; class Salary { private: double*p; int number; public: void get_number(int x); void set_salarys(); void add_salarys(int x); void sort_sa

2015-03-27 09:08:12 272

原创 2015.3.25数组做函数成员(1)

#include using namespace std; class Salary { private: double salarys[50]; int number; public: void set_salarys(); void add_salarys(int x); void sort_salarys(); void

2015-03-25 09:14:15 272

原创 2015.3.25考了语文数学的学生

#include using namespace std; #include"stu.h" int main() { Stu s1,s2; s1.setStudent("lin daiyu",98,96); s2.setStudent("jia baoyu",90,88); s1.show(); s2.show(); s1.set

2015-03-25 08:10:35 308

原创 2015.3.20程序多文件组织

2015-03-20 08:46:37 275

原创 2015.3.19三角形类2

#include #include using namespace std; class Triangle { private: double a,b,c; public: void setA(double x){a=x;} void setB(double y){b=y;} void setC(double z){c=z;} doub

2015-03-19 13:37:53 317

原创 2015.3.19三角形类

#include #include using namespace std; class Triangle { public: void setABC(double,double,double); void getABC(double*,double*,double*); double perimeter(); double area(); pr

2015-03-19 13:06:26 268

原创 2015.3.17图书馆的管理系统

#include #include using namespace std; class Book { private: string name; string writer; string public_name; double price; int number; string NO; public: void

2015-03-17 18:42:45 547

原创 2015.3.17时间类

#include using namespace std; class Time { public : void set_time(); void show_time(); void add_seconds(int); void add_minutes(int); void add_hours(int); void add();

2015-03-17 13:10:59 309

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除