subject

This was a quiz that I submitted earlier in the semester but I had not received full points due to a coding mistake. Below, I will provide the instructions and the code that needs to be changed in order for the program to work. Any place that has a "// Student Code Here" or "// Test Your Methods Here" must be changed accordingly. INSTRUCTIONS:Step 1Fill in the doubleOrNothing method, which takes an int as a parameter. If the number is less than 100, return that number doubled. Otherwise, return zero. For example, passing 4 to this method would return 8, but passing 104 to this method would return 0.Step 2Fill in the formatPercentmethod, which takes a double as a parameter that represents a percent value between 0 and 1. This method returns a String that is the percentage between 0 and 100 percent, with one place following the decimal before a '%'.For example, passing the double '.85' would return the string "85.0%".Step 3Fill in the everyOtherChar method, which takes a String parameter called word*. This method returns an int which computes the sum of the ASCII values of *every other* character in the parameter word, starting with the first character. For example, passing the word "yam" into the method would tally the ASCII value of the characters 'y' and 'm', which have ASCII values of 121 and 109 respectively, so the method would return 230.Test Your MethodsTest your methods by calling them within main. You may run your program in Develop mode as many times as you would like, but you may only submit your program once. CODE:public class quiz1 { // Step 1 public static int doubleOrNothing(int num) {e // student code here } // Step 2 public static String formatPercent(double percent) { // student code here } // Step 3 public static int everyOtherChar(String word) { // student code here } public static void main(String [] args) { // test your methods here! }}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. what does it indicate when a website displays https instead of http? a. the website is secure. b. there is no secure sockets layer. c. the secure sockets layer is hidden. d. the website is not secure.
Answers: 1
question
Computers and Technology, 23.06.2019 15:10
What role did women fill during world war ii?
Answers: 1
question
Computers and Technology, 23.06.2019 16:00
What is the biggest difference between section breaks and regular page breaks? section breaks are more difficult to add than page breaks. section breaks make it easier for you to view the document as an outline. section breaks allow you to have areas of the document with different formatting. section breaks are smaller than regular page breaks.
Answers: 2
question
Computers and Technology, 24.06.2019 09:50
Self contained sequences of actions to be performed are? a. expressions b. algorithms c. functions d. formulas
Answers: 1
You know the right answer?
This was a quiz that I submitted earlier in the semester but I had not received full points due to a...
Questions
question
English, 05.07.2019 21:30
question
Mathematics, 05.07.2019 21:30
question
Mathematics, 05.07.2019 21:30
question
Mathematics, 05.07.2019 21:30
question
Mathematics, 05.07.2019 21:30
Questions on the website: 13722363