Design a program that will allow a user to Input a list of your family members along with their age and state where they reside. Determine and print the average age of your family and print the names of anyone who lives in Texas.
For this part of the deliverable, there are 2 components of your submission including:
Program Description- A detailed, clear description of the program you are building.
Analysis- Demonstrates your thought process and steps used to analyze the problem. Be sure to include the required input and output and how you will obtain the required output from the given input? Also, include your variable names and definitions. Be sure to describe the necessary formulas and sample calculations that might be needed. Talk about the functions you plan to use and how you will use arrays. Be sure to talk about the types of programming statements that will be used on why.
Only pseudocode (C++ style) is required.
This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.Explanation of the used data structures and methodology
From design point of view, we can use one array for storing each of the following: Name, Age and State. Since we must build the structure for at most 50 family members, the length of each array can be set to 50.
Since the program uses repetition, we’ll use a repetitive structure. Besides this, we also need to use a counter that is incremented at each step, as long as it is introduced a new member of the family. We need the value of this counter when exiting the loop and when printing the names of the persons who live in Texas.
We also need to keep track of the sum of ages for the members from the same family (we need this for computing in the end the average age).
The first loop is used to count the number of members from family and to store the values in the three arrays. When the loop exits (the exit condition can be set in many ways by the user, like pressing ENTER or another key), both Sum_of_ages and Counter have two values that are distinct than 0 (the initial values).
The average age is computed by dividing the Sum_of_ages to the number of family members....
By purchasing this solution you'll be able to access the following files: