Introduccin a los multimedios - PowerPoint PPT Presentation

1 / 6
About This Presentation
Title:

Introduccin a los multimedios

Description:

... 18 to vote ( and please do it so for me) Yes/no, you can/can't ... Test (Assign input variables some 'Run Test' values) RUN TEST NO. 1. Start. B = 26/March/1977 ... – PowerPoint PPT presentation

Number of Views:43
Avg rating:3.0/5.0
Slides: 7
Provided by: ites2
Category:

less

Transcript and Presenter's Notes

Title: Introduccin a los multimedios


1
I. Definition
Given someones birth year print if he/she can
vote or not
2
II. Analysis
You need at least 18 to vote ( and please do it
so for me)
Give me your Birth Year
Yes/no, you can/cant vote
3
II. Analysis
  • Constants Min Age 18
  • Variables
  • IV1 Birth Year (By)
  • IV2 Current Year (Y)
  • TV (Temporary Variable) Age (A)
  • OV Sign stating if someone can vote or not (S)
  • Operators
  • OP1 Arithmetic, - (subtraction)
  • OP3 Relational, gt (greater than or equal)
  • Operations
  • A Y - By
  • A gt 18

4
III. Design Algorithm and/or Pseudo Code (You
can write either the Algorithm or Pseudo Code or
both)
  • Start
  • Type your Birth Year
  • Save it into input variable By
  • Type the Current Year
  • Save it into input variable Y
  • Subtract By from Y and save the result in the
    temporary variable A (AGE).
  • Compare A gt 18, if the result is true (yes) then
    the output variable S can, else (false/no) S
    cant
  • Print S
  • End

5
III. Design Flow Chart
END
1
6
IV. Test (Assign input variables some Run Test
values)
  • RUN TEST NO. 1
  • Start
  • B 26/March/1977
  • Y 2006
  • A 2006-YEAR(26/March/1977)
  • A 2006 1977
  • A 29
  • A gt 18?
  • True
  • 7. S can
  • 8. You can vote
  • 9. End
  • RUN TEST NO. 2
  • Start
  • B 4/Feb/1996
  • Y 2006
  • A 2006 1996
  • A 10
  • A gt 18?
  • False
  • S cant
  • You cant vote
  • End
Write a Comment
User Comments (0)
About PowerShow.com