title: C++ or Java Thread Input/Output Program - no idea where to start
body: <p>Hi I am trying to write a program in C++ or Java that uses threads.  I have no idea where to start.  It is for an operating systems class.  The class only teaches concepts and no actual coding whatsoever.  The professor just hands out this assignment and said that he will provide no help at all.  Thanks a lot for helping.</p>
  
  <p>Below is the program requirements:</p>
  
  <p>The goal of this assignment is to create a routine which creates multiple threads, has them do work in parallel, and terminates when the last thread has finished. </p>
  
  <p>The Scenario: 
  There are several groups of people in a bar watching the Olympics cheering for their country. Each group will cheer for their country some given number of times, with a random pause (between 2 and 5 seconds) between each cheer. There is enough room at the bar for up to ten different groups to sit (each would be cheering for a different country). </p>
  
  <p>The Program: 
  The task is to write a program that will simulate these cheers using threads. The program should be called cheer.X (X being the language of choice). You may use any language that supports threading. When the program is run it should ask for the number of countries and then the name and how many times it will be cheered for. The main function will then create a thread for each team and each thread is responsible for cheering the specified number of times for the correct team at the random interval. You will submit the proper source code file for me to open and compile myself, not an executable. </p>
  
  <p>An example cheer would be: “Go USA!” An example run would look something like this:
  How many countries are supported at the bar? 3
  Enter the first: China
  How many cheers? 2
  Enter the second: USA
  How many cheers? 4
  Enter the third: Russia
  How many cheers? 3</p>
  
  <p>Go USA!
  Go China!
  Go Russia!
  Go China!
  Go USA!
  Go Russia!
  Go USA!
  Go Russia!
  Go USA!
  (Remember there will be a pause, and consecutive runs with the same arguments will not create the same results)</p>