importdistributors

Senior member
Sep 14, 2004
294
0
0

I got this assignment to do for java, I am stumped, im still a newb at java and was wondering if anyone had any hints as to how to take on this problem.

// IDS401, Spring 2007, Homework 2, Problem 2
// Chen Ye

import javax.swing.JOptionPane;

public class cye1_hw2p2 {
public static void main (String args[])
{
//List of UIC Classes
String[] UICClasses = {"ACTG110", "ACTG111", "ACTG315", "ACTG316", "MATH160", "MATH165",
"MATH180", "IDS200", "IDS270", "IDS312", "IDS331", "IDS355", "IDS371",
"IDS401", "IDS410", "IDS517"};
//Prerequisites for each UIC class
String[][] prerequisites = {
{}, // prerequisites for ACTG110
{"ACTG110"}, // prerequisites for ACTG111
{"ACTG111"}, // prerequisites for ACTG315
{"ACTG315"}, // prerequisites for ACTG316
{}, // prerequisites for MATH160
{}, // prerequisites for MATH165
{}, // prerequisites for MATH180
{}, // prerequisites for IDS200
{"IDS200", "MATH160", "MATH180"}, // prerequisites for IDS270
{"IDS200"}, // prerequisites for IDS312
{"IDS200"}, // prerequisites for IDS331
{"IDS200", "IDS270"}, // prerequisites for IDS355
{"IDS270", "MATH165"}, // prerequisites for IDS371
{"IDS201"}, // prerequisites for IDS401
{"IDS201"}, // prerequisites for IDS410
{"IDS401", "IDS410"} // prerequisites for IDS517
};

//Classes the student has taken
String[] studentClasses = {"ACTG110", "MATH180", "IDS200", "IDS201", "IDS270"};

//To Do: find out what classes the student can take and display the list to the user



}
}


Once I get the jist of things it should be easy, but I dont know what technique to use to have it check to see if the prerequisite is fullfilled or not without making it show classes the student already took.

CLIFFS: basically it is a program that is supposed to come up with a message of what classes can be taken for the student.
Thanks in advance.