Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

There are 4 components of your submission including: Program Description- A deta

ID: 3767098 • Letter: T

Question

There are 4 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.

Test plan - Prepare at least 3 sets of input data (Test data) along with their expected output for testing your program. Your test data can be presented in the form of a table as follows (note: feel free to adapt to your design)

Pseudocode- Provide pseudocode of your overall design that fulfills the requirements of the project

dditional details about the program you need to write:

Family sizes vary, however you should design to be able to enter at least 50 Family members.

Your test cases should have at least 5 family members.

Be sure to separate some functionality into functions or submodules. Having all functionality in the main module is not a good design.

Your design should consider how to indicate the family member entry is complete.

Carefully consider the best data type for each of your variables. (e.g. when to use Float versus Integers versus Strings)

Test Case #

Input

Expected Output

1

Fred, Age: 82, State: MD
Mary, Age:75, State: OH
Joe, Age: 45, State: TX
Julie, Age: 47, State: TX
Beth, Age: 9, State: TX

Average Age: 51.6
Members who live in TX:
Joe
Julie
Beth

2

Your input data

Your expected output

3

Your input data

Your expected output

Test Case #

Input

Expected Output

1

Fred, Age: 82, State: MD
Mary, Age:75, State: OH
Joe, Age: 45, State: TX
Julie, Age: 47, State: TX
Beth, Age: 9, State: TX

Average Age: 51.6
Members who live in TX:
Joe
Julie
Beth

2

Your input data

Your expected output

3

Your input data

Your expected output

Explanation / Answer

#include <stdio.h>
int getfamilyaverage ()
   {
       int familycounts;
       int familytotalage;
       int familyaverage;
           familyaverage = (familytotalage / familycounts);
           return familyaverage;
    }
   
    int main(void) {
   
       char membername[100][20];
       int memberage[100];
       char memberloc[100][20];
       int familycounts;
       int familytotalage;
       int i11;
       int showaverageage;
       char location;
          location= 'Texas';
              familytotalage = 0;
              printf("How many the family members are being entered? ");
       scanf("%d", familycounts);
   
   
       for (i11 = 0; i11< familycounts; i11++)
       {
           printf("Please Enter Family Members Name:");
           scanf("%s", membername[i11]);
           printf("%s ", membername[i11]);
   
           printf("Please Enter Family Members Age:");
           scanf("%d", memberage[i11]);
           printf("%d ", memberage[i11]);
           familytotalage= familytotalage+ memberage[i11];
   
           printf("Please Enter Family Members State:");
           scanf("%d", memberloc[i11]);
           printf("%s ", memberloc[i11]);
   
           if (strcmp(memberloc[i11], "Texas") == 0)
           {
                   printf("%s", membername[i11]);
                   printf(" lives in a Texas ");
           }
       }
   
   
       showaverageage = getfamilyaverage(memberage);
       printf("The family of average age is: %d", showaverageage);
    
       return 0;
    }