Contact Us
Projects | Assignments
sellfycode@gmail.com
More
Get Homework Help
English
Español
Português
Français
Deutsch
Italiano
Русский
close
Contact Us
Projects | Assignments
sellfycode@gmail.com
Starting from:
$30
Add to cart
CSE270E- Assignment 11 Solved
Create a new directory called Assignment-11
Create a simple high/low guessing game and the API to support it.
Modify the random Number app so that it uses the express static middleware and also uses the bodyparser.json middleware.
Create the following API code in app.js
Get Random Number between range
/api/v1/random/:min/:max
{"result":"YOUR RANDOM NUMBER"} or if errror
status=404
{"result":"msg"}
Get Random Number between 0 and Max
/api/v1/random/:max
{"random":"YOUR RANDOM NUMBER"} or if error
status=404
{"result":"msg"}
Set Game Max in server. The server will let the user play high low and this call sets the maximum range for the game. /api/v1/game method: post
{"max":"number"}
{"result": "OK" } if error
status=404 result="Error"
Test Number against number in Server /api/v1/game/:number
method: get jsonOut
{"result": "HIGH" or "LOW", or "MATCH"} if bad input status=404 result="ERROR"
Create an index.html to play the game
Use very simple html. My html file is at the end of these instructions.
Create game.js that uses jquery to make calls to the API
Make sure your package.json has all the required modules
Run this server on port 3011 Make sure all your code is in git
Submit:
a clickable link to git a clickable link to your server
Video Discussion Assignment and Solution
HTML file
<!doctype html
<!--
Scott Campbell
Assignment 11
CSE 270
Winter 2019
--
<html lang="en-us"
<head
<titleGame</title
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"</script <script src='game.js'</script
</head
<body
<div
<h1Guessing game</h1
<h2 id='result'</h2
<form id='game'
Guess: <input type='text' id='guess'
</form
</div
<div
<h2Set guessing game range</h2
<form id='setMax'
Max: <input type='text' id='max'
<br
<input type='submit'
</form
</div
</body
</html
Some Rubric (12)
Criteria
Ratings
Pts
Code in git and called Assignment-11
2.0 pts Full Marks
0.0 pts
No Marks
2.0 pts
/api/v1/random/:min/:max works
5.0 pts Full Marks
0.0 pts
No Marks
5.0 pts
/api/v1/random/:max works
5.0 pts Full Marks
0.0 pts
No Marks
5.0 pts
Set Game Max in server works
5.0 pts Full Marks
0.0 pts
No Marks
5.0 pts
test Number against number in Server works
5.0 pts Full Marks
0.0 pts
No Marks
5.0 pts
HTML plays
5.0 pts Full Marks
0.0 pts
No Marks
5.0 pts
Total Points: 27.0
Starting from:
$30
Add to cart
1 file (8.8KB)
More products
COMP1406 - Assignment #1 Solved
$25
Add to cart
COMP1406 - Assignment #2 Solved
$25
Add to cart
IT-210 Excel Solved
$15
Add to cart