Answered step by step
Verified Expert Solution
Question
1 Approved Answer
What you are to do: Write a program that fulfils all of the requirements as specified: Description of the REQUIREMENT we are to program: Program
What you are to do: Write a program that fulfils all of the requirements as specified: Description of the REQUIREMENT we are to program: Program starts running. User is invited to play a game - If user says YES, the game starts. User is told: You guess a number between 1 and 100. Coming with the Winning Algorithm is one of your Requirements. Output the result. [future update: Version 2 Update: Maintain a betting pool: in future weeks, we will implement this with more complex data structures!) Step 1: Let's start by implementing our UML Diagram DONE: We now have the scaffolding of our Application Step 2: Lets implement our ALGORITHM for our Game: // in programming land: we refer to Stories as "requirements" // R001: A player walks into a casino and wants to play a game // we need to create a Player and we need to create a GAME Player p1 = new Player(); Game g1 = new Game(); // we must design the algorithm for how the player interacts with the GAME: Here is the Way a Game is going to go: (We are now designing the Algorithm: we are thinking through the various possibilities and imagining how we want our Story to be told in CODE) The Number must be (1 to 100) We know that each of these things is going to be done in METHODS Computer Guesses a number Player guesses a Number: How are we going to decide the Winner If the player is within 10 of the computer's number: Player WINS Else Computer WINS Step 3: Now that we have put together several methods and several classes: we have to assemble our Method Choreography: (UML: Object Interaction Diagram)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started