Question: //DRIVER public class Driver { // Build the objects needed to represent the registration process Catalog catalog = new Catalog(); Term term = new Term();
//DRIVER
public class Driver {
// Build the objects needed to represent the registration process
Catalog catalog = new Catalog();
Term term = new Term(""); // change to the current term
Faculty faculty = new Faculty();
// Populate these objects
createInstructors(faculty); // Send the faculty object to method for instructor population
createCourses(catalog); // Send the catalog object to method for course population
}
private static void createInstructors(Faculty faculty) {
faculty.addInstructor(new Instructor(101, "Johnson"));
faculty.addInstructor(new Instructor(102, "Kay"));
faculty.addInstructor(new Instructor(103, "Xu"));
faculty.addInstructor(new Instructor(104, "Mulligan"));
faculty.addInstructor(new Instructor(105, "Muldoon"));
faculty.addInstructor(new Instructor(106, "Stanzione"));
faculty.addInstructor(new Instructor(107, "Brady"));
faculty.addInstructor(new Instructor(108, "Sawyer"));
faculty.addInstructor(new Instructor(109, "Brown"));
faculty.addInstructor(new Instructor(110, "Harrison"));
faculty.addInstructor(new Instructor(111, "Ford"));
faculty.addInstructor(new Instructor(112, "Danzinger"));
faculty.addInstructor(new Instructor(113, "Clarke"));
faculty.addInstructor(new Instructor(114, "Abraham"));
faculty.addInstructor(new Instructor(115, "Perkowski"));
faculty.addInstructor(new Instructor(116, "Brando"));
}
private static void createCourses(Catalog catalog) {
catalog.addCourse(new Course("ART 01.101", "Art Appreciation", Department.Art));
catalog.addCourse(new Course("ART 01.201", "Painting with Oils", Department.Art));
catalog.addCourse(new Course("ART 01.202", "Painting with Water Colors", Department.Art));
catalog.addCourse(new Course("BIOL 01.110", "Genetics", Department.Biology));
catalog.addCourse(new Course("BIOL 04.301", "Anatomy and Physiology", Department.Biology));
catalog.addCourse(new Course("CHEM 01.101", "Introduction to Chemistry", Department.Chemistry));
catalog.addCourse(new Course("CHEM 01.201", "Organic Chemistry", Department.Chemistry));
catalog.addCourse(new Course("CHEM 01.301", "Analytical Chemistry", Department.Chemistry));
catalog.addCourse(new Course("CSC 04.114", "Object Oriented Programming", Department.Computer_Science));
catalog.addCourse(new Course("CSC 04.301", "Human Computer Interaction", Department.Computer_Science));
catalog.addCourse(new Course("CSC 07.211", "Artificial Intelligence", Department.Computer_Science));
catalog.addCourse(new Course("CSC 04.370", "Software Engineering", Department.Computer_Science));
catalog.addCourse(new Course("CSC 04.210", "Data Structures and Algorithms", Department.Computer_Science));
catalog.addCourse(new Course("ECON 01.101", "Microeconomics", Department.Economics));
catalog.addCourse(new Course("HIS 01.101", "Western Civilization", Department.History));
catalog.addCourse(new Course("HIS 01.331", "Civil Wars", Department.History));
catalog.addCourse(new Course("MUS 01.214", "The Genres of Rock Music", Department.Music));
catalog.addCourse(new Course("PHIL 01.111", "Ethics", Department.Philosophy));
catalog.addCourse(new Course("PHIL 01.221", "Existentialism", Department.Philosophy));
catalog.addCourse(new Course("PHY 02.121", "Introduction to Mechanics", Department.Physics));
catalog.addCourse(new Course("PSY 04.114", "Abnormal Psychology", Department.Psychology));
}
}
WITH THE HELP OF ABOVE GIVEN DRIVER CREATE FOLLOWING CLASSES a. Faculty: Basically an ArrayList of Instructors. Please create a method addInstructor() to add an Instructor instance to the ArrayList.
b. Catalog: Basically an ArrayList of Courses. Please create a method addCourse() to add a Course instance to the ArrayList.
c. Course: A course should contain the following instance variables: i. courseNumber (String), ii. title (String), iii. department (Department)
d. Section: A section should contain the following instance variables: i. crn (Integer), < CRNs should be automatically generated, starting at 40001. > ii. course (Course), iii. instructor (Instructor) Sections might have Timeslots. A Timeslot should have the following instance variables: i. weekday (java.time.DayOfWeek), ii. startTime (java.time.LocalTime), iii. endTime (java.time.LocalTime)
f. There are three kinds of Sections: i. Traditional: Traditional sections have a list of TimeSlots (in our case, two). ii. Hybrid: Hybrid sections meet once a week (the other meeting is online) and have a single Timeslot. iii. Online: Online sections have no Timeslot
g. Term: Basically an ArrayList of Sections plus a String field for the actual term, e.g. Fall 2017. Please create a method addSection() to add a Section instance to the ArrayList.
**IMPORTANT**
In the driver You will need to create a collection of Timeslots that consist of 50 minute time slots that begin on the hour from 8 am Monday to 6 pm on Friday. java.time.DayOfWeek might be a helpful class to include. For instance: i. Monday 9:00 to 9:50 ii. Monday 10:00 to 10:50 iii. iv. Monday 18:00 to 18:50 v. Tuesday 9:00 to 9:50 vi. Tuesday 10:00 to 10:50 vii.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
