Many websites let users rate items by selecting some number of stars. On the web, this is usually implemented with a small Javascript program that runs in the browser. In any state, a sequence of stars is displayed, with a (possibly empty) prefix in a distinct color, representing the current selection. The user can extend and contract the prefix simply by hovering over the displayed stars. When the user clicks on a star, the current selection is submitted, and the browser issues an HTTP POST request to the server. The selection may start showing no stars (that is, the empty prefix), or it may already show one star or more. To allow the user to reset to no stars, a click on the final star in the previous submission is treated as a reset. Model this mechanism as a transition system. You should start by designating events; you may need to refine your designations as you think more carefully about the problem. You should include, in addition to the user inputs, the outputs needed both to update the display and to send the final value to the server.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Many websites let users rate items by selecting some number of stars. On the
web, this is usually implemented with a small Javascript program that runs in the
browser. In any state, a sequence of stars is displayed, with a (possibly empty) prefix in a
distinct color, representing the current selection. The user can extend and contract the
prefix simply by hovering over the displayed stars. When the user clicks on a star, the
current selection is submitted, and the browser issues an HTTP POST request to the
server. The selection may start showing no stars (that is, the empty prefix), or it may
already show one star or more. To allow the user to reset to no stars, a click on the final
star in the previous submission is treated as a reset.
Model this mechanism as a transition system. You should start by designating events; you
may need to refine your designations as you think more carefully about the problem. You
should include, in addition to the user inputs, the outputs needed both to update the
display and to send the final value to the server. 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 6 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY