Method to handle an entire question

  1. Sent:
    1. Lower bound
    2. Upper bound
    3. operation
    4. random number generator
    5. Scanner
  2. Generate the first operand using the random number generator and lower and upper bounds
  3. Generate the second operand using the random number generator and the lower and upper bounds
  4. Compute the answer (based on the operatoin)
  5. Ask the user for their answer (using a previous method)
  6. If the user's answer is correct, return true
  7. else return false


This topic: CenterForComputing > WebHome > Syllabi > CSC121SylS2023 > CSC121S2023Lab07 > CSC121S2023Lab7H4
Topic revision: r1 - 2023-02-10 - cathybareiss
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback