subject
Computers and Technology, 13.07.2021 16:30 abby986

//debugging exercises, Chapter 9;Java programming, Joyce Farrall, 8th edition import java. util. Scanner;
public class DebugNine4
{
enum Planet {MERCURY, VENUS, EARTH, MARS, JUPITER, SATURN, URANUS, NEPTUNE};
public static void main(String[] args)
{
Planet planet;
String userEntry
int position;
int comparison;
Scanner input = new Scanner(System. in);
System. out. print("Enter a planet in our solar system >> ");
userEntry = input. nextLine().toUpperCas();
planet = Planet. valueOf(userEnttry);
System. out. println("You entered " + planet);
pos = planet. ordinal();
System. out. println(planet + " is " + position + 1 + " planet(s) from the sun");
}
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:20
What’s resistance in an electrical circuit ?
Answers: 1
question
Computers and Technology, 22.06.2019 19:20
Write a program that reads a file consisting of students’ test scores in the range 0–200. it should then determine the number of students having scores in each of the following ranges: 0–24, 25–49, 50–74, 75–99, 100–124, 125–149, 150–174, and 175–200. output the score ranges and the number of students. (run your program with the following input data: 76, 89, 150, 135, 200, 76, 12, 100, 150, 28, 178, 189, 167, 200, 175, 150, 87, 99, 129, 149, 176, 200, 87, 35, 157, 189.)
Answers: 3
question
Computers and Technology, 23.06.2019 12:00
If you're using an existing powerpoint presentation that will receive new slides based on a word outline, select the a. slide that will appear after the new slides. b. first slide in the presentation. c. slide that will appear before the new slides. d. last slide in the presentation.
Answers: 2
question
Computers and Technology, 23.06.2019 13:30
What is the primary difference between the header section of a document and the body? a. the body is displayed on the webpage and the header is not. b. the header is displayed on the webpage and the body is not. c. the tag for the body is self-closing, but the tags for the headers must be closed. d. the tag for the header is self closing, but the tag for the body must be closed.
Answers: 3
You know the right answer?
//debugging exercises, Chapter 9;Java programming, Joyce Farrall, 8th edition import java. util. Sc...
Questions
question
History, 19.10.2020 23:01
question
Mathematics, 19.10.2020 23:01
question
English, 19.10.2020 23:01
question
English, 19.10.2020 23:01
question
Social Studies, 19.10.2020 23:01
question
History, 19.10.2020 23:01
question
Mathematics, 19.10.2020 23:01
question
Chemistry, 19.10.2020 23:01