The objective of this assignment is to introduce you to a real-life development practices, and also extend your understanding of OO design and development processes (utilising basic UML and Java programming language). As such, the emphasis is on adhering to a specification, which was designed to test various aspects of OO development, rather than developing a complete commercial grade product with realistic business rules.
Your task is to implement a simple “Academic Management System (AMS)” outlined below. The solution should be developed according to a supplied UML class diagram, and also adhere to a purposively built test harness. The class diagram itself will be outlined during our online chat session this Wednesday and a final class diagram will be made available on Blackboard for your reference. You may use this diagram to whatever extent you consider appropriate. The test harness can be found in the ams.test package of the provided source code.
The system will consist of a collection of interacting classes/interfaces to store information about:
The system will also include a unified “front end”, through the provision of an AMSModel façade interface (located in the ams.model.facade package) that will offer a single point of entry for all high-level operations. This front end will support the testing of your program, independently of a graphical user interface, using the test harness.
The system will need to be modelled using a number of OO classes/interfaces. The main entities involved in the system, and their behaviours, are detailed below.
The university should capture information about the student and program. Note that a typical university will contain multiple students and programs, but for simplicity reasons the decision was made to ‘restrict’ the university to one student and one program only.
The program has a program code (e.g. “BP062”), a title (e.g. “Bachelor of IT”), and a collection of courses. The program is dynamic and unbounded i.e. you can add any number of courses to a program.
Each course has a course code (e.g. “COSC2136”), a title (e.g. “Adv Prog Techniques”), an associated number of credit points (see below), and any number of prerequisite courses. Note that a course can be added to a program only if all the prerequisite courses already exist. Also, the system needs to cater for two distinct types of Courses, Core Courses and Electives.
The student has a student ID, a full name, a maximum allowable study load (defined in terms of number of credit points, see below), a collection of currently enrolled courses, and a collection of results for the previously completed courses. The student can enrol and withdraw into/from offered courses. Also, the system needs to cater for two distinct types of Students, Undergraduate (UG) and Postgraduate (PG).
Each result represents a grade obtained by the student for a given course. For simplicity reasons, the result is defined in terms of a boolean value - true (PA), or false (NN).
At a minimum, the AMS system should provide the following functionality (check the provided AMSModel facade interface for a complete list of required functions):
Your primary goal is to implement the provided AMSModel interface, in a class called AMSFacade in order to provide the behaviour specified as comments in the provided AMSModel source file and tested by the provided TestHarness.java (to be released later in the week). In Assignment 2 you will be asked to write a graphical user interface to more effectively utilise AMSModel.
You have freedom in how you choose to implement your solution; however, you must implement it in such a way that the TestHarness is NOT modified. You should use inheritance, polymorphism, abstract classes and interfaces effectively, as taught in this course.
Even though the AMSModel interface returns array types, you should use data structures from the Java collection API (List, Map etc.) in your implementation and convert them for return as necessary. You should choose structures that are appropriate to the task, for example if lookups are frequently performed a Map would be a suitable data structure.
System Exceptions must extend the provided AMSException class (located in the ams.model.exception package). Note: at the minimum you should implement and use two exception sub-classes: ProgramException and EnrollmentException.
You must provide appropriate constructors and methods as required by the TestHarness in order to ensure that your solution can be complied and tested without modifying the TestHarness. Example1. Program class must implement the Course[] getAllCourses() method as used in the TestHarness tests.
Example 2. UGStudent, which represents one of the concrete Student classes that you need to implement according to TestHarness, must have the following constructor:
public UGStudent (int studentID, String studentname)
The rest of the requirements can be determined from the TestHarness source file.
Program Structure Rules:
The program is dynamic and unbounded. That is, you can have an unlimited number of courses added to the program. When calling addCourse(…) and removeCourse(…) methods to build up the program structure, the following rules must be maintained:
The ProgramException should be thrown, when the above rules are violated.
Enrolment Rules:
The EnrollmentException should be thrown, when the above rules are violated.
Certain classes must provide specific string representations by implementing a public String toString() method which conforms to the format described below. This is required to enable correct operation of the TestHarness and is used as an alternative to data access methods, thereby allowing greater flexibility in how you implement your solution. Examine the TestHarness and the specification below to see how they are used.
Program
program_code:program_title
e.g. BP062:Bachelor of Computer Science
Student
student_id:full_name:maximum_load
e.g. 3000001:Joe Bloggs:60
Course
course_code:course_name:credit_points:prereqs_courseCodes:type
e.g. COSC2136:Adv Prog Techniques:12:COSC1073:CORE
Note:
Result
courseCode:grade
e.g. COSC2136:pass
Note: grade can be either “pass” or “fail”.
Program, Student, and Course codes/ids and names/titles are assumed to be unique and case insensitive, and must not contain any colons (:) or commas (,) that would otherwise lead to invalidly formatted string representations.