We are surrounded by Computation! This program was written to solve my need to randomly select student answers for the Daily Question. The basic idea is to prepare two lists -- one with the AM student names and one with the PM student names. Then randomly select a batch of students on each day, so all students can participate in getting a Daily Question right.
This is to be done THREE times, based on the number of exams. For exam #1, there are SIX days for selection. For exam #2, there are EIGHT days. For exam #3, there are TEN.
The problem requirement defines my input:
Heineman, George T CS Auburn, Christopher J ECEThe first student is a CS major; the second an ECE
The output is:
Given the description above, there are a set of tasks that must be accomplished.
10
Heineman, George T CS
Auburn, Christopher J ECE
Clinton, William J PS
Bush, George Herbert WalkPS
Pinkett Smith, Jada IE
... |
We will be using a String array (presented in class on
Oct-31) to store all student names
The task decomposition naturally produces a design that we will use
package heineman.cs2102; import java.util.Scanner; // to be discusses Oct-30 public class GenerateBatches { /** Main routine. */
// INPUT: Load up the student names into an array } |
See the Advanced section of the code examples for the final source...