Tags:
create new tag
view all tags

Program design

  • Necessary code and banner comment
  • class
    • declare constants
    • main method
      • declare variables
      • initialize all variables including first valid input
      • ending condition
        • count the appropriate color
        • get next valid input
      • output results

More help for individual parts (scroll down to find them)

































  • variables. You need one for each color.
  • initialization. All counters must each be set to zero.
  • computing percentage. You need to count the total number of values inputted.
  • getting valid input. Similar code has been written in class. Refer to that code!
Topic revision: r1 - 2022-12-29 - 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