Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Programming. input edoc and candy by user: write program by java to give 3 advice: advice 1 : you can not evolve any edoc,

image text in transcribedJava Programming. input edoc and candy by user: write program by java to give 3 advice: advice 1 : you can not evolve any edoc, catch mre advice 2 : catch more edoc before evolve advice 3 evole now

CHAPTER 5/ Defining Classes and Methods 13. Do Programming Project 17 from Chapter 4, the Edoc calculator, except write a method that takes the number of candy, Edoc, and Margorp as input parameters and returns the amount of experience that can be earned. Modify your program to give advice to the player using the following rules e Catching an additional Edoc gives you three Edoc candy . If you can't get any experience points with the provided inputs then CHAPTER 4 Flow of Control: Loops and evolutions, with possibly a different final number of Edoc and rgorp, but the total number of experience points should be the same (the max possible): output "You can't evolve any Edoc, catch more." . If catching one or two additional Edoc will give you more experience Transfer 37 Edoc and 0 Margorp resulting in points compared to evolving right now then output "Catch more Edoc before evolving." Evolve 9 Edoc to get 4500 experience points and resulting in Transfer 0 Edoc and 9 Margorp resulting in Evolve 1 Edoc to get 500 experience points and resulting in Transfer 4 Edoc and 1 Margorp resulting in Evolve 1 Edoc to get 500 experience points and resulting in Total experience points 5500 108 candy, 16 Edoc, and 0 Margorp 9 candy, 7 Edoc, and 9 Margorp 18 candy, Edoc, and 0 Margorp 7 candy, 6 Edoc, and 1 Margorp 12 candy. 2 Edoc, and 0 Margorp 1 candy, 1 Edoc, and 1 Margorp . Otherwise output "You should evolve now 17 . You have an augmented reality game in which you catch Edoc and acquire Edoc candy. You need 12 candies to evolve an Edoc into a Margorp. An evolution earns you back one candy. Each evolution also eams you 500 experience points. An Edoc or Margorp can each be transferred for one Edoc candy. In support of the game's players, write an Edoc calcula program that inputs the number of Edoc you have caught and the number of Edoc candies in your possession. You can assume the initial number of Margorps is 0. The program should output the maximum number of experience points you can earn through transfers and evolutions. After Edocs evolve into Margorps, your program should consider if transferring the Margorps will result in enough candy to evolve even more Edoc. For example, if you start with 71 candies and 53 Edoc, the program could output the following. Note that there are many other sequences of transfers ows Media Player s CHAPTER 5/ Defining Classes and Methods 13. Do Programming Project 17 from Chapter 4, the Edoc calculator, except write a method that takes the number of candy, Edoc, and Margorp as input parameters and returns the amount of experience that can be earned. Modify your program to give advice to the player using the following rules e Catching an additional Edoc gives you three Edoc candy . If you can't get any experience points with the provided inputs then CHAPTER 4 Flow of Control: Loops and evolutions, with possibly a different final number of Edoc and rgorp, but the total number of experience points should be the same (the max possible): output "You can't evolve any Edoc, catch more." . If catching one or two additional Edoc will give you more experience Transfer 37 Edoc and 0 Margorp resulting in points compared to evolving right now then output "Catch more Edoc before evolving." Evolve 9 Edoc to get 4500 experience points and resulting in Transfer 0 Edoc and 9 Margorp resulting in Evolve 1 Edoc to get 500 experience points and resulting in Transfer 4 Edoc and 1 Margorp resulting in Evolve 1 Edoc to get 500 experience points and resulting in Total experience points 5500 108 candy, 16 Edoc, and 0 Margorp 9 candy, 7 Edoc, and 9 Margorp 18 candy, Edoc, and 0 Margorp 7 candy, 6 Edoc, and 1 Margorp 12 candy. 2 Edoc, and 0 Margorp 1 candy, 1 Edoc, and 1 Margorp . Otherwise output "You should evolve now 17 . You have an augmented reality game in which you catch Edoc and acquire Edoc candy. You need 12 candies to evolve an Edoc into a Margorp. An evolution earns you back one candy. Each evolution also eams you 500 experience points. An Edoc or Margorp can each be transferred for one Edoc candy. In support of the game's players, write an Edoc calcula program that inputs the number of Edoc you have caught and the number of Edoc candies in your possession. You can assume the initial number of Margorps is 0. The program should output the maximum number of experience points you can earn through transfers and evolutions. After Edocs evolve into Margorps, your program should consider if transferring the Margorps will result in enough candy to evolve even more Edoc. For example, if you start with 71 candies and 53 Edoc, the program could output the following. Note that there are many other sequences of transfers ows Media Player s

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

How Do I Use A Database Research Tools You Can Use

Authors: Laura La Bella

1st Edition

1622753763, 978-1622753765

More Books

Students also viewed these Databases questions

Question

What are the main sources of comparative advantage?

Answered: 1 week ago