
小时候的代码
芸的诠释
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
十六周项目1 文件的应用
#include #includeusing namespace std;void Sort(double [],int);double num[5000]; int number=0;int main(){ ifstream readfile; ofstream writefile; readfile.open("salary.原创 2013-06-14 10:54:21 · 944 阅读 · 0 评论 -
项目4
#includeusing namespace std;class CEquation{private: double a; // 未知数系数 double b; // 常数项 char unknown; // 未知数的符号public: CEquation(double aa=0,double bb=0){ a=aa;b=bb;} friend istream原创 2013-05-07 19:16:05 · 721 阅读 · 0 评论 -
项目4
#include#includeusing namespace std;class Point{public: Point(double x=0,double y=0):x(x),y(y){} double distance(Point a);private: double x,y;};double Point::distance(Point a){ return s原创 2013-05-18 08:57:18 · 813 阅读 · 0 评论 -
项目3
#includeusing namespace std;class CFraction{private:int nume; int deno;public:CFraction(int n=1,int d=1):nume(n),deno(d){}; CFraction operator+(CFraction &c); CFraction operator-(原创 2013-04-20 10:10:31 · 619 阅读 · 0 评论 -
项目4
#includeusing namespace std;class CFraction{private:int nume; int deno;public:CFraction(int n=1,int d=1):nume(n),deno(d){}; CFraction operator+(CFraction &c); CFraction operator-(原创 2013-04-20 10:34:53 · 727 阅读 · 0 评论 -
项目2
#includeusing namespace std;class CTime{private: unsigned short int hour; unsigned short int minute; unsigned short int second;public: CTime(int h=0,int m=0,int s=0):hour(h),minute原创 2013-04-19 15:04:05 · 1017 阅读 · 0 评论 -
项目1任务三
#include using namespace std;class Complex{public: Complex(){real=0;imag=0;} Complex(double r,double i){real=r;imag=i;} friend Complex operator+(double c1,Complex &c2); frie原创 2013-04-19 10:06:18 · 1088 阅读 · 0 评论 -
项目1任务二
#include using namespace std;class Complex{public: Complex(){real=0;imag=0;} Complex(double r,double i){real=r;imag=i;} friend Complex operator+(Complex &c1,Complex &c2); fr原创 2013-04-18 21:09:43 · 822 阅读 · 2 评论 -
第八周项目一任务一
#include using namespace std;class Complex{public: Complex(){real=0;imag=0;} Complex(double r,double i){real=r;imag=i;} Complex operator+(Complex &c2); Complex operator-(Complex &原创 2013-04-18 21:04:48 · 895 阅读 · 0 评论 -
项目1
#include using namespace std;class Complex{public: Complex(){real=0;imag=0;} Complex(double r,double i){real=r;imag=i;} friend Complex operator+(double c1,Complex &c2); frie原创 2013-04-19 11:16:55 · 814 阅读 · 0 评论 -
项目5
#include using namespace std;templateclass Complex{public: Complex( ){x=0;y=0;} Complex(T1 r,T1 i){x=r;y=i;} Complex complex_add(const Complex &c2); template friend原创 2013-04-17 20:06:18 · 842 阅读 · 0 评论 -
项目1
#include using namespace std;class Complex{public: Complex(){real=0;imag=0;} Complex(double r,double i){real=r;imag=i;} Complex operator+(Complex &c2); Complex operator-(Co原创 2013-04-26 11:13:27 · 948 阅读 · 0 评论 -
项目4
#include using namespace std;template class Complex {public: Complex( ){x=0;y=0;} Complex(T r,T i){x=r;y=i;} Complex complex_add(Complex &c2); Complex comple原创 2013-04-14 10:47:53 · 817 阅读 · 0 评论 -
项目1 我的代码真的不行呀
#includeusing namespace std;class Time{public: Time(int=0,int=0,int=0); void show_time(); void add_sends(int); void add_minutes(int); void add_hours(int); static void change24();原创 2013-04-13 12:29:19 · 909 阅读 · 4 评论 -
项目2
#include#includeusing namespace std;class CPoint{private: double x; // 横坐标 double y; // 纵坐标 public: CPoint(double xx=0,double yy=0):x(xx),y(yy){} double distance1(CPoint &);原创 2013-04-13 18:43:06 · 915 阅读 · 0 评论 -
java 密码加密
public class En { String encrypt( String s,String pa){ char [] p=pa.toCharArray(); int n=p.length; char [] c=s.toCharArray(); int m=c.length; for(int k=0;k<m;k++){ int mima=c[k]+p原创 2013-05-22 21:08:58 · 2461 阅读 · 0 评论 -
项目1
#include #includeusing namespace std;class Point{public: Point():x(0),y(0){}; Point(double x0,double y0):x(x0),y(y0){}; void PrintPoint(); double x,y;};void Point::Prin原创 2013-05-10 10:25:08 · 714 阅读 · 0 评论 -
java中的DocuEvent事件
public class Example9_8 {public static void main(String[] args) {// TODO Auto-generated method stub WindowOperation win=new WindowOperation();win.setBounds(100,100,390,360);win.setTitle("简单原创 2013-06-04 18:34:29 · 1046 阅读 · 0 评论 -
十四周项目2
#includeusing namespace std;#define PI 3.1415926class Shape{public: virtual double area()=0;};class Circle:public Shape{public: Circle(double r):r(r){} double area(){ ret原创 2013-05-31 10:48:32 · 779 阅读 · 0 评论 -
十四周项目1
代码; #include #includeusing namespace std;class Animal{public: virtual void cry(){ cout<<"不知哪种动物,让我如何学叫?"<<endl; }};class Mouse:public Animal{public: Mouse(strin原创 2013-05-31 10:31:18 · 800 阅读 · 0 评论 -
java的ActionEvent事件
public class Example9_7 { public static void main(String[] args) { // TODO 自动生成的方法存根 WindowActionEvent win=new WindowActionEvent(); PoliceListen police=new PoliceListen(); win.setMyComm原创 2013-06-04 08:47:57 · 12145 阅读 · 0 评论 -
指针的应用 到底那里出错了 问题好大
#includeusing namespace std;class MyArray{private: int *arr; //用于存放动态分配的数组内存首地址 int size; //数组大小public: MyArray(int sz=50); MyArray(int a[],int sz); //由一个内置类型的数组初始化~MyArray(void)原创 2013-06-11 19:23:20 · 1095 阅读 · 0 评论 -
指针的应用2 15周 2
#includeusing namespace std;class Student //结点类{public: Student(int n,double s){ num=n; score=s; next=NULL; } ~Student(); Student *next; //指向下一个结点 int num; double score;};Student:原创 2013-06-11 20:54:59 · 786 阅读 · 0 评论 -
十四周项目3
代码;#include#define PI 3.1415926using namespace std;class CSolid{public: virtual double area()=0; virtual double voumal()=0;};class CCube:public CSolid{public: CCube(double x):x原创 2013-05-31 11:13:16 · 799 阅读 · 0 评论 -
java中String类中的方法运用
一些东西写过之后就忘了,关键是那些全是英文,不能全部记住,看来的好好学习英语呀 class StringExample { public static void main(String agrs[]){ String s1=new String ("you are student"), s2=new String("how are you"); if(s1.equals(s2原创 2013-05-30 18:52:28 · 1084 阅读 · 0 评论 -
13周项目4
#include #include using namespace std; class Date{public: Date(int y=0,int m=0,int d=0):year(y),month(m),day(d){} void SetDate(int y,int m,int d){ year=y; month=m; day=d;} void原创 2013-05-28 20:46:10 · 1063 阅读 · 2 评论 -
13周项目3
#include #include#include using namespace std;enum vehicleStaus {rest, running}; //车辆状态:泊车、行进class vehicle //车辆类{protected: int maxSpeed; //最大车速 int currentSpeed; //当前速度 int weight; //车重原创 2013-05-28 19:54:45 · 791 阅读 · 0 评论 -
13周项目2
#include#include using namespace std;class Teacher{public: Teacher(string nam,int a,char s,string tit,string ad,string t); void display();protected: string name; int age; char sex; string原创 2013-05-28 19:26:40 · 693 阅读 · 0 评论 -
项目3
#include #includeusing namespace std;class CPerson{protected: char *m_szName; char *m_szId; int m_nSex;//0:women,1:man int m_nAge;public: CPerson(){ m_nSex=0; m_nAge=0; } CPerson(c原创 2013-05-14 12:13:27 · 708 阅读 · 0 评论 -
java窗口
public class WD1 { /** * @param args */ public static void main(String[] args) { // TODO 自动生成的方法存根WindowMenu win=new WindowMenu("我的第一个",40,50,300,250); }}import javax.swing.*;import java原创 2013-05-27 20:11:51 · 1043 阅读 · 0 评论 -
项目2
#include #includeusing namespace std;class Point{public: Point(double x0=0,double y0=0):x(x0),y(y0){}; inline double getx(){return x;} inline double gety(){return y;} void原创 2013-05-10 10:42:18 · 744 阅读 · 0 评论 -
项目3
#includeusing namespace std;class Date; //对Date类的提前引用声明class Time{public: Time(int,int,int); void add_a_second(Date &); //增加1秒,1秒后可能会到了下一天,乃到下一月、下一年 void display(Date &); //显示时间,格式:原创 2013-04-13 13:01:53 · 925 阅读 · 0 评论 -
阅读程序改错
#include #includeusing namespace std;class Box{public: Box(int w,int l):width(w),length(l){} int volume(){return heigth*width*length;};private: static int heigth; int原创 2013-04-12 10:12:30 · 1137 阅读 · 0 评论 -
项目四
#include using namespace std;class Student{public: Student(int n,double s):num(n),score(s){} void display(); int getNum(){return num;} double getScore(){return score;}private: int num; dou原创 2013-03-30 13:42:32 · 571 阅读 · 0 评论 -
项目二
#includeusing namespace std;class CFraction{private: int nume; // 分子 int deno; // 分母 public: CFraction(){ nume=0; deno=1; } //构造函数,初始化用 void set(int nu,int de); //置值,改变值时用 void inp原创 2013-03-29 20:38:36 · 577 阅读 · 0 评论 -
项目3
#includeusing namespace std;class Bulk{private: double length; double width; double heigth;public: Bulk(double len=1.0,double w=1.0,double h=1.0):heigth(h),width(w),length(len){}; void get原创 2013-03-30 11:03:38 · 814 阅读 · 0 评论 -
项目2拓展一仅代码
#includeusing namespace std;class CFraction{private: int nume; // 分子 int deno; // 分母 public: CFraction(){ nume=0; deno=1; } //构造函数,初始化用 void set(int nu,int de); //置值,改变值时用 void inp原创 2013-03-30 14:01:23 · 613 阅读 · 0 评论 -
项目4的扩展
#include #include using namespace std; struct Score { char num[14]; char name[14]; int cpp; int math; int english; double ping; int z原创 2013-03-10 10:55:45 · 805 阅读 · 0 评论 -
第三周项目4
#includeusing namespace std;#define PI 3.1415926class Bulk{private: int length; int width; int height;public: Bulk(int h,int l,int w); int volume(); int areas();};原创 2013-03-15 10:14:57 · 567 阅读 · 0 评论 -
第二周项目三
/* * 程序的版权和版本声明部分 * Copyright (c)2013, 烟台大学计算机学院学生 * All rightsreserved. * 文件名称:score.cpp * 作 者: * 完成日期: 年 月 日 * 版本号: v1.0原创 2013-03-08 17:49:14 · 702 阅读 · 0 评论