Dragon Trainers With Methods Intro – LabFor this lab you will be writing a few methods that will help you with the upcoming Dragon Trainers Tournament project. The rules of the game Dragon Trainers are simple: each player has three dragons that they have trained, and each dragon is tied to a particular element. Each player has a Fire Dragon, a Water Dragon and a Plant Dragon. Each player picks one dragon to put out in front of them to fight the other player’s dragon. Both players choose separately without knowing what the other player has selected. Fire Dragons always beat Plant Dragons, Plant Dragons always beat Water Dragons, and Water Dragons always beat Fire Dragons. If both players choose the same kind of dragon, they tie.The entire game will be the subject of the next project – for this lab you will write two methods that will be used in the upcoming project:The first method you will need to write is getNumberOfMatches. This method takes one parameter – a Scanner. You can see by how it is used in the main method that we will be passing the Scanner object we create in the main method to this method to use. Remember – your program should only ever create ONE Scanner object connected to the keyboard, and parameter passing is the only way to accomplish this.The getNumberOfMatches method will display the prompt “How many matches shall we play? and read the user’s input. If the user enters a number less than or equal to 0, the method will display the error messageERROR – number of matches must be positive!and continue prompting until the user enters a value that is at least 1. The value the user enters is then returned to the calling method.Once you get this method working (making sure you run it and can see the DEBUG messages in the main program showing you that it is running), you will need to write the second method for this lab promptForDragon. This method also takes a Scanner as a parameter and displays a prompt for the user to respond to. This prompt is Please select a dragon [Plant/Water/Fire]: and allows the user to enter any value EXCEPT a blank line. If the user enters a blank line the method should produce the error messageERROR – Dragon prompt cannot be empty” and continue prompting until the user enters a non-blank value.NOTE If your promptForDragon method keeps giving you a blank value in the DEBUG messages – or skips the first value you type – it is probably actually a problem with how you have written getNumberOfMatches. MAKE SURE YOUR getNumberOfMatches METHOD READS AN ENTIRE LINE FROM THE SCANNER EACH TIME IT READS FROM THE SCANNER! If you are using nextInt() in your method it will NOT read to the end of the line – only to the end of the integer value. Review the earlier lectures on using nextInt() vs. nextLine()to see how to correct this issue in the getNumberOfMatches method!Once you have finished these methods and have submitted the lab, start the project and copy the bodies of your two working methods into the project. Then review the project requirements and start on the remaining methods.NOTE You MUST only declare and instantiation on single Scanner object to be able to run the test cases. And this must be done outside of the main game loop and in the main method. Your methods should NOT create another Scanner object but instead should use the one passed in as a parameter. Note that this is also typically how Scanner objects get used – you create them once and then use the same Scanner object for your entire program.Note that this “skeleton” of code in the template includes a main method that has already been written for you. Read the main method and make sure you understand what it is doing and how it is calling the other methods in the program. Comments are included to help you understand what each piece of the code is supposed to be accomplishing. DO NOT CHANGE THE CODE IN THE MAIN METHOD TO GET YOUR SOLUTION TO WORK! Full credit for the assignment will only be earned if you can get the code to work without changing the main method provided.Here is one example of the main method below in action. Note that as always, user inputs are in BOLD:Note that if the user enters a non-positive value for the number of matches, the program should reject it and make them enter a positive value, and if the user enters a blank line for the dragon the program should reject it and make them enter some non-empty value:You MUST use the skeleton for your code. Your solution must include the implementation and use of all of the methods defined in this skeleton – think about what each method does and how it relates to the program overall. You MUST NOT make any changes to the mainmethod – violating any of these requirements will cause a deduction in the points earned. Remember – a goal for this assignment is to practice writing methods that conform to a particular specification! The test cases for this program are written to let you test the individual methods as well as the final output. Test incrementally! Write one method at a time and then test it rather than waiting until you’ve written the whole program and testing it all at once! Taking an incremental approach will help you keep the whole assignment manageable by tackling it in pieces. Note also that you can complete the methods in any order.

Get Professional Assignment Help Cheaply

