Giter VIP home page Giter VIP logo

project2csc312's Introduction

project2CSC312

Lam and Sam aka LAMUELSOFT

Requirements

  1. Start a contest
  • The user will start a contest with a url http://localhost:8080/newcontest.
  • The response will return a random integer between 1-1000
  • This number will be used as the contestid. Do not use a contestid that is already in use.
  • For each subsequent request to the server, the contestid must be specified on the url.
  • Each contest will have a 120 second timer, once 0 is reached, subsequent requests will return status code HttpServletResponse.SC_GONE.
  1. Accessing a letter
  • contest:the contest id received in when starting a contest (see step 1).
  • game:1-3
  • Column: a-e
  • Row: 1-5
  • If the user submits a request, with an invalid contest id, game or pos, you must responde with the status code: response.SC_BAD_REQUEST.
  1. Submitting a solution
  • to submit a solution to the contest, a specific url is used: http://localhost:8080//solution?contest=&game=<1 to 3>&solution=
  • solution: the word which is the solution
  • If a submission is valid we must:
  • return SC_OK and in the html text, the number of seconds it took to resolve the problem and how many letters were requested.
  • If a submission is invalid for a game:
  • the contest id must be considered invalid, and further request using this contestid should return response.SC_BAD_REQUEST.
  • For a valid submission, keep a list of the 5 fastest (in term of request of letters) contest.

The solutions must be in this form:

  • Game 1: position A1:A3, solution: zap
  • Game 2: position E3:E5, solution: zig
  • Game 3: position C2:C4, solution: zag
  1. Top Score
  • The url : https:// localhost:8080/topscore, will return in descending order the list of the 5 fastest times.

  • Output should be in this form:

  • contest id, time in seconds

  1. Word list
  • the url https:// localhost:8080/words, will return this list of words:
    1. zap
    2. zep
    3. zip
    4. zag
    5. zig
  1. Unit tests: you must provide individual unit tests for each item that you must test A unit test must be created for:
  • -validation that the word list is correct
  • -validation of starting a new contest
  • -validation of requesting for a letter (valid and invalid values for each parameter and combination).
  • -validation of the timeout process for a contest (see https://docs.oracle.com/javase/tutorial/essential/concurrency/sleep.html)
  • -validation of submitting a solution (valid and invalid submission + management of the contest)
  • -validation of the top score

project2csc312's People

Contributors

malloxpb avatar scove avatar

Watchers

James Cloos avatar

project2csc312's Issues

implement part 2

  • contest:the contest id received in when starting a contest (see step 1).

  • game:1-3

  • Column: a-e

  • Row: 1-5

  • If the user submits a request, with an invalid contest id, game or pos, you must responde with the status code: response.SC_BAD_REQUEST.

implement part 6

Unit tests: you must provide individual unit tests for each item that you must test A unit test must be created for:
-validation that the word list is correct
-validation of starting a new contest
-validation of requesting for a letter (valid and invalid values for each parameter and combination).
-validation of the timeout process for a contest (see https://docs.oracle.com/javase/tutorial/essential/concurrency/sleep.html)
-validation of submitting a solution (valid and invalid submission + management of the contest)
-validation of the top score

implement part 5

Word list
the url https:// localhost:8080/words, will return this list of words:
zap
zep
zip
zag
zig

implement part 4

  • The url : https:// localhost:8080/topscore, will return in descending order the list of the 5 fastest times.
  • Output should be in this form: contest id, time in seconds

implement part 1

  • The user will start a contest with a url http://localhost:8080/newcontest.

  • The response will return a random integer between 1-1000

  • This number will be used as the contestid. Do not use a contestid that is already in use.

  • For each subsequent request to the server, the contestid must be specified on the url.

  • Each contest will have a 120 second timer, once 0 is reached, subsequent requests will return status code HttpServletResponse.SC_GONE.

implement part 3

  • to submit a solution to the contest, a specific url is used: http://localhost:8080//solution?contest=&game=<1 to 3>&solution=
  • solution: the word which is the solution
  • If a submission is valid we must:
    return SC_OK and in the html text, the number of seconds it took to resolve the problem and how many letters were requested.
  • If a submission is invalid for a game:
    the contest id must be considered invalid, and further request using this contestid should return response.SC_BAD_REQUEST.
  • For a valid submission, keep a list of the 5 fastest (in term of request of letters) contest.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.