CMIS Project Your project will be to analyze, design, and document a simple prog
ID: 3557539 • Letter: C
Question
CMIS Project
Your project will be to analyze, design, and document a simple program that utilizes a good design process and incorporates sequential, selection and repetitive programming statements as well as at least one function call and the use of at least one array. The specific problem you need to solve for the final project is:
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.
There are 4 components of your submission including:
Note: The Program Description and Analysis were most likely delivered last week. Please resubmit those with any modifications based on the grade and feedback from the professor.
As recommendation, you can try to use Eclipse or NetBeans environments that are used also for other courses as: Introduction in Java programming and Intermediate programming.
All of these components should be placed in word document for submission.
The C code have to be a document written with a text editor or Notepad++ (http://notepad-plus-plus.org/)
All of these components should be placed in word document for submission.
Additional details about the program you need to write:
Example application test data:
Test Case #
Input
Expected Output
1
Name:Fred, Age: 82, State: MD
Name:Mary, Age:75, State: OH
Name:Joe, Age: 45, State: TX
Name:Julie, Age: 47, State: TX
Name: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
In our example the user of your program have to enter as input values:
Fred 82 MD
Mary 75 OH
Joe 45 TX
Juie 47 TX
Beth 9 TX
Submission requirements:
Your completed assignment should be saved as Word document and submitted to your LEO assignment area no later than the due date listed in the syllabus. Your document should be neat, well-written with minimal grammatical and spelling errors. Your name should be clearly listed on the first page along with the class/section, professor and due date. Your document should contain page numbers at the bottom of each page. Single or double space line formatting is acceptable.
You should name the file yournamefp.docx (or your_name_fp.doc).
So if my name was Julie Smith, I would name my document Julie_Smith_fp.docx.
Similar for C code Julie_Smith_fp.c
Test Case #
Input
Expected Output
1
Name:Fred, Age: 82, State: MD
Name:Mary, Age:75, State: OH
Name:Joe, Age: 45, State: TX
Name:Julie, Age: 47, State: TX
Name: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
Analysis
For this program, user will be asked for name, age and state of their family members, one
by one, until the user decides to stop entering this information. To achieve the given task (printing
average 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 to
get user input and call appropriate modules to calculate and display average family age and
display family members those are residents of Texas
- calcAverageAge module: This module will take family ages as input and count of family
members as input and calculate and display average family age. This module will be called from
within Main module.
- printTexans module: This module will take family names as input and will print names of the
family 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 and state where they reside.
Variable Declartions and defintions: Following variables will be defined:
String array s_Names to hold names.
Integer array i_Age to hold ages.
String array s_State to hold state
Integer i_Count to hold number of family members
The user entering the family names, ages and state of residence will be stored in the above described
arrays such that there will be one-to-one correspondence for the indices of s_Names, i_Age, s_State
arrays i.e. family member with name at index n in s_Names array will have their age and state at index n
in array i_Age and s_State respectively.
Calculations:
Calculating average age:
Average age = (sum of ages of all family members)/(Number of family members)
Example calculation: Suppose we have i_Count = 3 and i_Age[0] = 12, i_Age[1] = 16, i_Age[2] = 20. Then
f_avAge = (i_Age[0] + i_Age[1] + i_Age[2])/i_Count = (12 + 16 + 20)/3 = 18
Finding Texans:
In the s_State array, look for indices those contain string