Computer Science 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

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter7: Characters, Strings, And The Stringbuilder
Section: Chapter Questions
Problem 3GZ
icon
Related questions
Question

 

Computer Science

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
steps

Step by step

Solved in 6 steps with 6 images

Blurred answer
Knowledge Booster
Running Time of Application
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage