2015年8月21日
摘要:
工厂方法模式 Factory Method :(虚拟构造函数模式 Virtual Constructor,多态性工厂模式 Ploymorphic Facoty) Define an interface for creating an object,but let subclasses decid...
阅读全文
posted @ 2015-08-21 21:28
_noname
阅读(134)
推荐(0)
摘要:
1.右击选择要导出的Java Project 2.选择Export,选择JarFile 3.选择要导出的位置 4.点击next,默认,单击next 5.选择程序入口 单击Finish! 6.执行jar文件。java -jar name.jar
阅读全文
posted @ 2015-08-21 19:38
_noname
阅读(166)
推荐(0)
2015年8月20日
摘要:
单例模式 SingletonPattern Ensure a class has only one instance,and provide a global point of access to it. 单例模式的主要作用是确保一个类只有一个实例存在。 懒汉式单例类:第一次引用类时,才进行对象...
阅读全文
posted @ 2015-08-20 21:28
_noname
阅读(179)
推荐(0)
摘要:
设计模式分类: 创建型: 单例模式(Singleton Pattern) 工厂方法模式(Factory Pattern) 抽象工厂模式(Abstract Factory) 建造者模式(Builder Pattern) 原型模式(Prototype Pattern) 结构型: 代理模式(Proxy...
阅读全文
posted @ 2015-08-20 00:20
_noname
阅读(226)
推荐(0)
2015年8月14日
摘要:
#include#include#include#include#define MaxNumKey 6 /*关键字项数的最大值*/#define Radix 10 /*关键字基数,此时是十进制整数的基数*/#define MaxSize 1000#define N 6typedef int Ke...
阅读全文
posted @ 2015-08-14 00:58
_noname
阅读(142)
推荐(0)
摘要:
#include#include#include"LinkList.h"//创建单链表void CreateList(LinkList L,DataType a[],int n){ int i; for(i=1;inext->next!=NULL){ //用q指针进行遍历链表 for(s=p...
阅读全文
posted @ 2015-08-14 00:57
_noname
阅读(109)
推荐(0)
摘要:
// _DataStructure_C_Impl:Sort#include#include#define MaxSize 50typedef int KeyType;//数据元素类型定义typedef struct{ KeyType key; //关键字}DataType;//顺序表类型定义ty...
阅读全文
posted @ 2015-08-14 00:55
_noname
阅读(115)
推荐(0)
2015年8月13日
摘要:
#include#includetypedef int KeyType;//元素类型定义typedef struct{ KeyType key; //关键字 int hi; //冲突次数}DataType;//哈希表类型定义typedef struct{ DataType *data; in...
阅读全文
posted @ 2015-08-13 01:25
_noname
阅读(148)
推荐(0)
2015年8月8日
摘要:
#include#include#include#include"SeqString.h"typedef char AtomType;typedef enum{ATOM,LIST} ElemTag;//ATOM=0,表示原子,LIST=1,表示子表typedef struct GLNode{ E...
阅读全文
posted @ 2015-08-08 17:37
_noname
阅读(299)
推荐(0)
摘要:
#include#include#include#include"SeqString.h"typedef char AtomType;typedef enum{ATOM,LIST} ElemTag;//ATOM=0,表示原子,LIST=1,表示子表typedef struct Node{ Ele...
阅读全文
posted @ 2015-08-08 17:35
_noname
阅读(193)
推荐(0)