联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> Java编程Java编程

日期:2019-05-28 10:42

Counter Magic

Description:

In this mini project we will give you a small Android App called “Counter magic” (APK file). You first install it on your mobile device, it works as a client, and can send various

HTTP requests and receive responses from the server to make app functions work

properly. Your work is to implement various server functions to correctly handle these

requests.

Detailed Requirements:

1, You are free to use any popular server-side programming languages. Preferred: PHP,

Python or Javascript (Node.js).

2, The purpose of the project is to implement actual server functions, so you can use

other tools to establish the HTTP server (for example, Apache) if you need. A local

HTTP server is enough, as on the client app you can choose to use any server address.

3, Along with all source code, you also need to submit a Readme file (TXT, DOC or PDF).

It includes anything you think is important for us to evaluate your work. One critical

part of the Readme is telling us how to setup your server and test it with the client app.

Functions you have to implement:

1, User verification. When first start the client app, it needs a user account to login.

Your server will need to properly respond the client’s login request (in JSON format) at

the url: <your_host>/login, whether the username exists, whether the password

is correct, or other situations;

The response should also be a JSON formatted string, in the following format:

{

“result”: “Success”,

“info”:

{

“user”: {“id”: “…”, name: “…”},

“character”: {“gender”: ”…”, “class”: “…”}

}

}

Or:

{

“result”: “Failed”,

“info”: “some descriptions about the reason”

}

The default user is:

Username: Sam

Password: 1234

Character.gerder: Male

Character.class: Human

2, Once login successfully, your server will have to perform a special task called

“Counter Magic”, the goal is to counter the magic words of the evil wizard and defeat

him (for example, when the evil wizard says “black”, you should say “white” to counter

it). Please refer to the client menu to get the clue of what are the basic counter words.

This time the client will use HTTP GET method to send evil wizard’s magic words at the

url: <your_host>/counter, and your response should be in JSON format, as follows:

{

“counter”: [“word1”, “word2”, “word3”],

“number”: 3

}

Optional:

1, create a simple database to store user information, including id, username,

password, character_gender, character_class. Every time when you

received the client login request, you will retrieve information from the database and

send back;

2, defeat the evil wizard with full health;

How to submit:

Please zip all your source code, essential build files, and Readme file, name the zip file

as “Xyken_Server01_<yourname>.zip”,


版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp