Final Project Part 2

Only available on StudyMode
  • Topic: Texas, Texan, Houston Texans
  • Pages : 3 (452 words )
  • Download(s) : 739
  • Published : February 17, 2013
Open Document
Text Preview
CMIS102 Final Project Part 2(Worth 20% of your grade)

Student Name: David Cline
Class/Section: CMIS 102 Section 7383
Professor Name: Tiffany Johnson
Assignment due date: 11/25/2012

1. Problem definition: 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. Note: Your problem analysis should have already been submitted as part 1 of the assignment. A. Program Design – Following the directions in the assignment, clearly write up your problem design in this section and comment your pseudocode.

Module Main()
Declare s_Names as String Array // Array to store names Declare s_Age as Int Array // Array to store ages Declare s_State as String Array // Array to store state of residence Declare i_Count as Int // Variable to hold count of total family members Declare f_avAvg as float // Variable to hold average family age Declare lc as Int // loop counter While (have more family members to enter) // loop to input family data Display “Enter Member Name:”

Input s_Names(lc) // Input name Display “Enter Member Age:”
Input s_Age(lc) // Input age Display “Enter state”
Input s_State(lc) // Input state Increment lc and i_Count
End while
calcAverageAge(s_Age, i_Count) // Call module to calculate and display average age call printTexans(s_Names, s_State, i_Count) // Print names of Texans End Main

Module calcAverageAge(s_Age, i_Count) // Module to calculate average family age Declare f_Avg as float...
tracking img