This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Lab 6 Team 2 Algorithm Variables: Parent Data (Stream Reader) Count (Integer) Parent's Gender (Char) Child's Gender (Char) Total Number of Parents (Integer) Number of Mothers (Integer) Number of Fathers (Integer) Number of Boys (Integer) Number of Girls (Integer) Calculations: Read from File: System.IO.StreamWriter ("Parentdata.text", True) Do While not at end of file For Count = 0 to 1 Read a Line Next Child's Gender = Read a Line If Child Gender = "B" Then Number of Boys = Number of Boys + 1 Else Child Gender = "G" Number of Girls = Number of Girls + 1 End If For Count = 0 to 2 Read a Line Next Parent's Gender = Read a Line If Parent's Gender = "M" Then Number of Mothers = Number of Mothers + 1 Else Parent's Gender = "F" Number of Fathers = Number of Fathers + 1 End If For Count = 0 to 2 Read a Line Next Loop Total Number of Parents = Number of Mothers + Number of Fathers Close File ...
View Full Document
- Spring '07