Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Design Principles (Java Programming) 1. System overview A University Department needs a set of interfaces and classes to manage student data. The Department has

The Design Principles (Java Programming)

1. System overview

A University Department needs a set of interfaces and classes to manage student data.

The Department has three types of students - undergraduates (UG), postgraduate taught (PGT) and postgraduate research (PGR). Students cannot be more than one type. For this coursework, the significant difference between undergraduate and postgraduate taught students is that undergraduate students take 120 credits worth of courses in a year whereas postgraduate taught students take 180. Furthermore, the pass mark for undergraduate modules is 40%but for postgraduate taught modules is 50%. Postgraduate research students have a supervisor but do not register for modules.

The University needs to maintain a record of modules and supervisors for students in an academic year. The system should allow module and supervisor information to be read from appropriately defined data files.The files should contain one data entry per line with fields separated by a comma e.g. MCS3008, Advanced Programming, 20. The system should allow an appropriate number of modules to be added to a student record and to record whether or not a student is correctly registered (are they taking the right number of credits or do they have a supervisor allocated).

In addition, the University needs to be able to issue smart cards and login ID's to all students on their courses. The following provides more detail on the required functionality:

noOfStudents (typeOfStudent)

This method returns the number of students of the specified type that are currently enrolled.

registerStudent (Student)

This method registers a new student onto the system and allocates a student ID (see below).

amendStudentData (studentID, studentData)

This method changes a student record.

terminateStudent (studentID)

This method removes the student record associated with the given student number. In effect, the student is leaving the University.

When issuing a smart card, the following rules must be observed.

- An undergraduate student must be at least 17 years old.

- A postgraduate student must be at least 20 years old.

- A student cannot be issued with more than one smartcard (i.e. do not try to deal with lost cards!)

2. Implementation

Student

All students have the following public functionality:

- a method to get the student's ID.

- a method to get the student's type (UG, PGT, or PGR).

- a method to list the modules that the student is registered for. A module consists of a name (e.g. Programming 2 ), a module code ( e.g. MCS1628) and the number of credits associated with the module (e.g. 20).

- a method which returns true if the student is currently registered for enough credits (120 for undergraduate, 180 for postgraduate taught, 0 for postgraduate research) and false otherwise.

- postgraduate research students have a method to return the name of their supervisor (a Name).

You must provide an appropriate hierarchy for students.

Student ID

A student ID has two components - a single letter followed by a four digit number. For example:

b9762

You must provide access to each component and an appropriate string representation of the ID.

Student ID's are unique. You must guarantee that no two students have the same ID.

Smart Card

A Smart Card has the student's name (comprising a first and last name), the date of birth of the student, a unique Smart Card number and a date of issue.

The Smart Card number has three components. The first component is the concatenation of the initial of the first name of the student with the initial of the last name of the student. The second component is the year of issue of the card. The third component is an arbitrary serial number. For example, the string representation of the Smart card number for a card issued to Colin Jones in 2019 would have the form:

- CJ-2019-10

where the 10 is a serial number that, with the initials and year, guarantees the uniqueness of the card number as a whole.

Your Smart Card class must provide methods to access the student's name, the student's date of birth, the student ID and the date of issue of the Card.

You should provide appropriate classes for a student's name and for a smart card number.

You must guarantee the the uniqueness of smart card numbers.

You should use the java.util.Date class to represent dates. However, you must not use deprecated methods of the Date class. So, for example, in your test classes use java.util.Calendar to construct dates of birth and dates of issue of Smart Cards. You can assume default time zone and locale.

Note: Java 8 provides a much more satisfactory way of handling dates and time with immutable classes. However, in this coursework it is expected that you can use sub-optimal classes such as Date and so its use in this project is mandatory.

The smart card should have the following private method:

- setExpiryDate(); which sets an expiry date for the card. If the smart card is held by a UG student, the expiry date is set to the issue date plus four years. If the smart card is held by a PGT student, the expiry date is set to the issue date plus two years. If the smart card is held by a PGR student, the expiry date is set to the issue date plus five years.

The smart card should have the following public method:

- getExpiryDate(); which returns the expiry date of the card.

3. Deliverable

Your solution should include your interfaces and classes that comprise the implementation of the system and types outlined in Sections 1 and 2. In addition, you should provide separate test classes that demonstrate testing of your solution.

4. Assessment

In this coursework you should demonstrate:

- the sensible use of Java inheritance mechanisms,

- an understanding of how to declare and use interfaces;

- the ability to handle collections of objects,

- the use of late binding,

- the use of defensive programming, including use of immutability and appropriate error handling,

- an understanding of when and how to override Object methods,

- the implementation of object factories.

5. Further notes

Start with the simpler classes first (e.g. Module, Name, StudentID, SmartCardNumber and SmartCard) You can implement the different types of student before implementing the management system class. Unit test classes as you progress through the coursework.

For each class you implement you should consider:

- whether to override Object methods (equals, toString etc.),

- whether to use an interface-based hierarchy, and

- whether the class should be immutable.

- whether to use an object factory.

Note - The coursework is not about development of an end-user application. You are developing interfaces and classes that could be used for the development of an application. You should not develop a graphical user interface or a command line interface. They are not necessary. The student support system so far specified is a deliberate simplification.Your solution should correspond to the simplicity of the specification.

Please help, greatly appreciated!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions