Introduction
,,,
,java
Requirement
FIT9131 Semester 2 2016 Assignment 2
14 September 2016 1
A Simple Student Management System
Due Date : 12 noon on Friday in Week 12 (21st Oct 2016)
Introduction
This assignment is worth 25% of the marks for your final assessment in this unit. Heavy penalties will
apply for late submission. This is an individual assignment and must be entirely your own work. You must
attribute the source of any part of your code which you have not written yourself. Please note the section on
plagiarism in this document.
The assignment must be done using the BlueJ environment. All user input to the system, and system
output to the user, must be done at the BlueJ terminal window. No other graphical interfaces are to be
used (nor assessed) in your program.
The Java source code for this assignment must be implemented according to the FIT9131 Java Coding
Standards.
Any points needing clarification should be discussed with your tutor in the tutorial class. You should not
make any assumptions about the program without consulting with your tutor.
Specification
For this assignment you are required to write a program that implements a simple Student Management
System for a very small, fictional, school. This section specifies the required functionality of the program.
The aim of the Student Management System is for a user (the school’s enrolment staff) to keep a database of
the students enrolled in various subjects in this fictional school. This school only offers three (3) subjects :
Computing, Maths, and English. The system will allow the user to add/delete students, enrol them in
subjects, and perform. simple reports.
Even though this program is functionally very different from the program you wrote in Assignment 1, you
should be able to re-use much of your previous code here - if you have designed the classes/logic in your
previous program properly. This is one of the major benefits of an object-oriented program - the ability to
re-use classes.
The Student Management System should provide the following features :
maintains a list (using a Java Collection class) of Student objects
o each Student object represents a person who is allowed to enrol in the fictional school
maintains a fixed list of exactly 3 Subject objects
o each Subject object represents a subject which is available in the fictional school
FIT9131 Semester 2 2016 Assignment 2
14 September 2016 2
enrol each student in a subject, or subjects (HD level)
lists the details of an existing student
produces a report of students based on some criteria
loads a list of students (with their enrolled subjects) from a text file
saves the list of current students (with their enrolled subjects) to a text file
You are to demonstrate the following programming techniques in your program :
reading/writing data from/to text files
using appropriate Java Collection class or classes to store data
using code to manipulate the data in the collection(s)
performing simple searches, filtered by some given criteria
using program constructs such as repetitions selections
using appropriate classes to represent objects in the program
There will be a description of the “HD level” features later in this document (in the Grades section).
You are also required to produce a partial Test Strategy for your program.
FIT9131 Semester 2 2016 Assignment 2
14 September 2016 3
Program Logic
When the Student Management System starts, it should automatically load a text file called
“students.txt” which contains details of all students currently stored in the system. The actual format
of this text file is described later in this document. The data loaded should be stored in some appropriate data
structures. No other reading from or writing to file is required while the program is in operation, until the
user chooses to exit, at which point the program saves all the data in memory back to the same text file
(students.txt).
In other words, the file I/O operations are performed automatically by the program, and require no
interactions with the user.
When the program is running, it should repeatedly display a menu with these options :
(1) Add new student
(2) Delete a student
(3) Find Student By Name
(4) List Students By Subject
(5) List All Students
(6) Exit System
Option (1) allows the user to add a new student into the database. The user should be asked for the student’s
details, plus what subject to “enrol” him/her in.
Option (2) allows the user to remove an existing student from the database.
Option (3) allows the user to find an existing student in the database. The user should be asked to enter a
name to search for. If a matching student is found, his/her details will be displayed.
Option (4) allows the user to display a list of students enrolled in a subject. The user should be asked for a
subject name; a list of all students (if any) enrolled in that subject should then be displayed.
Option (5) allows the user to display a list of all students enrolled in the school.
Option (6) exits the program. All the students currently in memory are automatically saved to
“students.txt”.
Inputs other than 1-6 should be rejected, and an error message printed. The menu should be displayed
repeatedly, until the user chooses Option (6).
FIT9131 Semester 2 2016 Assignment 2
14 September 2016 4
Important Assumptions
You should observe the following assumptions when implementing your program :
all student names are unique - if a student is already in the database, trying to add the same name
again should generate an error
there is no limit to how many students can be enrolled
exactly 3 subjects are offered : Computing, Maths and English
each student can only enrol in exactly one subject
all searches use exact matches (eg. “andy” will not match “andy cheng”); however, the search
strings are not case-sensitive (eg. “Sue Smith” is considered to be the same as “SUE smith”)
the data file is always in the correct format - ie. no need to validate the data when reading it in
Student Record Format
Each student in the database contains the following information :
Name (non-blank String, may contain multiple words)
Telephone (non-blank String, exactly 9 digits, 1st digit must be a ‘9’)
Subject (a String, representing one of the 3 subjects offered)
Input File Format
The input data file (students.txt) has the following format for each line :
Name,Telephone,Subject (the fields are separated by commas)
Eg.
David Smith,912345678,Maths
Andy Cheng,987654321,Computing
Susan Dally,911221122,English
Zak Whatever,999999999,Maths
Russell Crowe,980808080,Computing
FIT9131 Semester 2 2016 Assignment 2
14 September 2016 5
Program Design
Your program must demonstrate your understanding of the object-oriented concepts and general
programming constructs presented in FIT9131. You must use appropriate data structures to store the various
objects (list of students, list of subjects, etc) in the program.
You must be able to justify the choice of the data structures during your interview. You must document any
additional assumptions you made.
Validation of values for fields and local variables should also be implemented. You should not allow an
object of a class to be set to an invalid state.
Discuss with your tutor regarding what classes are appropriate, and how they interact with each other.
The main requirements are : (1) the Students and Subjects must be implemented as objects, and they must
be stored in some appropriate Java collections, and (2) for the HD level , the list of Subjects within each
Student object must also be stored in some appropriate Java collections.
Your program must deal with invalid values entered by the user in a sensible manner. For instance, if a user
enters “abc” instead of a number for the menu options, your program should not crash.
All on-screen input/output should be formatted in a user-friendly manner. Sensible error messages should be
displayed whenever appropriate (eg. when searching for a student who is not in the database, trying to enrol
student in a subject which does not exist, etc).
Grades
There are 2 possible Grade Categories for this assignment, as described below :
1) A maximum grade of up to a D (Distinction) can be achieved by correctly implementing all the
features as described in the “Program Logic” section above.
2) To achieve up to a maximum of a HD (High Distinction), you need to implement the following
additional features :
for Option (1), a student can be enrolled in up to a maximum of 3 unique subjects
for Option (4), the user can specify more than 1 subject, and the program will display all
students listed in those subjects (eg. all students enrolled in both “Computing” AND “English”,
all students enrolled in “Computing” AND “Maths” AND “English”, etc)
Note : The description of the program’s logic/design is intentionally left vague, to give you some room
to exercise your own design and creativity. Discuss with your tutor about what/how to implement.
Important : You must not attempt the HD Category until you have fully implemented the D
Category. If you submit a program which partially implements both, you will only be awarded up
to a maximum of D.
FIT9131 Semester 2 2016 Assignment 2
14 September 2016 6
Test Strategy
For this assignment, you are required to produce a partial Test Strategy for the program.
There is no need to produce Test Strategy for any other classes you have used in your program.
You must provide a Test Plan, plus detailed sets of Test Data, Expected Results and Actual Results for the
Student class.
Assessment
Assessment for this assignment will be done via an interview with your tutor. The marks will be allocated as
follows:
Test Strategy : 10%
Java Code Object-Oriented Design : 35%
Program Functionality in accordance with the requirements : 55%
You must submit your work by the submission deadline on the due date (a late penalty of 20% per day of
the possible marks will apply).
Marks will be deducted for untidy submissions and non-conformances to the FIT9131 Java Coding
Standards.
Interview
You will be asked to demonstrate your program at an interview following the submission date. At the
interview you can also expect to be asked to explain your code, your design, discuss design decisions and
alternatives and modify your code as required. Marks will not be awarded for any section of code or
functionality that a student cannot explain satisfactorily. (The marker may delete excessive comments in
code before a student is asked to explain that code).
In other words, you will be assessed on your understanding of the code, and not on the actual code itself.
Interview times will be arranged in the tutorial labs in Week 12. It is your responsibility to attend the lab and
arrange an interview time with your tutor. Any student who does not attend an interview will receive a mark
of 0 for the assignment.
The actual interviews will take place in Week 13.
Your Test Strategy will be only for one class - the Student class.
FIT9131 Semester 2 2016 Assignment 2
14 September 2016 7
Submission Requirements
The assignment must be uploaded to Moodle on or before the due date. The link to upload the assignment
will be made available in the Assignments section of the unit’s Moodle site before the submission deadline.
The submission requirements are as follows:
A .zip file uploaded to Moodle containing the following components:
the BlueJ project you created to implement your assignment. The .zip should be named with your
Student ID Number. For example, if your id is 12345678, then the file should be named
12345678_A2.zip. Do not name your file any other way.
it is your responsibility to check that your ZIP file contains all the correct files, and is not corrupted,
before you submit it. If you tutor cannot open your zip file, or if it does not contain the correct files,
you will not be assessed.
an MS Word document containing your Test Strategy for the Student class. (Note: The JUnit facility in
BlueJ is NOT to be used for this assignment)
a completed Assignment Cover Sheet. This will be available for download from the unit’s Moodle site
before the submission deadline. You simply complete the editable sections of the document, save it, and
include it in your .zip file for submission.
Marks will be deducted for failure to comply with any of these requirements.
Warning : there will be no extensions to the due date. Any late submission will incur the 20% per day
penalty. It is strongly suggested that you submit the assignment well before the deadline, in case there are
some unexpected complications on the day (eg. interruptions to your home internet connection).
Plagiarism
Cheating and plagiarism are viewed as serious offences. In cases where cheating has been confirmed,
students have been severely penalised, from losing all marks for an assignment, to facing disciplinary action
at the Faculty level. Monash has several policies in relation to these offences and it is your responsibility to
acquaint yourself with these.
Plagiarism ()
Discipline: Student Policy (
bank/academic/education/conduct/student-discipline-policy.html