2019年5月6日

JAVA实验4 类与对象(封装继承多态等机制的使用)

摘要: 实验四 类与对象(封装、继承、多态等机制的使用) 实验内容: 1、 编写一个名为TwoDimensionalShape的抽象类,拥有属性area和circumference表示面积和周长,以及抽象方法getArea()和getCircumference(),用于获取面积和周长。 2、 编写Print 阅读全文

posted @ 2019-05-06 01:04 Numb_lzw 阅读(787) 评论(0) 推荐(0) 编辑

2019年4月22日

JAVA实验3 类与对象

摘要: 实验要求: 掌握类与对象的基本思想 能够熟练地使用Java设计并编写类 能够灵活运用各种对象 实验内容: 希腊神话中,宙斯战胜了泰坦之后成为众神之王,以此为背景,通过构造相应对象、属性和方法,并用随机的方式,模拟宙斯与泰坦的战斗过程。 构建类Titan,要求如下: 整形字段HP,以及相应的gette 阅读全文

posted @ 2019-04-22 23:57 Numb_lzw 阅读(1261) 评论(0) 推荐(0) 编辑

2018年11月26日

多种排序功能的实现

摘要: #include<iostream>#include<stdlib.h>#include<algorithm>#include<ctime>#include<cstdio>#include<iomanip>#include<conio.h>using namespace std;template<c 阅读全文

posted @ 2018-11-26 20:41 Numb_lzw 阅读(330) 评论(0) 推荐(0) 编辑

(数据结构)HashTable的实现

摘要: #include<iostream>#include<iomanip>#include<vector>#include<list>using namespace std; template<class Iterator,class T>Iterator Find(Iterator first,Ite 阅读全文

posted @ 2018-11-26 20:40 Numb_lzw 阅读(455) 评论(0) 推荐(0) 编辑

对string型变量的频率统计(文章单词检索)

摘要: #include<bits/stdc++.h>using namespace std;#define ll long longmap<string,ll> mp;set<string> ss; void cnt(const string s,string sp){ for(ll i=0; i<s.l 阅读全文

posted @ 2018-11-26 20:25 Numb_lzw 阅读(269) 评论(0) 推荐(0) 编辑

对int型变量的频率统计

摘要: #include<bits/stdc++.h>using namespace std;#define maxn 1005#define ll long longint a[maxn]; int main(){ ios::sync_with_stdio(false); int r; memset(a, 阅读全文

posted @ 2018-11-26 20:19 Numb_lzw 阅读(169) 评论(0) 推荐(0) 编辑

2018年11月25日

二叉搜索树中序迭代器的实现

摘要: #include<iostream>#include<queue>#include<stack>#include<stdlib.h>using namespace std; struct Location{ int xindent,ylevel;};void Gotoxy(int x,int y){ 阅读全文

posted @ 2018-11-25 10:57 Numb_lzw 阅读(240) 评论(0) 推荐(0) 编辑

二叉搜索树的实现

摘要: #include<iostream>#include<queue>using namespace std; struct Location{ int xindent,ylevel;};void Gotoxy(int x,int y){ static int level=0,indent=0; if( 阅读全文

posted @ 2018-11-25 09:31 Numb_lzw 阅读(188) 评论(0) 推荐(0) 编辑

2018年11月16日

Prim最小生成树

摘要: 典型例题HDU 1233 #include<bits/stdc++.h>using namespace std; const int INF=0x3f3f3f3f;const int maxn=110;bool vis[maxn];int lowc[maxn];int cost[maxn][maxn 阅读全文

posted @ 2018-11-16 21:56 Numb_lzw 阅读(651) 评论(0) 推荐(0) 编辑

Kruscal最小生成树

摘要: 典型例题:HDU 1233 #include<bits/stdc++.h>using namespace std;#define maxv 110#define maxe 10010#define ll long longint tol=0; struct edge{ int a,b,w; edge 阅读全文

posted @ 2018-11-16 20:48 Numb_lzw 阅读(140) 评论(0) 推荐(0) 编辑

导航