For this task, you will design and develop a course registration system for OTU’s Faculty of…

For this task, you will design and develop a course registration system for OTU’s Faculty of Engineering
and Applied Science (FEAS), which has two departments: AMME and ECSE.
To get started, consider the following three classes: Student, Course, and Department that are used to
represent a student, a course and a department.
The Person Class
public class Person {
private String name;
// constructors
public Person(String initialName){
}
public Person(){
}
public void setName( String fullName) {
}
public String getName() {
}
public String toString() {
}
}
The Student class
public class Student extends Person{
private String id;
private Vector courses; // contains all courses the student is registered in

public String getName() {
}
public String getId() {
}
// constructor
public Student(String id, String name) {
// initialize name and id. Also initialize the Vector
}
public String toString() {
// return a string representation of a student using the following format:
// 100234546 John McDonald
// Registered courses: ELEE 2110, ELEE 2790, SOFE 2710, SOFE 2800, SOFE 2850
}
}
The Course class
public class Course {
private Department dept;
private String title; // title of the course (e.g. “Intro to programming”);
private String code; // course code, e.g. SOFE, ELEE, MANE, etc.
private int number; // course number, e.g. 1200, 2710, 2800, etc.
Vector classList; // contains all students registered in this course
public String getDept() {
}
public int getCode() {
}
public Course(String code, int number, Department dept, String title) {
// also initialize the classList;
}
public String toString() {
// return a string representation of the course with the course code,
// name, and number of people registered in the course in the following
// format:
// SOFE 2710 Object Oriented Programming and Design, Enrollment = 260
}
}
The Department class:
public class Department {
private String name; // the name of school “Dept of Computing and Info Science.”
private String id; // short name for courses “SOFE”, “ELEE”, “STAT”, etc
Vector courseList; // all courses offered by the department
Vector registerList; // all students taking courses in the department.
public String getName() {
}
public String getId() {
}

public Department(String name, String id) {
// also initialize the vectors
}
public String toString() {
// returns a string representation of department name, number
// of courses offered and number of students registered in the
// department. Use the format:
// ECSE: 53 courses, 460 students
}
}
Download the templates for the above classes from Github and implement the empty methods. Once you
have implemented all the above classes, make sure all your code compiles with no errors. Now use the
following test driver to test the constructors and toString methods using the next piece of code.
public class TestDriver {
public static void main(String[] args) {
Department ecse=new Department(“Electrical, Computer and Software Engineering”,
“ECSE”);
Department amme=new Department(“Automotive, Mechanical and Manu Engineering”,
“AMME”);
Course engr1200 = new Course(“ENGR”, 1200, ecse, “Introduction to Programming”);
Course sofe2800 = new Course(“SOFE”, 2800, ecse, “Web Programming”);
Course mece2430 = new Course(“MECE”, 2430, amme, “Dynamics”);
System.out.println(engr1200);
System.out.println(mece2430);
System.out.println(ecse);
System.out.println(amme);
Student john = new Student(“100232122”, “Jon Maxwell”);
Student sarah = new Student(“100523332”, “Sarah Lee”);
Student emily = new Student(“100512132”, “Emily Johnson”);
Student alex = new Student(“100232732”, “Alex Williams”);
Student jane = new Student(“100989832”, “Jane Wesley”);
System.out.println(john);
System.out.println(sarah);
john.registerFor(engr1200);
john.registerFor(sofe2800);
emily.registerFor(engr1200);
alex.registerFor(sofe2800);
jane.registerFor(mece2430);
jane.registerFor(engr1200);
sarah.registerFor(mece2430);
System.out.println(engr1200);
System.out.println(sofe2800);
System.out.println(mece2430);
System.out.println(ecse);
System.out.println(amme);
}
}
Here is a sample run of the TestDriver:

It is time to write some code to connect all classes together. In this part , you will write instance methods
for the Department and Student classes. The methods you need to implement are:
1. Write a method in the Department class called offerCourse(Course course) that adds the
given course to the department.(1 mark)
2. Write a method in the Department class called printCoursesOffered() that displays the list
of all courses offered by the department in arbitrary order. It should show all course information (Hint:
call the course’s toString() method); (1 mark)
3. Write a method in the Student class called registerFor(Course course) that registers a
student in the given course. If the student is already registered in the course, then the method does
nothing. Otherwise, the appropriate Student, Course, and Department objects are updated as
necessary. (1 mark)
4. Write a method in the Department class called printStudentsByName() that displays a list of
all students taking courses in this department. This method should show all student information (Hint:
use the Student’s toString()). (1 mark)
5. Write a method in the Student class called isRegisteredInCourse(Course course) that
returns a Boolean value indicating whether or not the given student is registered for any course in
this department. (2 marks)
6. Write a method in the Department class called isStudentRegistered(Student
student) that returns the boolean value indicating whether or not the given student is registered
for any course in this department. (2 marks)
7. Write a method in the Department class called studentsRegisteredInCourse(int
code) that returns a Vector containing all students who are registered in the course with the given
code. You must make use of the courseList to locate the course with the given code. (Bonus mark)
8. Write a method in the Department class called
printStudentsRegisteredInCourse(int code) that displays a list of all students
C:PathName> java TestDriver
Test driver for basic classes.
ENGR 1200 Introduction to Programming , Enrollment = 0
MECE 24300 Dynamics , Enrollment = 0
ECSE: 0 courses, 0 students
AMME: 0 courses, 0 students
Jon Maxwell 100232122
Sarah Lee 100523332
ENGR 1200 Introduction to Programming , Enrollment = 3
SOFE 2800 Web Programming , Enrollment = 2
MECE 24300 Dynamics , Enrollment = 2
ECSE: 2 courses, 5 students
AMME: 1 courses, 2 students

