Question: 5. (10 Points) Loops and Arrays a. Ask the user how many names they want to enter. b. If the user enters a value that

 5. (10 Points) Loops and Arrays a. Ask the user how

5. (10 Points) Loops and Arrays a. Ask the user how many names they want to enter. b. If the user enters a value that is less than 3, then print a message that says "You need to enter at least three" and do not do the reminder of steps in this program. c. If the user enters a value that is at least 3, then create an array of Strings called allTheNames that is the size the user entered d. Using either a for loop or while loop (your choice) ask the user to enter names until and fill the array allTheNames. e. After the loop is is over, print the third to last name in the string. hint: figure out the index of the third to last element and then print out that. f. So, if the user enters the name "Alice, Bob, Carl, Dave" you would print "Bob" Advanced: 20 Points Reminder, like all sections, partial credit will be given for this section. Franz Naegele was a 19th century obstetrician who realized that, the gestation period for a human is approximately 280. Specifically, children are typically born 280 days after a woman's last menstrual period (LMP). Write a program that asks for the month, date, and year of a patient's LMP, it will calculates a child's birthdate based. a. You don't need to worry about leap years, but it should wrap between years. b. If the user entered Month: 1, Date 1, Year: 2009 it would print out 10/08/2009. c. Or if you entered Month: 12, Date 31, Year: 2008 it would print out 10/07/2009. (You should ask for user input in numbers but you can print out in English you like.) Hint: Days in each month JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC 31 28 31 30 31 30 31 31 30 31 30 31

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!