Are you busy and do not have time to handle your assignment? Are you scared that your paper will not make the grade? Do you have responsibilities that may hinder you from turning in your assignment on time? Are you tired and can barely handle your assignment? Are your grades inconsistent?

Whichever your reason may is, it is valid! You can get professional academic help from our service at affordable rates. We have a team of professional academic writers who can handle all your assignments.

Our essay writers are graduates with diplomas, bachelor’s, masters, Ph.D., and doctorate degrees in various subjects. The minimum requirement to be an essay writer with our essay writing service is to have a college diploma. When assigning your order, we match the paper subject with the area of specialization of the writer.

Why Choose Our Academic Writing Service?

 

Plagiarism free papers
Timely delivery
Any deadline
Skilled, Experienced Native English Writers
Subject-relevant academic writer
Adherence to paper instructions
Ability to tackle bulk assignments
Reasonable prices
24/7 Customer Support
Get superb grades consistently

How It Works

1.      Place an order

You fill all the paper instructions in the order form. Make sure you include all the helpful materials so that our academic writers can deliver the perfect paper. It will also help to eliminate unnecessary revisions.

2.      Pay for the order

Proceed to pay for the paper so that it can be assigned to one of our expert academic writers. The paper subject is matched with the writer’s area of specialization.

3.      Track the progress

You communicate with the writer and know about the progress of the paper. The client can ask the writer for drafts of the paper. The client can upload extra material and include additional instructions from the lecturer. Receive a paper.

4.      Download the paper

The paper is sent to your email and uploaded to your personal account. You also get a plagiarism report attached to your paper.

Get Professional Assignment Help Cheaply
Are you busy and do not have time to handle your assignment? Are you scared that your paper will not make the grade? Do you have responsibilities that may hinder you from turning in your assignment on time? Are you tired and can barely handle your assignment? Are your grades inconsistent?
Whichever your reason may is, it is valid! You can get professional academic help from our service at affordable rates. We have a team of professional academic writers who can handle all your assignments.
Our essay writers are graduates with diplomas, bachelor’s, masters, Ph.D., and doctorate degrees in various subjects. The minimum requirement to be an essay writer with our essay writing service is to have a college diploma. When assigning your order, we match the paper subject with the area of specialization of the writer.
Why Choose Our Academic Writing Service?

Plagiarism free papers
Timely delivery
Any deadline
Skilled, Experienced Native English Writers
Subject-relevant academic writer
Adherence to paper instructions
Ability to tackle bulk assignments
Reasonable prices
24/7 Customer Support
Get superb grades consistently

How It Works
1.      Place an order
You fill all the paper instructions in the order form. Make sure you include all the helpful materials so that our academic writers can deliver the perfect paper. It will also help to eliminate unnecessary revisions.
2.      Pay for the order
Proceed to pay for the paper so that it can be assigned to one of our expert academic writers. The paper subject is matched with the writer’s area of specialization.
3.      Track the progress
You communicate with the writer and know about the progress of the paper. The client can ask the writer for drafts of the paper. The client can upload extra material and include additional instructions from the lecturer. Receive a paper.
4.      Download the paper
The paper is sent to your email and uploaded to your personal account. You also get a plagiarism report attached to your paper.

 

PLACE THIS ORDER OR A SIMILAR ORDER WITH Essay fount TODAY AND GET AN AMAZING DISCOUNT

The post dragon trainers tournament project appeared first on Essay fount.


What Students Are Saying About Us

.......... Customer ID: 12*** | Rating: ⭐⭐⭐⭐⭐
"Honestly, I was afraid to send my paper to you, but you proved you are a trustworthy service. My essay was done in less than a day, and I received a brilliant piece. I didn’t even believe it was my essay at first 🙂 Great job, thank you!"

.......... Customer ID: 11***| Rating: ⭐⭐⭐⭐⭐
"This company is the best there is. They saved me so many times, I cannot even keep count. Now I recommend it to all my friends, and none of them have complained about it. The writers here are excellent."


"Order a custom Paper on Similar Assignment at essayfount.com! No Plagiarism! Enjoy 20% Discount!"