Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Code in JAVA do NOT use continue/break or while(true) Use Arrays not ArrayList Write a program named Siblings that stores and retrieves the names of
Code in JAVA
Write a program named Siblings that stores and retrieves the names of siblings in a family. Initialize parallel arrays with the following information i.e. hardcore the data upon initialization): Family Potter Weasley Granger Dumbledore Black Patil Creevey Siblings Harry Bill, Charlie, Percy, Fred, George, Ron, Ginny Hermione Albus, Aberforth, Arianna Sirius, Regulus Padma, Pavarti Colin, Dennis a) Prompt the user to enter a family name and display the corresponding list of siblings Inform the user if their input does not exist in the list. Sample output: System: User: System: Enter a family name: Black Sirius Regulus b) Prompt the user forn and display the nth born child of the family, if applicable. Assume that each sibling is listed in descending order of age. Sample output 1: Enter n (1-7): System: User: System: Child #1: Potter family: Harry Weasley family: Bill Granger family: Hermione Dumbledore family: Albus Black family: Sirius Patil family: Padima Creevey family: Colin Sample output 2: Enter n (1-7): System: User: System: Child #3 Weasley family: Percy Dumbledore family: Arianna do NOT use continue/break or while(true)
Use Arrays not ArrayList
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started