Skip to content

Commit b76c841

Browse files
committed
初始化0226作业模块
1 parent 2d70c98 commit b76c841

File tree

11 files changed

+210
-0
lines changed

11 files changed

+210
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
5+
http://maven.apache.org/xsd/maven-4.0.0.xsd">
6+
<parent>
7+
<groupId>com.coding2017.group7</groupId>
8+
<artifactId>homework</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
</parent>
11+
<modelVersion>4.0.0</modelVersion>
12+
13+
<groupId>com.coding2017.group7</groupId>
14+
<artifactId>homework-0226</artifactId>
15+
<dependencies>
16+
<dependency>
17+
<groupId>junit</groupId>
18+
<artifactId>junit</artifactId>
19+
</dependency>
20+
</dependencies>
21+
22+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package com.coding2017.group7.homework.c0226;
2+
3+
public class ArrayList implements List {
4+
5+
private int size = 0;
6+
7+
private Object[] elementData = new Object[100];
8+
9+
public void add(Object o) {
10+
11+
}
12+
13+
public void add(int index, Object o) {
14+
15+
}
16+
17+
public Object get(int index) {
18+
return null;
19+
}
20+
21+
public Object remove(int index) {
22+
return null;
23+
}
24+
25+
public int size() {
26+
return -1;
27+
}
28+
29+
public Iterator iterator() {
30+
return null;
31+
}
32+
33+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package com.coding2017.group7.homework.c0226;
2+
3+
public class BinaryTreeNode {
4+
5+
private Object data;
6+
private BinaryTreeNode left;
7+
private BinaryTreeNode right;
8+
9+
public Object getData() {
10+
return data;
11+
}
12+
13+
public void setData(Object data) {
14+
this.data = data;
15+
}
16+
17+
public BinaryTreeNode getLeft() {
18+
return left;
19+
}
20+
21+
public void setLeft(BinaryTreeNode left) {
22+
this.left = left;
23+
}
24+
25+
public BinaryTreeNode getRight() {
26+
return right;
27+
}
28+
29+
public void setRight(BinaryTreeNode right) {
30+
this.right = right;
31+
}
32+
33+
public BinaryTreeNode insert(Object o) {
34+
return null;
35+
}
36+
37+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.coding2017.group7.homework.c0226;
2+
3+
public interface Iterator {
4+
public boolean hasNext();
5+
6+
public Object next();
7+
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
package com.coding2017.group7.homework.c0226;
2+
3+
public class LinkedList implements List {
4+
5+
private Node head;
6+
7+
public void add(Object o) {
8+
9+
}
10+
11+
public void add(int index, Object o) {
12+
13+
}
14+
15+
public Object get(int index) {
16+
return null;
17+
}
18+
19+
public Object remove(int index) {
20+
return null;
21+
}
22+
23+
public int size() {
24+
return -1;
25+
}
26+
27+
public void addFirst(Object o) {
28+
29+
}
30+
31+
public void addLast(Object o) {
32+
33+
}
34+
35+
public Object removeFirst() {
36+
return null;
37+
}
38+
39+
public Object removeLast() {
40+
return null;
41+
}
42+
43+
public Iterator iterator() {
44+
return null;
45+
}
46+
47+
48+
private static class Node {
49+
Object data;
50+
Node next;
51+
52+
}
53+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.coding2017.group7.homework.c0226;
2+
3+
public interface List {
4+
public void add(Object o);
5+
6+
public void add(int index, Object o);
7+
8+
public Object get(int index);
9+
10+
public Object remove(int index);
11+
12+
public int size();
13+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package com.coding2017.group7.homework.c0226;
2+
3+
public class Queue {
4+
5+
public void enQueue(Object o) {
6+
}
7+
8+
public Object deQueue() {
9+
return null;
10+
}
11+
12+
public boolean isEmpty() {
13+
return false;
14+
}
15+
16+
public int size() {
17+
return -1;
18+
}
19+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.coding2017.group7.homework.c0226;
2+
3+
public class Stack {
4+
private ArrayList elementData = new ArrayList();
5+
6+
public void push(Object o) {
7+
}
8+
9+
public Object pop() {
10+
return null;
11+
}
12+
13+
public Object peek() {
14+
return null;
15+
}
16+
17+
public boolean isEmpty() {
18+
return false;
19+
}
20+
21+
public int size() {
22+
return -1;
23+
}
24+
}

group07/562247675/homework/homework-0226/src/main/resources/readme.md

Whitespace-only changes.

group07/562247675/homework/homework-0226/src/test/resources/readme.md

Whitespace-only changes.

group07/562247675/notebook/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Notebook

0 commit comments

Comments
 (0)