1 / 6

I. Definition

I. Definition. Given one GPA print if the student passes or fails the Multimedia course in ITESM CEM. II. Analysis. O boy, I failed the course!. You need at least 70 to pass. Give me your GPA. Yes, I passed the course!. II. Analysis. Constants: IC : Minimum GPA to pass. ( MGPA = 70)

kateb
Download Presentation

I. Definition

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. I. Definition Given one GPA print if the student passes or fails the Multimedia course in ITESM CEM

  2. II. Analysis O boy, I failed the course! You need at least 70 to pass. Give me your GPA Yes, I passed the course!

  3. II. Analysis • Constants: • IC: Minimum GPA to pass. (MGPA = 70) • Variables: • IV: GPA (GPA) • OV: Sign (text) stating if someone passes or fails (S) • Operators: • OP1: Relational, “>=” (greater than or equal) • Operations: GPA >= MGPA

  4. III. Design: Algorithm and/or Pseudo Code (You can write either the Algorithm or Pseudo Code or both) • Start • Type the GPA • Save GPA into input variable GPA • Save 70 into input constantMGPA as the minimum grade to pass at ITESM. • Compare GPA >= MGPA, if the result is true (yes) then the output variable S = “Pass”, else (false/no) S = “Fail” • Print S • End

  5. 1 START True False “Type GPA” S = “failed” S = “passed” GPA = “Number typed” MGPA = 70 “You” S “the Multimedia course” GPA >= MGPA III. Design: Flow Chart END 1

  6. IV. TestAssign input variables some “Run Test” values Hint: Remember to put between “” every Alphanumeric value • RUN TEST NO. 1 • Start • GPA = 70 • MGPA = 70 • ¿GPA >= MGPA? • True • S = “passed” • “You passed the Multimedia course” • End • RUN TEST NO. 2 • Start • GPA = 68 • MGPA = 70 • ¿GPA >= MGPA? • False • S = “failed” • “You failed the Multimedia course” • End

More Related