Software Development Report 1 Joe Bloggs 1. Problem description Ask the user to enter his/her name and age, then printout the following: Hello <the user’s name> you are a <MSG>. <MSG> is: child for age 0-12 teenager for age 13-19 student for age 20-24 postgraduate for age 25-29 working person for age 30-65 pensioner for age 66 – 120 2. Inputs and Outputs Inputs Age Name Outputs Message 3. Flow chat Start age name F F F F F age<=65 age<=120 T age<=29 T age<=19 T age<=24 T age<=12 T T child teenager child student child postgrad child Working person pensioner child F End 1 Software Development Report 1 Joe Bloggs 4. OTC and Properties table OTC Form 1 Active Object cmdSubmit cmdExit Object type Command button Command button Event Click Task Display the users name and a message in miles Terminate program Properties Table Form 1 Object Form Submit Command Button Exit Command Button Label1 Label2 Label3 TextBox1 TextBox2 Property Name Caption Name Caption Font TabIndex Name Caption Font TabIndex Name Caption BackStyle Name Caption BackStyle Name Caption BackStyle Font Alignment Name Caption Name Caption Property Setting FrmGreeting Greeting CmdSubmit Submit MS Sans Serif Bold 12pt 1 CmdExit Exit MS Sans Serif Bold 12pt 1 LblName Enter your name Transparent LblAge Enter your age Transparent LblMessage Transparent MS Sans Serif Bold 14pt Center TxtName "" TxtAge "" 5. Graphical User Interface GUI Place a screen capture of your GUI in here. 2 Description Identifies the form Identifies the command button Text that appears on the button Font of Caption text Tab order number Identifies the command button Text that appears on the button Font of Caption text Tab order number Identifies the label control Text that appears on the label Label is see through Identifies the label control Text that appears on the label Label is see through Identifies the label control Text that appears on the label Label is see through Font of Caption text Caption text is centred Identifies the text control Text that appears in the text box Identifies the text control Text that appears in the text box Software Development Report 1 Joe Bloggs 6. Code Private Sub cmdSubmit_Click() ' declare variables Dim strName As String Dim strAge As String Dim strResult As String Dim intAge As Integer ' get the name from the GUI strName = txtName.Text ' get the age from the GUI strAge = txtAge.Text ' turn the age into a number intAge = Val(strAge) ' determine what to print If intAge > 0 And intAge < 12 Then strResult = "child" ElseIf intAge <= 19 Then strResult = "teenager" ElseIf intAge <= 24 Then strResult = "student" ElseIf intAge <= 29 Then strResult = "postgraduate" ElseIf intAge <= 66 Then strResult = "working person" ElseIf intAge <= 120 Then strResult = "pensioner" Else strResult = "phenomenon" End If ' print lblMessage.Caption = "Hello " & strName & " you are a " & strResult End Sub 7. Testing Fill in the table of with your testing procedure. Test case Inputs Expected output TC1 Tom 0 Hello Tom you are a child TC2 John 13 Hello John you are a teenager TC3 Mary 24 Hello Mary you are a student TC4 James 30 Hello James you are a working person TC5 Sara 100 Hello Sara you are a pensioner 3 Actual output Hello Tom you are a child Hello John you are a teenager Hello Mary you are a student Hello James you are a working person Hello Sara you are a pensioner Software Development Report 1 Joe Bloggs 8. Learning Report 1. Write short outlines for each the following questions: 2. What was the trickiest part of the given task? What have you done to solve the problem? 3. What was the easiest part of the task? 4. What would you do differently if you are to start working on this task again? 5. What resources did you use? E.g. internet – then specify the URL for the page, book – provide the title and authors. 6. How long did it take you to complete the task? 7. What was the most time consuming part of this report? 4