CramX Logo
Design and Implementation of a Family Member Information Program with Age Calculation and Texas Resident Identification - Document preview page 1

Design and Implementation of a Family Member Information Program with Age Calculation and Texas Resident Identification - Page 1

Document preview content for Design and Implementation of a Family Member Information Program with Age Calculation and Texas Resident Identification

Design and Implementation of a Family Member Information Program with Age Calculation and Texas Resident Identification

Development of a program for family member record-keeping.

Michael Davis
Contributor
4.6
0
12 months ago
Preview (3 of 9 Pages)
100%
Log in to unlock
Page 1 of 3
Design and Implementation of a Family Member Information Program with Age Calculation and Texas Resident Identification - Page 1 preview imageDesign and Implementation of a Family Member Information Program with AgeCalculation and Texas Resident IdentificationQuestion:Analyze, design, and document a simple program that utilizes a good design process andincorporates sequential, selection and repetitive programming statements as well as at least onefunction call and the use of at least one array. The specific problem you need to solve for the finalproject is: Design a program that will allow a user to Input a list of your family members alongwith their age and state where they reside. Determine and print the average age of your familyand print the names of anyone who live in Texas.2. What is the required output? What is the necessary input? How you will obtain the requiredoutput from the given input? Clearly describe variable names and definitions. Include allnecessary formulas and example calculations.3. Display pseudocode of your overall design including the Main module and the order of themodule, subprogram and function calls.4. Create a Hierarchy chart for the overall program in raptor5. detailed pseudocode for each module, subprogram and function.6. Add pseudocode comments with all major functionality and most minor functionalitycommented7. Show test plan covering all major functionality and most minor functionality. Multiple Inputand expected output provided for most modules.SOLUTION:Analysis: For this program, user will be asked for name, age and state of their family members, oneby one, until the user decides to stop entering this information. Toachieve the given task (printingaverage family age and identifying residents of Texas), following modules need to be created:-Main module:This module will be the one running on program startup. It will be responsible toget user input and call appropriate modules to calculate and display average family age anddisplay family members those are residents of Texas-calcAverageAge module:This module will take family ages as input and countof familymembers as input and calculateand displayaverage family age.This module will be called fromwithin Main module.-printTexans module:This module will take family names as input and will printnames of thefamily members from Texas. This module will be called from main module.Program Design:2.Required outputs: Average family age, names of family members from Texas.Required inputs: Family member names, their ages andstate where they reside.
Page 2 of 3
Design and Implementation of a Family Member Information Program with Age Calculation and Texas Resident Identification - Page 2 preview image
Page 3 of 3
Design and Implementation of a Family Member Information Program with Age Calculation and Texas Resident Identification - Page 3 preview imageVariable Declartions and defintions: Following variables will be defined:String arrays_Namesto hold names.Integer arrayi_Ageto hold ages.String arrays_Stateto hold stateIntegeri_Countto hold number of family membersThe user entering the family names, ages and state of residence will be stored in the above describedarrays such that there will be one-to-one correspondence for the indices of s_Names, i_Age, s_Statearrays i.e. family member with name at indexnin s_Namesarray will have their age and state at indexnin arrayi_Age and s_Staterespectively.Calculations:Calculating average age:Average age = (sum of ages of all family members)/(Number of family members)Example calculation:Supposewe have i_Count = 3 and i_Age[0] = 12, i_Age[1] = 16, i_Age[2] = 20. Thenf_avAge = (i_Age[0] + i_Age[1] + i_Age[2])/i_Count = (12 + 16 + 20)/3 = 18Finding Texans:In the s_State array, look for indices those contain string “Texas” and printthe corresponding (at thoseindices)elements ins_Names.Example calculation:Suppose s_State[0] = “Texas”, s_State[2] = “Texas” and s_State[4] = “Texas”and the names array contain the following names:s_Names[0] = “Michael”,s_Names[1] =“Jones”,s_Names[2] = “Kathy”,s_Names[3] = “Knelly”,s_Names[4] = “Jason.Then program will printMichaelKathyJason
Preview Mode

This document has 9 pages. Sign in to access the full document!