Turtle Hare Race Use two Timer objects to write a Java program to simulate the race between turtle and hare. The hare runs faster than the turtle, but it may sleep once or twice during each race. You should take the following requirements into account: • The user is allowed to define whether the hare will not sleep, will sleep once, or will sleep twice during the race, by clicking point(s) along the lane. If the user clicks more than twice, only the first two should be considered. The user is allowed to define the speed of the turtle and of the hare. The two numbers input from the user indicate the numbers of milliseconds for each step of the tortoise and for each step of the hare. The user is also allowed to define the sleep time of the hare in milliseconds. If the hare sleeps twice during a race, it sleeps the same amount of time. For each race, the program should provide the result who has won. In Java Please
Q: Using three iterations of the Bisection method to determine the zeros of the f(x) within the interva...
A: Here in this question we have asked to use bisection method to determine the zeros of function F(x)=...
Q: When using magnetic disks, certain databases only use sectors in the outer tracks, leaving sectors i...
A: The advantages of processing with exterior tracks include the following: The outside tracks of the d...
Q: Find the Big Oh Notation of the following
A: Defined the Big-Oh Notation of the given code
Q: any suggestions for undergraduate thesis title majoring in computer engineering? or interesting topi...
A: In the era of computer and AI technology there are so many different fields in Computer Engineering....
Q: People who work with computers and humans use a lot of different ways to measure how well they work ...
A: Answer Introduction: He addresses a vision articulated in his latest book Superminds a framework for...
Q: What are the advantages of studying and testing a model rather than a physical object or situation?
A: Solution: Model are useful tool in learning the science which can be used to improve explanation, ge...
Q: 14. Convert the following decimal number to negative binary number, using 2's complement in 8 bits а...
A: The decimal number changes into binary as well as 2s complement number system Here most significan...
Q: Considering the following tables,. is a foreign ke Student Table SID Name Expected Graduation 123 Sm...
A: To know which among these is the foreign key we have to understand first what is foreign key Foreig...
Q: c) The selection of DBMS software is critical to the information system’s smooth operation. Conseque...
A: DBMS is a software designed to store and manage , delete and maintain consistency, reduce redundancy...
Q: نقطة واحدة Press the key on your .10 keyboard to delete text to the left of the insertion point 1. D...
A: let's see the correct step by step solution
Q: How a communication chasm between users and designers can sabotage a project's success
A: Answer: I have given answered in the brief explanation
Q: Is common morality possible in cyber Security
A: Cyber security: The term cybersecurity explicitly conveys its main ethical goal, namely to create a ...
Q: What is a distributed denial of service attack, and how can it be carried out by a single individual...
A: DDoS (distributed denial of service) attack: Following the discovery of the limits of single-system ...
Q: Why not divide user research?
A: given - Why not divide the overall design into multiple user viewpoints when conducting user researc...
Q: What is the purpose of routing, and how does it work? Differentiate between two commonly used routin...
A: Your question is about routing which is given below :
Q: Exercise 2: Determine the roots of a quadratic equation, if a is not equal to zero and determinant i...
A: The answer is given below:-
Q: Variables
A: Given: What are Variables?
Q: • Define 3 variables: x, y, z as a float data type. Assign 4.0/3 to x, 98.543785 to y, and 1e3 to z....
A: 1) Since programming langauage was not specified, I ahve written program in C langauage 2) Below is ...
Q: How a communication chasm between users and designers can sabotage a project's success
A: Introduction: disgruntled employees' damage of employer property (such as equipment or supplies) or ...
Q: How is multifactor authentication implemented? How does it help to prevent password theft?
A: Password theft is one of the most common problems faced by the internet users in today's yime.
Q: Was there any impact on the Symbian, Android, and iPhone operating systems as a result of the file d...
A: How has the algorithm for file deletion impacted the Symbian, Android, and iPhone operating systems?...
Q: Consider the following narration: If gender equality is to be achieved then patriarchy must be d...
A:
Q: As a property developer in California, you want to determine the most profitable area for a new deve...
A:   Mar 11, 2019 Read time: 6 mins Share Property Development: The Process to Follow for Success Wh...
Q: C Language Write a c function called REVERSE that takes an array name X as an input parameter and a...
A: Here is your code with an output.
Q: What can be stated about the following first line of a user-defined function: function [x.y.z]=overl...
A: Given : First line of user defined function is : function[x,y,z]=overload(a,b) We need to choose the...
Q: Was it necessary to use many assessment methodologies in order to provide a more complete picture of...
A: Was it necessary to use many assessment methodologies in order to provide a more complete picture of...
Q: Attempt to explain non-systems analysis processes in structured English to see how it works.
A: All logic is expressed in sequential structures, decision structures, iterations, and case structure...
Q: A approach that has not been tried is ineffective. Recognize the many testing approaches that may be...
A: Introduction: Testing is necessary to identify any defects in software that could cause harm. Withou...
Q: Explain the steps clearly about one paragraph each , about optimization in tf.data API (purpose of ...
A: The tf.data API enables you to build complex input pipelines from simple, reusable pieces. tf.data a...
Q: What role does cryptology play in information security? What would be the implications if cryptograp...
A: The Cryptographic Technology (CT) Group's research on cryptographic mechanisms covers hash algorithm...
Q: Is it easier for you to identify someone using their fingerprints, speech intonation, face features ...
A: Answer: Everyone can choose based on the perspectives but I beleive Retinal scanning is going to rul...
Q: Compare and contrast pivot tables to multidimensional analyses.
A: The answer is
Q: QUESTION 2 Given the following ARM assembly program, What will be the value stored in register R2 by...
A: Answer is 0 (Zero)
Q: Suppose we have two arrays, a and b, containing numbers of size n and m, respectively. a and b array...
A: ALGORITHM:- 1. Declare and initialise 2 arrays with the corresponding values. 2. Find the common ele...
Q: Using C Language: Write a program that will input 20 values to array BSIT. Call the function EVEN t...
A: First, we will enter the 20 values and store them in array BSIT. Then we will call the function EVEN...
Q: Why not divide the overall design into multiple user viewpoints when conducting user research?
A: User research is an intensive task.
Q: table a - menu of oceanside burger and fries in vb.net programming
A: ALGORITHM:- 1. Print the menu as given in question statement. 2. Use writeline() method to write on ...
Q: Write a program to get a random number between 1 and 100, use the button to check whether the given ...
A: write a program to get random number between 1 and 100......
Q: If you're conducting user research, why not separate the overall design into multiple user viewpoint...
A: User reseаrсh is the methоdiс study оf tаrget users—inсluding their needs аnd раin роin...
Q: A machine cycle is a four-part closed-loop process. Explain why the machine cycle is so important. I...
A: Introduction: A machine cycle is a four-part closed-loop process. Explain why the machine cycle is ...
Q: ncludes 5 departments – marketing, engineering, customer support, information technology, and financ...
A: While the system software has device drivers, OS, servers, and software components, the software ass...
Q: What effect does hierarchy have on the growth of an organisation and administrative autonomy, and ho...
A: Hierаrсhy рrоvides effeсtive оrgаnisаtiоnWe аll knоw the sаying, ‘tоо mаny сооks sроil t...
Q: As CISO, you are in charge of developing an information security programme that is backed by a frame...
A: Introduction: In addition to safeguarding data against unwanted access, information security is also...
Q: Map the car sale ER schema into a relation schema. Specify all primary keys (underline) and foreign ...
A:
Q: If you're conducting user research, why not separate the overall design into multiple user viewpoint...
A: Introduction: If you're conducting user research, why not separate the overall design into multiple ...
Q: Give me an example of f formatted string in python. Take all the data from the user.
A: Required:- Give me an example of f formatted string in python. Take all the data from the user. Appr...
Q: There are certain differences in IT security implementation between traditional on-premises data cen...
A: Introduction: With on-premise software, everything is handled internally, from installation to opera...
Q: How does entity who performs recursive query knows which IP address to send a query
A: Given :- How does entity who performs recursive query knows which IP address to send a query?
Q: Smart PLDT 2. Cignal
A: funcitonality, It is used to store and process the logical and calculative information, Provide th...
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 7 images
- In C# language using Microsoft Visual Studio in Windows Forms App (.NET Framework) A slot machine is a gambling device that the user inserts money into and then pulls a lever (or presses a button). The slot machine then displays a set of random images. If two or more of the images match, the user wins an amount of money, which the slot machine dispenses back to the user. Design a program that simulates a slot machine. When the program runs, it should do the following: Ask the user to enter the amount of money he or she wants to insert into the slot machine. Create an application that simulates a slot machine. The application should let the user enter into a TextBox the amount of money he or she is inserting into the machine. When the user clicks the Spin button, the application should display three randomly selected symbols. (Slot machines traditionally display fruit symbols.JAVA Project 2-3 Rectangle Calculator Create an application that calculates the area and perimeter of a rectangle. Then using a loop, ask the user if they want to continue. If yes then repeat the input, processing, and output. If no then end the program. Console Welcome to the Area and Perimeter Calculator Enter length: 100 Enter width: 200 Area: 20000.0 Perimeter: 600.0 Continue? (y/n): y Specifications The formulas for calculating area and perimeter are: area = width * lengthperimeter = 2 * width + 2 * length The application should accept decimal entries like 10.5 and 20.65. Assume that the user will enter valid numeric data for the length and width. The application should continue only if the user enters “y” or “Y” to continue. Input: Print the header "Welcome to the Area and Perimeter Calculator" Ask the user to enter a length Ask the user to enter a width Processing: Save the length and width in variables Calculate the area and save the results in a variable…Tic-Tac-Toe For this question, you will be implementing a simple Tic-Tac-Toe game without the graphics. Here is how it works: • First, it is randomly determined if the user starts the game or the computer and this information is shown to the user. The player who starts always starts as "X". • The players (computer and the user) will then take turns in playing. The computer will choose a random empty spot on its turn. The user enters its choice in the console. • Each of the empty spots have a corresponding number that the players choose on their turn. If the user enters anything other than the number of an empty spot (not yet filled with "X" or "O"), it will not be accepted, and they will be prompted to enter a correct number. 2 4 7 8 • After each turn, two things need to be done: 1) displaying the updated board 2) checking if anyone has won (it should be printed who has won – the user or the computer). The game goes on until someone wins or until all the 9 empty spots are filled and no…
- Design the worst calculator ever: an application that accepts two numbers from the user and, when a button is pushed, performs a single operation and displays the results. You may choose: Multiplication, Division, Subtraction, square root, or raising the first number to the exponent of the second number. Don't use addition as we already did that in class. The result must be displayed to the user only when an appropriately labeled button is pushed.Theater Ticket System: A small ten-seat theater has contracted you to build software which will reserve tickets. The theater has two rows of five seats each. Each row is referred to by number (1 or 2) and each seat in the row is referred to by letter (A, B, C, D, and E). When started, the program should ask the user for the row they prefer (row selection). If that row has no empty seats then the program should ask the user if they prefer the other row, if no then display a message stating the next show is tomorrow. Upon selecting a row, the program should present the user with a choice of available seats in the row. The user can then either choose a seat and print the ticket (in this case a simple message will suffice) or return to row selection. If a ticket is printed the program should return to row selection. The program terminates when all seats are reserved. Please enter a row: 1 Available seats: A B C D E Which seat, enter Q for none?: B You have booked seat: 1B…Theater Ticket System: A small ten-seat theater has contracted you to build software which will reserve tickets. The theater has two rows of five seats each. Each row is referred to by number (1 or 2) and each seat in the row is referred to by letter (A, B, C, D, and E). When started, the program should ask the user for the row they prefer (row selection). If that row has no empty seats then the program should ask the user if they prefer the other row, if no then display a message stating the next show is tomorrow. Upon selecting a row, the program should present the user with a choice of available seats in the row. The user can then either choose a seat and print the ticket (in this case a simple message will suffice) or return to row selection. If a ticket is printed the program should return to row selection. The program terminates when all seats are reserved.
- Please provide answer in C#: Slot Machine Simulation A slot machine is a gambling device into which the user inserts money and then pulls a lever (or presses a button). The slot machine then displays a set of random images. If two or more of the images match, the user wins an amount of money that the slot machine dispenses back to the user. Create an application that simulates a slot machine. Figure 8-23 (on page 539 of your book) shows an example of how the form should look. The application should let the user enter into a TextBox the amount of money he or she is inserting into the machine. When the user clicks the Spin button, the application should display three randomly selected symbols. (Slot machines traditionally display fruit symbols. You will find a set of fruit symbols attached to this dropbox for your use - from the Student Sample Programs provided by the book author.) If none of the randomly displayed images match, the program should inform the user that he or she has won…Java ATM machine program ATM machines are used to withdraw and deposit cash in additionto make balance inquiries. The user enters a card in the ATM’s cardreader, then the ATM, and through its console screen, asks the userto enter the card 4 digit PIN number. If the PIN is verified by theBank (which keeps a list of bank accounts), the ATM will presentthe user with a menu of the available choices (Transactions),otherwise, invalid PIN message will be displayed, users can try toenter the PIN three times after which the card will be claimed bythe machine.If the user choses to withdraw, he will be presented with a menu ofa specific amounts or he can enter the amount, if the user balance issufficient and if the cash dispenser has the amount available, thecash amount will be dispensed from the cash dispenser.ATM Transactions 1. Withdraw2. Balance inquiryAt any time during a transaction, the user can choose tocancel and thus end the transactionATM States 1. Ready: waits the user to enter the…Slot Machine SimulationA slot machine is a gambling device that the user inserts money into and then pulls a lever (or presses a button). The slot machine then displays a set of random images. If two or more of the images match, the user wins an amount of money that the slot machine dispenses back to the user. Create a program that simulates a slot machine. When the program runs, it should do the following: Asks the user to enter the amount of money he or she wants to enter into the slot machine. Instead of displaying images, the program will randomly select a word from the following list: Cherries, Oranges, Plums, Bells, Melons, Bars To select a word, the program can generate a random number in the range of 0 through 5. If the number is 0, the selected word is Cherries; if the number is 1, the selected word is Oranges; and so forth. The program should randomly select a word from this list three times and display all three of the words. If none of the randomly selected words match, the…
- ne: ID: A 7. A game is played by moving a game piece left or right along a horizontal game board. The board consists of spaces of various colors, as shown. The circle represents the initial location of the game piece. Yellow Black Green Green Red Yellow Yellow Black Black Black The following algorithm indicates how the game is played. The game continues until the game is either won by landing on the red space or lost when the piece moves off either end of the board. Step 1: Place a game piece on a space that is not red and set a counter to 0. Step 2: If the game piece is on a yellow space, move the game piece 3 positions to the left and go to step 3. Otherwise, if the game piece is on a black space, move the game piece 1 position to the left and go to step 3. Otherwise, if the game piece is on a green space, move the game piece 2 positions to the right and go to step 3. Step 3: Increase the value of the counter by 1. Step 4: If game piece is on the red space or moved off the end of the…Hangman gameWrite a terminal based on the game of Hangman. In a hangman game, the player is given a wordthat they need to guess, with each letter of the word represented by an underscore/blank. Theplayer tries to guess a letter of the word by entering it into the terminal. If the letter is correct, theblank corresponding to that letter is filled in. If the letter is incorrect, a part of a stick figure isdrawn. The player has a limited number of incorrect guesses before the stick figure is fully drawnand the game is lost. The player wins the game if they guess all the letters of the word before thestick figure is fully drawn.The program should have an array of possible words to choose from. A different word should berandomly chosen from the array every time we run the program.Others: Do not use GOTO statementsHangman gameWrite a terminal based on the game of Hangman. In a hangman game, the player is given a wordthat they need to guess, with each letter of the word represented by an underscore/blank. Theplayer tries to guess a letter of the word by entering it into the terminal. If the letter is correct, theblank corresponding to that letter is filled in. If the letter is incorrect, a part of a stick figure isdrawn. The player has a limited number of incorrect guesses before the stick figure is fully drawnand the game is lost. The player wins the game if they guess all the letters of the word before thestick figure is fully drawn.The program should have an array of possible words to choose from. A different word should berandomly chosen from the array every time we run the program.Do not use GOTO statements