subject

Field Day For this one, you should investigate the compareTo() function of Strings.
What You Should Do
Filename: FieldDay. java
Your company has organized a morale event! They're hosting a picnic and field day in the park, and of course, they want to play games! Team games! Team building games!
To do that they want to assign all the people who show up to certain teams based on their last name - they've figured out the distribution break down - all they need YOU to do is to write the program that can sort them! (ie take a last name as input, output the team name!).
Here are the specs:
If a person's name falls before Baggins, then they are on the team "Red Dragons"
If it falls after Baggins, but before Dresden, they are on the team "Dark Wizards"
If it falls after Dresden, but before Howl, they are on the team "Moving Castles"
If it falls after Howl, but before Potter, they are on the team "Golden Snitches"
If it falls after Potter, but before Vimes, they are on the team "Night Guards"
If it falls after Vimes, they are on the team "Black Holes"
Should Output:
What’s your last name? Weasley
Aha! You’re on the team "Black Holes"!
Good luck in the games!

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 05:20, ashcormu11
Write a program called assignment3 (saved in a file assignment3.java) that computes the greatest common divisor of two given integers. one of the oldest numerical algorithms was described by the greek mathematician, euclid, in 300 b. c. it is a simple but very e↵ective algorithm that computes the greatest common divisor of two given integers. for instance, given integers 24 and 18, the greatest common divisor is 6, because 6 is the largest integer that divides evenly into both 24 and 18. we will denote the greatest common divisor of x and y as gcd(x, y). the algorithm is based on the clever idea that the gcd(x, y) = gcd(x ! y, y) if x > = y and gcd(x, y) = gcd(x, y ! x) if x < y. the algorithm consists of a series of steps (loop iterations) where the “larger” integer is replaced by the di↵erence of the larger and smaller integer. this continues until the two values are equal. that is then the gcd.
Answers: 3
image
Computers and Technology, 23.06.2019 09:20, lovely222
How to print: number is equal to: 1 and it is odd number number is equal to: 2 and it is even number number is equal to: 3 and it is odd number number is equal to: 4 and it is even number in the console using java using 1 if statement, 1 while loop, 1 else loop also using % to check odds and evens
Answers: 3
image
Computers and Technology, 23.06.2019 13:30, gamingisfun
Me ! evelyn is a manager in a retail unit. she wants to prepare a report on the projected profit for the next year. which function can she use? a. pmt b. round c. division d. what-if analysis
Answers: 2
image
Computers and Technology, 23.06.2019 21:00, kkpsmith
Alcohol’s affects on the cornea and lens of the eye make it more difficult
Answers: 1
You know the right answer?
Field Day For this one, you should investigate the compareTo() function of Strings.
What You...

Questions in other subjects:

Konu
Mathematics, 01.09.2021 14:00
Konu
Mathematics, 01.09.2021 14:00
Konu
Chemistry, 01.09.2021 14:00
Konu
Mathematics, 01.09.2021 14:00