Cmis 102 Final Essays

628 Words May 12th, 2015 3 Pages
CMIS 102 Final Project

CMIS 102 6984
Rebecca Rowson
Due: March 29th 2015
Problem Definition:
We have been contracted to develop a program that will allow a user to put in the age and names of family members along with the state that they each reside. The program will then take the ages and find the average age of the family members and print the name of anyone who lives in Texas.
Problem Analysis:
Desired Output:
The desired output will be all input names that are from the state of Texas. As well as finding the Average age of the family members.
Required Input:
The user will be required to input the name of family members as well as the age of the family members and the state in which they reside.
…show more content…
Another loop will be started on the condition that the “count” > “numfamily” – 1. If “no” then it will state a selection based on the “state[count]” = “Texas”. If it is “Texas” it will display “familymembers[count] + “ lives in Texas””. Then count will be set as count + 1. This will continue to look until all family members have been checked to see if they live in Texas. End.

Program Comments and Test Data:
I found that once I understood and pictured exactly what I needed to do on this project I could lay it out neatly. The program itself works exactly like I was assigned and does everything the user needs. I have tested it many times and have gotten good results every time.
Test Data: Test 1 | John, Age 13, State: MarylandJess, Age 21, State: TexasPat, Age 30, State: HawaiiDan: Age 24, State: VirginiaSarah, Age 24, State: Virginia | Average age: 22.4Members who live in TX: Jess | Test 2 | 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 | Test 3 | Helen, Age, 50, State: MDPatrick, Age 55, State: TXJames, Age 15, State: TXJaime, Age 27, State: VAJack, Age 20, State: NJ | Average Age: 33.4Members who live in TX: Patrick James

Related Documents