Cmis 102 Project Design

Submitted by: Submitted by

Views: 457

Words: 523

Pages: 3

Category: Science and Technology

Date Submitted: 05/08/2014 03:21 PM

Report This Essay

Project Plan

1. Problem Statement:

The final project is 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 I 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 live in Texas.

2. Analysis:

a. Input :

Family member names, their ages, and state in which they reside

b. Output:

Average family age and names of family members from Texas

c. Describe the process of deriving output from input:

The user entering the family names, ages and state of residence will be stored in the 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.

d. Describe any necessary variables, formulas, and sample calculations that might be needed.

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 “Texas” and print the corresponding (at those indices) elements in s_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] = “Anthony”, s_Names[1] = “Noah”, s_Names[2] = “Julie”, s_Names[3] =...