diff --git a/group24/626451284Learning/pom.xml b/group24/626451284Learning/pom.xml
new file mode 100644
index 0000000000..534ff39232
--- /dev/null
+++ b/group24/626451284Learning/pom.xml
@@ -0,0 +1,12 @@
+
+
+ 4.0.0
+
+ com.github.wdn
+ coding2017
+ 1.0-SNAPSHOT
+
+
+
\ No newline at end of file
diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/ArrayList.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/ArrayList.java
new file mode 100644
index 0000000000..3b3ea048f3
--- /dev/null
+++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/ArrayList.java
@@ -0,0 +1,88 @@
+package com.github.wdn.coding2017.basic;
+
+import java.util.Arrays;
+
+public class ArrayList implements List {
+
+ private int size = 0;
+
+ private Object[] elementData;
+ public ArrayList(){
+ elementData = new Object[10];
+ }
+ public ArrayList(int size){
+ elementData = new Object[size];
+ }
+ public void add(Object o){
+ if(size>=elementData.length){
+ elementData = Arrays.copyOf(elementData,elementData.length*2);
+ }
+ elementData[size]=o;
+ size++;
+ }
+ public void add(int index, Object o){
+ Object[] newElementData;
+ if(size()+1>=elementData.length){
+ newElementData=new Object[elementData.length*2];
+
+ }else{
+ newElementData=new Object[elementData.length];
+ }
+ for (int i = 0; i < elementData.length; i++) {
+ if(index==1){
+ newElementData[i]=o;
+ }else if(i>index) {
+ newElementData[i]=elementData[i-1];
+ }else{
+ newElementData[i]=elementData[i];
+ }
+ }
+ elementData = newElementData;
+ size++;
+ }
+
+ public Object get(int index){
+ if(index>=size){
+ throw new IndexOutOfBoundsException();
+ }
+ return elementData[index];
+ }
+
+ public Object remove(int index) {
+ if(index>=size){
+ throw new IndexOutOfBoundsException();
+ }
+ Object returnO = elementData[index];
+ for (int i = index; i < size; i++) {
+ if(i==size-1){
+ elementData[i]=null;
+ }else {
+ elementData[i] = elementData[i + 1];
+ }
+ }
+ size--;
+ return returnO;
+ }
+
+ public int size(){
+ return size;
+ }
+
+ public Iterator iterator(){
+ return null;
+ }
+
+ public static void main(String[] args) {
+ ArrayList list = new ArrayList(2);
+ list.add("1");
+ list.add("2");
+ list.remove(1);
+ list.add("3");
+ for (int i = 0; i < list.size(); i++) {
+ System.out.println(list.get(i));
+ }
+ int[] i = {};
+ System.out.println(i[0]);
+ }
+
+}
diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/BinaryTreeNode.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/BinaryTreeNode.java
new file mode 100644
index 0000000000..b8b613d6f0
--- /dev/null
+++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/BinaryTreeNode.java
@@ -0,0 +1,35 @@
+package com.github.wdn.coding2017.basic;
+
+/**
+ * TODO 代码在公司电脑里。。。后续提交
+ */
+public class BinaryTreeNode {
+
+ private Object data;
+ private BinaryTreeNode left;
+ private BinaryTreeNode right;
+
+ public Object getData() {
+ return data;
+ }
+ public void setData(Object data) {
+ this.data = data;
+ }
+ public BinaryTreeNode getLeft() {
+ return left;
+ }
+ public void setLeft(BinaryTreeNode left) {
+ this.left = left;
+ }
+ public BinaryTreeNode getRight() {
+ return right;
+ }
+ public void setRight(BinaryTreeNode right) {
+ this.right = right;
+ }
+
+ public BinaryTreeNode insert(Object o){
+ return null;
+ }
+
+}
diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Iterator.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Iterator.java
new file mode 100644
index 0000000000..044ddf0993
--- /dev/null
+++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Iterator.java
@@ -0,0 +1,10 @@
+package com.github.wdn.coding2017.basic;
+
+/**
+ * TODO 主要考虑遍历中安全删除元素的实现
+ */
+public interface Iterator {
+ public boolean hasNext();
+ public Object next();
+
+}
diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/LinkedList.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/LinkedList.java
new file mode 100644
index 0000000000..6040cb5a47
--- /dev/null
+++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/LinkedList.java
@@ -0,0 +1,233 @@
+package com.github.wdn.coding2017.basic;
+
+/**
+ * TODO 只是简单实现 缺少对边界的处理
+ * 参考JDK源码改为更优雅的实现
+ */
+
+public class LinkedList implements List {
+
+ private Node head;
+ private Node tail;
+ private int size;
+
+ public LinkedList(){
+ this.head=null;
+ this.tail=null;
+ }
+ public void add(Object o){
+ Node newNode = new Node(o);
+ if (head == null) {
+ head = newNode;
+ tail = newNode;
+ }else{
+ tail.setNext(newNode);
+ newNode.setPre(tail);
+ tail = newNode;
+ }
+ size++;
+ }
+ public void add(int index , Object o){
+ checkIndex(index);
+ Node indexNode = getNode(index);
+ Node newNode = new Node(o);
+ Node pre = indexNode.getPre();
+ if(pre!=null){
+ pre.setNext(newNode);
+ }else{
+ head = newNode;
+ }
+ newNode.setPre(pre);
+ newNode.setNext(indexNode);
+ indexNode.setPre(newNode);
+ }
+ private void checkIndex(int index){
+ if(index >= size || index <0){
+ throw new IndexOutOfBoundsException();
+ }
+ }
+ private Node getNode(int index){
+ checkIndex(index);
+ // TODO这里可以优化,先判断index在前半部还是后半部分 然后确定从头部或者尾部查找
+ Node result=null;
+ if(index==0){
+ return head;
+ }
+ if(index==size-1){
+ return tail;
+ }
+ for (int i = 0; i < index; i++) {
+ result = head.getNext();
+ }
+ return result;
+ }
+ public Object get(int index){
+ return getNode(index).getData();
+ }
+ public Object remove(int index){
+ checkIndex(index);
+ Node indexNode = getNode(index);
+ Node pre = indexNode.getPre();
+ Node next = indexNode.getNext();
+ if(pre!=null){
+ pre.setNext(next);
+ }else{
+ head = next;
+ }
+ if(next!=null){
+ next.setPre(pre);
+ }else{
+ tail = pre;
+ }
+ return indexNode.getData();
+ }
+
+ public int size(){
+ return size;
+ }
+
+ public void addFirst(Object o){
+ Node newNode = new Node(o);
+ head.setPre(newNode);
+ newNode.setNext(head);
+ head = newNode;
+ }
+ public void addLast(Object o){
+ Node newNode = new Node(o);
+ tail.setNext(newNode);
+ newNode.setPre(tail);
+ tail = newNode;
+ }
+ public Object removeFirst(){
+ Node next = head.getNext();
+ Node oldHead = head;
+ head = next;
+ head.setPre(null);
+ return oldHead;
+ }
+ public Object removeLast(){
+ Node oldTail = tail;
+ Node pre = tail.getPre();
+ tail = pre;
+ tail.setNext(null);
+ return oldTail;
+ }
+ public Iterator iterator(){
+
+ return null;
+ }
+
+ /**
+ * JDK 中使用构造方法的方式设置next和pre减少不必要的getset方法更优雅
+ */
+ private static class Node{
+
+ Object data;
+ Node next;
+ Node pre;
+ public Node(){
+
+ }
+ public Node(Object data){
+ this.data = data;
+ }
+ public Object getData() {
+ return data;
+ }
+
+ public void setData(Object data) {
+ this.data = data;
+ }
+
+ public Node getNext() {
+ return next;
+ }
+
+ public void setNext(Node next) {
+ this.next = next;
+ }
+
+ public Node getPre() {
+ return pre;
+ }
+
+ public void setPre(Node pre) {
+ this.pre = pre;
+ }
+ }
+
+ /**
+ * 把该链表逆置
+ * 例如链表为 3->7->10 , 逆置后变为 10->7->3
+ */
+ public void reverse(){
+ }
+
+ /**
+ * 删除一个单链表的前半部分
+ * 例如:list = 2->5->7->8 , 删除以后的值为 7->8
+ * 如果list = 2->5->7->8->10 ,删除以后的值为7,8,10
+
+ */
+ public void removeFirstHalf(){
+
+ }
+
+ /**
+ * 从第i个元素开始, 删除length 个元素 , 注意i从0开始
+ * @param i
+ * @param length
+ */
+ public void remove(int i, int length){
+
+ }
+ /**
+ * 假定当前链表和list均包含已升序排列的整数
+ * 从当前链表中取出那些list所指定的元素
+ * 例如当前链表 = 11->101->201->301->401->501->601->701
+ * listB = 1->3->4->6
+ * 返回的结果应该是[101,301,401,601]
+ * @param list
+ */
+ public static int[] getElements(LinkedList list){
+ return null;
+ }
+
+ /**
+ * 已知链表中的元素以值递增有序排列,并以单链表作存储结构。
+ * 从当前链表中中删除在list中出现的元素
+
+ * @param list
+ */
+
+ public void subtract(LinkedList list){
+
+ }
+
+ /**
+ * 已知当前链表中的元素以值递增有序排列,并以单链表作存储结构。
+ * 删除表中所有值相同的多余元素(使得操作后的线性表中所有元素的值均不相同)
+ */
+ public void removeDuplicateValues(){
+
+ }
+
+ /**
+ * 已知链表中的元素以值递增有序排列,并以单链表作存储结构。
+ * 试写一高效的算法,删除表中所有值大于min且小于max的元素(若表中存在这样的元素)
+ * @param min
+ * @param max
+ */
+ public void removeRange(int min, int max){
+
+ }
+
+ /**
+ * 假设当前链表和参数list指定的链表均以元素依值递增有序排列(同一表中的元素值各不相同)
+ * 现要求生成新链表C,其元素为当前链表和list中元素的交集,且表C中的元素有依值递增有序排列
+ * @param list
+ */
+ public LinkedList intersection( LinkedList list){
+ return null;
+ }
+}
diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/List.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/List.java
new file mode 100644
index 0000000000..d6c9e95cb0
--- /dev/null
+++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/List.java
@@ -0,0 +1,9 @@
+package com.github.wdn.coding2017.basic;
+
+public interface List {
+ public void add(Object o);
+ public void add(int index, Object o);
+ public Object get(int index);
+ public Object remove(int index);
+ public int size();
+}
diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Queue.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Queue.java
new file mode 100644
index 0000000000..59992f0cbd
--- /dev/null
+++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Queue.java
@@ -0,0 +1,24 @@
+package com.github.wdn.coding2017.basic;
+
+/**
+ * 队列使用链表实现比较简单理论上是无界队列
+ * 如果使用数组需要处理很多问题比如长度限制,元素的复制
+ */
+public class Queue {
+ private LinkedList queue = new LinkedList();
+ public void enQueue(Object o){
+ queue.add(o);
+ }
+
+ public Object deQueue(){
+ return queue.remove(0);
+ }
+
+ public boolean isEmpty(){
+ return queue.size()==0;
+ }
+
+ public int size(){
+ return queue.size();
+ }
+}
diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Stack.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Stack.java
new file mode 100644
index 0000000000..f0a0fe56e9
--- /dev/null
+++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/basic/Stack.java
@@ -0,0 +1,27 @@
+package com.github.wdn.coding2017.basic;
+
+/**
+ * 使用list实现比较简单
+ * 可以考虑使用其它结构
+ */
+public class Stack {
+ private ArrayList elementData = new ArrayList();
+
+ public void push(Object o){
+ elementData.add(o);
+ }
+
+ public Object pop(){
+ return elementData.remove(elementData.size()-1);
+ }
+
+ public Object peek(){
+ return elementData.get(elementData.size()-1);
+ }
+ public boolean isEmpty(){
+ return elementData.size()==0;
+ }
+ public int size(){
+ return elementData.size();
+ }
+}
diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/array/ArrayUtil.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/array/ArrayUtil.java
new file mode 100644
index 0000000000..45c32815f4
--- /dev/null
+++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/array/ArrayUtil.java
@@ -0,0 +1,96 @@
+package com.github.wdn.coding2017.coderising.array;
+
+public class ArrayUtil {
+
+ /**
+ * 给定一个整形数组a , 对该数组的值进行置换
+ 例如: a = [7, 9 , 30, 3] , 置换后为 [3, 30, 9,7]
+ 如果 a = [7, 9, 30, 3, 4] , 置换后为 [4,3, 30 , 9,7]
+ * @param origin
+ * @return
+ */
+ public void reverseArray(int[] origin){
+
+ }
+
+ /**
+ * 现在有如下的一个数组: int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5}
+ * 要求将以上数组中值为0的项去掉,将不为0的值存入一个新的数组,生成的新数组为:
+ * {1,3,4,5,6,6,5,4,7,6,7,5}
+ * @param oldArray
+ * @return
+ */
+
+ public int[] removeZero(int[] oldArray){
+ return null;
+ }
+
+ /**
+ * 给定两个已经排序好的整形数组, a1和a2 , 创建一个新的数组a3, 使得a3 包含a1和a2 的所有元素, 并且仍然是有序的
+ * 例如 a1 = [3, 5, 7,8] a2 = [4, 5, 6,7] 则 a3 为[3,4,5,6,7,8] , 注意: 已经消除了重复
+ * @param array1
+ * @param array2
+ * @return
+ */
+
+ public int[] merge(int[] array1, int[] array2){
+ return null;
+ }
+ /**
+ * 把一个已经存满数据的数组 oldArray的容量进行扩展, 扩展后的新数据大小为oldArray.length + size
+ * 注意,老数组的元素在新数组中需要保持
+ * 例如 oldArray = [2,3,6] , size = 3,则返回的新数组为
+ * [2,3,6,0,0,0]
+ * @param oldArray
+ * @param size
+ * @return
+ */
+ public int[] grow(int [] oldArray, int size){
+ return null;
+ }
+
+ /**
+ * 斐波那契数列为:1,1,2,3,5,8,13,21...... ,给定一个最大值, 返回小于该值的数列
+ * 例如, max = 15 , 则返回的数组应该为 [1,1,2,3,5,8,13]
+ * max = 1, 则返回空数组 []
+ * @param max
+ * @return
+ */
+ public int[] fibonacci(int max){
+ return null;
+ }
+
+ /**
+ * 返回小于给定最大值max的所有素数数组
+ * 例如max = 23, 返回的数组为[2,3,5,7,11,13,17,19]
+ * @param max
+ * @return
+ */
+ public int[] getPrimes(int max){
+ return null;
+ }
+
+ /**
+ * 所谓“完数”, 是指这个数恰好等于它的因子之和,例如6=1+2+3
+ * 给定一个最大值max, 返回一个数组, 数组中是小于max 的所有完数
+ * @param max
+ * @return
+ */
+ public int[] getPerfectNumbers(int max){
+ return null;
+ }
+
+ /**
+ * 用seperator 把数组 array给连接起来
+ * 例如array= [3,8,9], seperator = "-"
+ * 则返回值为"3-8-9"
+ * @param array
+ * @param s
+ * @return
+ */
+ public String join(int[] array, String seperator){
+ return null;
+ }
+
+
+}
diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/DownloadThread.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/DownloadThread.java
new file mode 100644
index 0000000000..cc0e750c98
--- /dev/null
+++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/DownloadThread.java
@@ -0,0 +1,20 @@
+package com.github.wdn.coding2017.coderising.download;
+
+import com.coderising.download.api.Connection;
+
+public class DownloadThread extends Thread{
+
+ Connection conn;
+ int startPos;
+ int endPos;
+
+ public DownloadThread( Connection conn, int startPos, int endPos){
+
+ this.conn = conn;
+ this.startPos = startPos;
+ this.endPos = endPos;
+ }
+ public void run(){
+
+ }
+}
diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/FileDownloader.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/FileDownloader.java
new file mode 100644
index 0000000000..a5c19a7d77
--- /dev/null
+++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/FileDownloader.java
@@ -0,0 +1,73 @@
+package com.github.wdn.coding2017.coderising.download;
+
+import com.coderising.download.api.Connection;
+import com.coderising.download.api.ConnectionException;
+import com.coderising.download.api.ConnectionManager;
+import com.coderising.download.api.DownloadListener;
+
+
+public class FileDownloader {
+
+ String url;
+
+ DownloadListener listener;
+
+ ConnectionManager cm;
+
+
+ public FileDownloader(String _url) {
+ this.url = _url;
+
+ }
+
+ public void execute(){
+ // 在这里实现你的代码, 注意: 需要用多线程实现下载
+ // 这个类依赖于其他几个接口, 你需要写这几个接口的实现代码
+ // (1) ConnectionManager , 可以打开一个连接,通过Connection可以读取其中的一段(用startPos, endPos来指定)
+ // (2) DownloadListener, 由于是多线程下载, 调用这个类的客户端不知道什么时候结束,所以你需要实现当所有
+ // 线程都执行完以后, 调用listener的notifiedFinished方法, 这样客户端就能收到通知。
+ // 具体的实现思路:
+ // 1. 需要调用ConnectionManager的open方法打开连接, 然后通过Connection.getContentLength方法获得文件的长度
+ // 2. 至少启动3个线程下载, 注意每个线程需要先调用ConnectionManager的open方法
+ // 然后调用read方法, read方法中有读取文件的开始位置和结束位置的参数, 返回值是byte[]数组
+ // 3. 把byte数组写入到文件中
+ // 4. 所有的线程都下载完成以后, 需要调用listener的notifiedFinished方法
+
+ // 下面的代码是示例代码, 也就是说只有一个线程, 你需要改造成多线程的。
+ Connection conn = null;
+ try {
+
+ conn = cm.open(this.url);
+
+ int length = conn.getContentLength();
+
+ new DownloadThread(conn,0,length-1).start();
+
+ } catch (ConnectionException e) {
+ e.printStackTrace();
+ }finally{
+ if(conn != null){
+ conn.close();
+ }
+ }
+
+
+
+
+ }
+
+ public void setListener(DownloadListener listener) {
+ this.listener = listener;
+ }
+
+
+
+ public void setConnectionManager(ConnectionManager ucm){
+ this.cm = ucm;
+ }
+
+ public DownloadListener getListener(){
+ return this.listener;
+ }
+
+}
diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/FileDownloaderTest.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/FileDownloaderTest.java
new file mode 100644
index 0000000000..490db5c08b
--- /dev/null
+++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/FileDownloaderTest.java
@@ -0,0 +1,59 @@
+package com.github.wdn.coding2017.coderising.download;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.coderising.download.api.ConnectionManager;
+import com.coderising.download.api.DownloadListener;
+import com.coderising.download.impl.ConnectionManagerImpl;
+
+public class FileDownloaderTest {
+ boolean downloadFinished = false;
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void testDownload() {
+
+ String url = "http://localhost:8080/test.jpg";
+
+ FileDownloader downloader = new FileDownloader(url);
+
+
+ ConnectionManager cm = new ConnectionManagerImpl();
+ downloader.setConnectionManager(cm);
+
+ downloader.setListener(new DownloadListener() {
+ @Override
+ public void notifyFinished() {
+ downloadFinished = true;
+ }
+
+ });
+
+
+ downloader.execute();
+
+ // 等待多线程下载程序执行完毕
+ while (!downloadFinished) {
+ try {
+ System.out.println("还没有下载完成,休眠五秒");
+ //休眠5秒
+ Thread.sleep(5000);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ System.out.println("下载完成!");
+
+
+
+ }
+
+}
diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/Connection.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/Connection.java
new file mode 100644
index 0000000000..91e8aa463b
--- /dev/null
+++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/Connection.java
@@ -0,0 +1,23 @@
+package com.github.wdn.coding2017.coderising.download.api;
+
+import java.io.IOException;
+
+public interface Connection {
+ /**
+ * 给定开始和结束位置, 读取数据, 返回值是字节数组
+ * @param startPos 开始位置, 从0开始
+ * @param endPos 结束位置
+ * @return
+ */
+ public byte[] read(int startPos, int endPos) throws IOException;
+ /**
+ * 得到数据内容的长度
+ * @return
+ */
+ public int getContentLength();
+
+ /**
+ * 关闭连接
+ */
+ public void close();
+}
diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/ConnectionException.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/ConnectionException.java
new file mode 100644
index 0000000000..5c90080401
--- /dev/null
+++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/ConnectionException.java
@@ -0,0 +1,5 @@
+package com.github.wdn.coding2017.coderising.download.api;
+
+public class ConnectionException extends Exception {
+
+}
diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/ConnectionManager.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/ConnectionManager.java
new file mode 100644
index 0000000000..f814016839
--- /dev/null
+++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/ConnectionManager.java
@@ -0,0 +1,10 @@
+package com.github.wdn.coding2017.coderising.download.api;
+
+public interface ConnectionManager {
+ /**
+ * 给定一个url , 打开一个连接
+ * @param url
+ * @return
+ */
+ public Connection open(String url) throws ConnectionException;
+}
diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/DownloadListener.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/DownloadListener.java
new file mode 100644
index 0000000000..078b14365d
--- /dev/null
+++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/api/DownloadListener.java
@@ -0,0 +1,5 @@
+package com.github.wdn.coding2017.coderising.download.api;
+
+public interface DownloadListener {
+ public void notifyFinished();
+}
diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/impl/ConnectionImpl.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/impl/ConnectionImpl.java
new file mode 100644
index 0000000000..e2bc4dcd10
--- /dev/null
+++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/impl/ConnectionImpl.java
@@ -0,0 +1,27 @@
+package com.github.wdn.coding2017.coderising.download.impl;
+
+import java.io.IOException;
+
+import com.coderising.download.api.Connection;
+
+public class ConnectionImpl implements Connection{
+
+ @Override
+ public byte[] read(int startPos, int endPos) throws IOException {
+
+ return null;
+ }
+
+ @Override
+ public int getContentLength() {
+
+ return 0;
+ }
+
+ @Override
+ public void close() {
+
+
+ }
+
+}
diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/impl/ConnectionManagerImpl.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/impl/ConnectionManagerImpl.java
new file mode 100644
index 0000000000..082e2af8fd
--- /dev/null
+++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/download/impl/ConnectionManagerImpl.java
@@ -0,0 +1,15 @@
+package com.github.wdn.coding2017.coderising.download.impl;
+
+import com.coderising.download.api.Connection;
+import com.coderising.download.api.ConnectionException;
+import com.coderising.download.api.ConnectionManager;
+
+public class ConnectionManagerImpl implements ConnectionManager {
+
+ @Override
+ public Connection open(String url) throws ConnectionException {
+
+ return null;
+ }
+
+}
diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/LoginAction.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/LoginAction.java
new file mode 100644
index 0000000000..b342a51061
--- /dev/null
+++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/LoginAction.java
@@ -0,0 +1,39 @@
+package com.github.wdn.coding2017.coderising.litestruts;
+
+/**
+ * 这是一个用来展示登录的业务类, 其中的用户名和密码都是硬编码的。
+ * @author liuxin
+ *
+ */
+public class LoginAction{
+ private String name ;
+ private String password;
+ private String message;
+
+ public String getName() {
+ return name;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public String execute(){
+ if("test".equals(name) && "1234".equals(password)){
+ this.message = "login successful";
+ return "success";
+ }
+ this.message = "login failed,please check your user/pwd";
+ return "fail";
+ }
+
+ public void setName(String name){
+ this.name = name;
+ }
+ public void setPassword(String password){
+ this.password = password;
+ }
+ public String getMessage(){
+ return this.message;
+ }
+}
diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/Struts.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/Struts.java
new file mode 100644
index 0000000000..cf3d0564f1
--- /dev/null
+++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/Struts.java
@@ -0,0 +1,34 @@
+package com.github.wdn.coding2017.coderising.litestruts;
+
+import java.util.Map;
+
+
+
+public class Struts {
+
+ public static View runAction(String actionName, Map parameters) {
+
+ /*
+
+ 0. 读取配置文件struts.xml
+
+ 1. 根据actionName找到相对应的class , 例如LoginAction, 通过反射实例化(创建对象)
+ 据parameters中的数据,调用对象的setter方法, 例如parameters中的数据是
+ ("name"="test" , "password"="1234") ,
+ 那就应该调用 setName和setPassword方法
+
+ 2. 通过反射调用对象的exectue 方法, 并获得返回值,例如"success"
+
+ 3. 通过反射找到对象的所有getter方法(例如 getMessage),
+ 通过反射来调用, 把值和属性形成一个HashMap , 例如 {"message": "登录成功"} ,
+ 放到View对象的parameters
+
+ 4. 根据struts.xml中的 配置,以及execute的返回值, 确定哪一个jsp,
+ 放到View对象的jsp字段中。
+
+ */
+
+ return null;
+ }
+
+}
diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/StrutsTest.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/StrutsTest.java
new file mode 100644
index 0000000000..9fee464283
--- /dev/null
+++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/StrutsTest.java
@@ -0,0 +1,43 @@
+package com.github.wdn.coding2017.coderising.litestruts;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+
+
+
+
+public class StrutsTest {
+
+ @Test
+ public void testLoginActionSuccess() {
+
+ String actionName = "login";
+
+ Map params = new HashMap();
+ params.put("name","test");
+ params.put("password","1234");
+
+
+ View view = Struts.runAction(actionName,params);
+
+ Assert.assertEquals("/jsp/homepage.jsp", view.getJsp());
+ Assert.assertEquals("login successful", view.getParameters().get("message"));
+ }
+
+ @Test
+ public void testLoginActionFailed() {
+ String actionName = "login";
+ Map params = new HashMap();
+ params.put("name","test");
+ params.put("password","123456"); //密码和预设的不一致
+
+ View view = Struts.runAction(actionName,params);
+
+ Assert.assertEquals("/jsp/showLogin.jsp", view.getJsp());
+ Assert.assertEquals("login failed,please check your user/pwd", view.getParameters().get("message"));
+ }
+}
diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/View.java b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/View.java
new file mode 100644
index 0000000000..31e1805dc7
--- /dev/null
+++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/View.java
@@ -0,0 +1,23 @@
+package com.github.wdn.coding2017.coderising.litestruts;
+
+import java.util.Map;
+
+public class View {
+ private String jsp;
+ private Map parameters;
+
+ public String getJsp() {
+ return jsp;
+ }
+ public View setJsp(String jsp) {
+ this.jsp = jsp;
+ return this;
+ }
+ public Map getParameters() {
+ return parameters;
+ }
+ public View setParameters(Map parameters) {
+ this.parameters = parameters;
+ return this;
+ }
+}
diff --git a/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/struts.xml b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/struts.xml
new file mode 100644
index 0000000000..171848ecd1
--- /dev/null
+++ b/group24/626451284Learning/src/main/java/com/github/wdn/coding2017/coderising/litestruts/struts.xml
@@ -0,0 +1,11 @@
+
+
+
+ /jsp/homepage.jsp
+ /jsp/showLogin.jsp
+
+
+ /jsp/welcome.jsp
+ /jsp/error.jsp
+
+