Program design

29 Dec 2022 - 12:20 | Version 1 |
  • 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!
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback
This website is using cookies. More info. That's Fine