Question
INSTRUCTIONS FROM THE TEACHER: THE PROGRAM NEEDS TO BE IN JAVA LANGUAGE The format of the data input file for this project will be two
INSTRUCTIONS FROM THE TEACHER:
THE PROGRAM NEEDS TO BE IN JAVA LANGUAGE
The format of the data input file for this project will be two lists: a list of person names, one per line of the file, which is followed by a list of these person names and their family member names, also one entry per line. This second list will be in the order person, mother, then father. The list of original person names will be terminated in the file by a line containing the string, "END". After that list will come the person names, followed by those of the family member names, grouped as above and also terminated with "END".
While it is not explicitly specified in the project specification found in the text, the user query component of this project must be able to support as many queries from a user as the user wishes; each opportunity must be prompted, with the prompt including the sentinel for input when the user is ready to quit.
QUESTION FROM THE BOOK:
Write a family database program. Create a class to represent a person and to store references to the persons mother, father, and any children the person has. Read a file of names to initialize the name and parentchild relationships of each Person. (You might wish to create a file representing your own family tree.) Store the overall list of Persons as an ArrayList. Write an overall main user interface that asks for a name and prints the maternal and paternal family line for that person.
Heres a hypothetical execution of the program, using as an input file the line of English Tudor monarchs:
Person's name? Henry VIII Maternal line: Henry VIII Elizabeth of York Paternal line: Henry VIII Henry VII Children: Mary I Elizabeth I Edward VI
GIVEN FILE "tudor.dat"
Henry VII Arthur Catherine of Aragon Henry VIII Anne Boleyn Jane Seymour Mary I Elizabeth I Edward VI Margaret James IV James V Mary of Guise Mary, Queen of Scots Henry, Lord Darnley James VI & I Mary Charles Brandon Frances Henry Grey Lady Jane Grey Elizabeth of York Margaret Stuart END Arthur Elizabeth of York Henry VII Henry VIII Elizabeth of York Henry VII Margaret Elizabeth of York Henry VII Mary Elizabeth of York Henry VII Mary I Catherine of Aragon Henry VIII Elizabeth I Anne Boleyn Henry VIII Edward VI Jane Seymour Henry VIII James V Margaret James IV Mary, Queen of Scots Mary of Guise James V James VI & I Mary, Queen of Scots Henry, Lord Darnley Frances Mary Charles Brandon Lady Jane Grey Frances Henry Grey Henry, Lord Darnley Margaret Stuart unknown Margaret Stuart Margaret unknown END
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