subject

In this lab, you will design a die game called 15. The object of the game is to score exactly 15 points in as few rolls of the die as possible. After each roll, the player can choose to add the current die value to his or her score or not, unless the die value is six, in which case it is automatically added to the player’s score. If the player’s score exceeds 15, the player loses. If the player’s score is equal to 15, the player wins. Play continues until the player reaches or exceeds 15 points.
Description:
To start the game, the player presses the reset switch. The score will be set to zero and both the Win and Lose LEDs will be turned off. The player then rolls the die by toggling the Rb switch to the Roll position. The die counter should operate with a clock frequency of 27 MHz or 50 MHz so that the player cannot control the outcome of a roll. After about a second or more, the player toggles the Rb switch back to the Off position to end the roll. The Turn Counter should be incremented to indicate that the player has taken a roll. If the player rolled a six, it is automatically added to his or her score. Otherwise, the player can press the Add button to add the die value to his or her score or the player can press the Pass button to leave the score unchanged. After each roll, the score will be greater than, less than or equal to 15. If the score is equal to 15, the player wins – the Win LED should be turned on and remain on until the system is reset for a new game. If the score is greater than 15, the player loses – the Lose LED should be turned on and remain on until the system is reset. Once the player has won or lost, the player cannot roll the die again until the system is reset. (The Rb switch will not have any effect in these states.) If the score is less than 15, the player will roll again. After each roll, the player presses either the Add button or the Pass button (unless a six is rolled) before the die can be rolled again. Play continues until the player’s score equals or exceeds 15.
1) Draw a state diagram for the game as a Moore finite state machine.
2) Draw a state diagram for the game as a Mealy finite state machine.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:20
The kurt vonnegut commencement speech, the neiman-marcus chocolate chip cookie recipe, and the get-well emails to the dying boy are examples of select one: a. social engineering b. hoax emails c. email viruses d. worms
Answers: 1
question
Computers and Technology, 22.06.2019 17:30
Where would you click to edit the chart data?
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
Which of the following is an example of intellectual properly! oa. new version of a novelb. journal of ideasc. pages of a bookood. lines of a poem
Answers: 2
question
Computers and Technology, 23.06.2019 09:30
[java] create an application called registrar that has the following classes: a. a student class that minimally stores the following data fields for a student: - name - student id number - number of credits - total grade points earned and this class should also be provides the following methods: - a constructor that initializes the name and id fields - a method that returns the student name field - a method that returns the student id field - methods to set and retrieve the total number of credits - methods to set and retrieve the total number of grade points earned. - a method that returns the gpa (grade points divided by credits) b. an instructor class that minimally stores the following data fields for an instructor: - name - faculty id number - department the following methods should be provided: - a constructor that initializes the name and id fields - methods to set and retrieve the instructor’s department. c. a course class that minimally stores the following data for a course: - name of the course- course registration code- maximum number of 35 students- instructor- number of students- students registered in the course (an array)the following methods should also be provided: - a constructor that initializes the name, registration code, and maximum number of students- methods to set and retrieve the instructor- a method to search for a student in the course; the search should be based on an id number.- a method to add a student to the course. if the course is hill, then an exception with an appropriate message should be raised (try creating your own exception class for this). also, be sure that the student is not already registered in the course. the list of students should be in the order that they registered.- a method to remove a student from the course. if the student is not found, then an exception with an appropriate message should be raised (use the same exception class mentioned a method that will allow course objects to be output to a file using object serialization- a method that will allow course objects to be read in from a file created with object serializationyou will note that the student and instructor classes described above have some commonality. create aperson class that captures this commonality and uses it as a base class for student and instructor. this class should be responsible for the name and id fields and also provide atostring method that returns a string of the form name, id. this will be the inheritedtostring method for the student and instructor classes.1. draw a uml diagram for diss application.2. implement the previous classes in java. write a main program that can serve as a test class that tests all of the methods created and demonstrates that they are working
Answers: 2
You know the right answer?
In this lab, you will design a die game called 15. The object of the game is to score exactly 15 poi...
Questions
question
Mathematics, 28.08.2020 02:01
Questions on the website: 13722360