registered in the given course. This method should show only the students’ id and name in arbitrary
order, and it should use the studentsRegisteredInCourse() method. (Bonus mark)
9. Write a method in the Department class called largestCourse() which returns a Course
object showing the course containing the largest number of registered students. Note that if two or more
courses have the largest number then the method should return either course. This method should use
the values in the courseList. (Bonus mark)
Compile your code and make sure everything is working properly. Test your classes using the following
test application.
public class TestApp {
public static void main(String[] args) {
// create a couple of departments
Department ecse=new Department(“Electrical, Computer and Software Engineering”,
“ECSE”);
Department amme=new Department(“Automotive, Mechanical and Mane Engineering”,
“AAME”);
// create some courses
Course sofe2710 = new Course(“SOFE”, 2710, ecse, “Object Oriented Programming &
Design”);
Course sofe2800 = new Course(“SOFE”, 2800, ecse, “Web Programming”);
Course sofe4610 = new Course(“SOFE”, 4610, ecse, “Internet of Things”);
Course elee4350 = new Course(“ELEE”, 4350, ecse, “Microprocessors”);
Course elee4150 = new Course(“ELEE”, 4150, ecse, “Advanced Control Systems”);
Course elee3250 = new Course(“ELEE”, 3250, ecse, “Electric Machines”);
Course engr1015 = new Course(“ENGR”, 1015, ecse, “Intro. to Engineering”);
Course mane2200 = new Course(“MANE”, 2200, amme, “3D Printing”);
Course mece3000 = new Course(“MECE”, 3000, amme, “Fluid Mechanics”);
Course aute3000 = new Course(“AUTE”, 3010, amme, “Intro. to Auto.
Engineering”);
Course aute4010 = new Course(“AUTE”, 4010, amme, “Vehicle Dynamics & Control”);
// connect courses to departments
ecse.offerCourse(sofe2710);
ecse.offerCourse(sofe2800);
ecse.offerCourse(sofe4610);
ecse.offerCourse(elee4350);
ecse.offerCourse(elee4150);
ecse.offerCourse(elee3250);
ecse.offerCourse(engr1015);
amme.offerCourse(mane2200);
amme.offerCourse(mece3000);
amme.offerCourse(aute3000);
amme.offerCourse(aute4010);
//create a person
Person someone = new Person(“John Smith”);
// create some students
Person joseph = new Student(100345876, “Joseph McDonald”);
Person emily = new Student(100234211, “Emily Lee”);
Person max = new Student(100988111, “Max McDee”);

Person jane = new Student(1004358888, “Jane Fraser”);
Person chad = new Student(1004358888, “Chad K.”);
// register students
joseph.registerFor(sofe2710);
joseph.registerFo(sofe2800);
joseph.registerFor(mane2200);
emily.registerFor(sofe2710);
emily.registerFor(sofe2800);
max.registerFor(mece3000);
max.registerFor(sofe2800);
max.registerFor(sofe4610);
max.registerFor(elee4150);
jack.registerFor(sofe2710);
jack.registerFor(mece3000);
jack.registerFor(mece3000);
jack.registerFor(mece3000);
chad.registerFor(mece3000);
chad.registerFor(aute4010);
chad.registerFor(aute3000);
chad.registerFor(mece3000);
chad.registerFor(mane2200);
chad.registerFor(sofe2710);
// now check to see if it works
System.out.println(“ECSE Department: “+ecse);
System.out.println(“AMME Department: “+amme);
System.out.println(“ECSE courses: “+ecse.printCoursesOffered());
System.out.println(“AMME course: “+amme.printCoursesOffered());
System.out.println(“Students taking ECSE courses:
“+ecse.printStudentsByName());
System.out.println(“Students taking AMME courses:
“+amme.printStudentsByName());
System.out.println(“Is Joseph registered in sofe2710:
“+joseph.isRegisteredInCourse(sofe2710);
System.out.println(“Is Joseph registered in sofe2800:
“+joseph.isRegisteredInCourse(sofe2800);
System.out.println(“Is max registered in mece3000:
“+max.isRegisteredInCourse(mece3000);
System.out.println(“Is joseph registered in mane3000:
“+joseph.isRegisteredInCourse(mane3000);
System.out.println(“Joseph is registered in ECSE:
“+ecse.isStudentRegistered(Joseph));
System.out.println(“Chad is registered in ECSE:
“+ecse.isStudentRegistered(Chad));
System.out.println(“Students registered in sofe2710:
“+cs.printStudentsRegisteredInCourse(2710));
System.out.println(“Students registered in sofe2800:
“+cs.printStudentsRegisteredInCourse(2800));

System.out.println(“Students registered in engr1015:
“+cs.printStudentsRegisteredInCourse(1015));
System.out.println(“Students registered in elee4150:
“+cs.printStudentsRegisteredInCourse(4150));
System.out.println(“Largest ecse course: “+ecse.alrgestCourse());
System.out.println(“Largest amme course: “+amme.alrgestCourse());
}
}

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more
error: Content is protected !!