15.05.2020
148024
Applications Programming Assignment 2
Topics:
OO Design, GUI, MVC, Tables, Lists
Learning Outcomes:
This assessment task addresses the following subject learning objectives (SLOs): 3, 4 and 5
Due date:
11:59PM Monday 8 June
Weight:
30%
Platform:
PLATE
Individual Work
All work is individual. You may discuss ideas, approaches and problems, but you should write every line of code yourself except for code copied from the lecture notes, lecture code or lab code. You MUST NOT let another student see your solution code, and you MUST NOT look at another stdents soltion code. More information about Academic Misconduct can be found at:
http://www.gsu.uts.edu.au/rules/student/section-16.html
Specification
After a successful trial run of the Assignment 1 timetable system, UTS has decided it would like you to build a graphical user interface for the application using JavaFX.
Functionality
When the application is lanched, the Uniersit indo appears which shows a list of students, or the
1
15.05.2020
placeholder No stdents if there are no stdents (as is the case initiall):
Clicking Add Stdent brings p the Add Stdent indo ith a data entr form:
Clicking Cancel closes the indo ithot adding a ne stdent. The Add btton is disabled hile the student number is blank, or the student name is blank, or an attendance mode has not been chosen. Clicking Add ill reslt in the error Stdent alread eists if a stdent ith the gien nmber alread exists in the university.
Otherise, clicking Add ill add a ne stdent to the niersit sing the data entered, and the Add Stdent indo is closed. The Uniersit indo instantl displas the new student in the list:
2
15.05.2020
The Remoe Stdent and Login bttons are enabled onl hen a stdent has been selected in the list. Clicking Remoe Stdent ill remoe the stdent from the niersit and ithdra the stdent from all activities in which that student is enrolled. The user interface is immediately updated to reflect this change.
Selecting a stdent and clicking Login ill open the Stdent indo:
3
15.05.2020
The stdents name, nmber, attendance and scholarship is shon at the top. The attendance is shon as either Fll Time or Part Time. The scholarship is shon as either Yes or No. The M Actiities table displays all the activities that the student is currently enrolled into, or the placeholder Not enrolled in an actiities if the stdent is not enrolled in any activities.
To enrol into an activity, the user first chooses a subject from the ComboBox. After selecting a subject, the table below the ComboBox presents a list of activities in that subject:
The ser ma then select an actiit from that table and click Enrol. The Enrol btton is enabled onl hen an activity has been selected and there is an aailable seat in that actiit and the stdent isnt alread enrolled in that actiit. Clicking the Enrol btton reslts in the stdent being enrolled into that actiit, and being withdrawn from any activity in that subject with the same group as the new activity being enrolled into. The ser interface is immediatel pdated to reflect the ne sstem state. In particlar, the Enrolled colmn for the selected actiit increases b 1, and the actiit appears in the M Actiities table. If the stdent as first ithdran from another actiit, the Enrolled colmn for that actiit decreases b 1. Bttons shold also be appropriately enabled or disabled based on the current state (see above for the when to disable the Enrol btton and belo for hen to disable the Withdra btton).
To ithdra from an actiit, the ser selects an actiit from the M Actiities table and clicks Withdra. 4
15.05.2020
The Withdra btton is enabled onl hen an actiit has been selected from the M Actiities table. Upon clicking Withdra, the ser interface is immediatel pdated to reflect the ne sstem state.
Clicking Logot closes the Stdent indo.
Layout
Every window is divided vertically into 3 overall parts: a header section, a content section, and a footer section.
The Uniersit indo shos:
A header containing the UTS logo (donloadable from http://www.uts.edu.au/sites/default/files/logo_2.png ) and the heading text Timetable Sstem.
A content section containing a ListVie ith a preferred idth of 300 piels and a preferred height of 200 pixels. The ListView is centred horizontally within the content section.
A footer containing 3 bttons centred horiontall.
The Add Stdent indo shos:
A header containing the heading tet Add ne stdent.
A content section containing a form laid ot in a GridPane. The grid has 5 rows containing 4 Labels, 2 TextFields, 2 RadioButtons, 1 CheckBox and a Text to display the error message. The error message spans 2 columns and is centred horizontally.
A footer containing 2 bttons centred horiontall.
The Stdent indow shows:
A header containing the heading tet Logged in as
A content section containing to sbsections:
The first section begins ith the heading tet M Actiities aligned to the left, and a button aligned to the right. Below both is a TableView.
The second section begins ith the heading tet Enrol into sbject followed by a ComboBox, both aligned to the left, and a button aligned to the right. Below these is a TableView.
A footer containing a btton centred horiontall.
Style
The following CSS colours are used:.
#0099cc is sed as the backgrond color of the header sections and the buttons. #00749b is sed as the backgrond color of the content sections.
#252b2b is sed as the backgrond color of the footer sections.
#333333 is sed as the color of labels.
#ffffff is sed as the color of heading tet and btton tet.
FIREBRICK is used as the colour of error messages.
#00bfff is sed as the backgrond color of a btton dring the hoer state.
The following fonts are used:
Heading tet is Arial ith font sie 32p.
Labels se font sie 12p.
Label tet, Btton tet and error text is bold. Defalt fonts are sed elsehere.
Spacing and padding is also important. While exact measurements are not given in this specification, your application should include spacing and padding roughly equivalent to the screenshots above.
Code
Your solution must satisfy the following code requirements:
5
15.05.2020
Yor soltion mst follo an MVC architectre.
Yor package strctre shold place the models in a package named model, the views in a package named ie and the controllers in a package named controller.
The models mst notif the ies of changes b correctl appling the JaaFX property patterns and observable lists. Any model data that can change must be observable. Any model data that never changes does not need to be observable.
The attendance mode mst be stored in the stdents attendance String propert. The ale ft shold be stored to represent Fll Time, and the ale pt shold be stored to represent Part Time.
Each ie mst be defined in FXML.
The Stdent alread eists error message mst be implemented as an eception. The model should throw an exception, and the controller must catch the exception and show the error message on the view.
Skeleton Code
Download the skeleton code for Assignment 2 from the Assignment 2 assessment page on PLATE ( https://plate.it.uts.edu.au/ ). Your solution must be based on this skeleton code.
Included in the skeleton code is a text file called progress.txt which must be filled in by you as you progress through the assignment (see PLATE marking and Sbmission and Retrn belo).
Expected Workload
The time to do the assignment to a distinction level (i.e. a mark between 75% to 84%) has been estimated at 15 hours for a student of average ability who has completed all the tutorial and lab exercises.
Online Support
The Assignment 2 discussion board has been set up in ED so that students can ask questions, and other students can reply. The course coordinator will post a reply only if the student response was wrong, or in the case of correcting a mistake in the assignment specification.
You must not post or share Java code to the discussion board. The board is there to help you, not to provide the solution. Posting your code is academic misconduct and will reported. Each time this rule is iolated, the code ill be remoed and replaced ith a comment of the form: Strike 1: Posting code. After 3 strikes, the discussion board will be deleted because it did not work.
FAQs (Frequently Asked Questions) and their answers will be posted in the platform. If you have a question, check the FAQ first; it may already be answered there. You should read the FAQ at least once before you hand in your solution, but to be safe check it every couple of days. Anything posted on the FAQ is considered to be part of the assignment specification. The FAQ will be frozen (no new entries) two days before the due date; no questions will be answered after it is frozen.
If anything about the specification is unclear or inconsistent, contact the subject coordinator who will try to make it clearer by replying to you directly and posting the common questions and answers to the FAQ. This is similar to working on the job, where you ask your client if you are unsure what has to be done, but then you write all the code to do the task. Email huan.huo@uts.edu.au to ask for any clarifications or corrections to the assignment.
Submission to PLATE
READ THIS ENTIRE SECTION CAREFULLY
PLATE cannot test the behaviour and appearance of a graphical user interface on its own. Instead, Assignment 2 is marked by a combination of PLATE, student peer marking (including peer marking others and marked by others within due time), and the subject coordinator.
Included in the skeleton code is a file called progress.txt which you must fill out as you progress through the assignment 2. A sample of the beginning of this file is shown below:
6
15.05.2020
Launch the application
[?] The UTS Logo is shown
[?] The “Timetable System” heading is shown
[?] “No students” is shown in the empty list
[?] “Add Student” appears and is enabled
[?] “Remove Student” appears and is disabled
[?] “Login” appears and is disabled
[?] The layout arranges the header, content and footer sections vertically
[?] All colours and fonts are correct
[?] The spacing and padding look like the screenshots
Click “Add Student”
[?] The “Add Student” window is shown
[?] The “Add new student” heading is shown
[?] The student number label and text field are shown
[?] The student name label and text field are shown
[?] The attendance label, “Full Time” radio button and “Part Time” radio button are shown [?] The scholarship label and checkbox are shown
[?] The “Cancel” button is shown and enabled
[?] The “Add” button is shown and disabled
[?] The layout arranges the header, content and footer sections vertically
[?] The form is laid out in a GridPane
[?] All colours and fonts are correct including the error message
[?] The error message is included in the GridPane, centred horizontally spanning 2 columns [?] The spacing and padding look like the screenshots
Click “Cancel”
[?] The “Add Student” window is closed
This file tells you how to test the functionality of your application. Here is how it works:
Each line without a [?] is an action you need to perform on your application.
Each line with a [?] is verification point that you must check. You must replace the [?] by either a
[y] (for yes) or a [n] (for no) to record whether or not your application behaves correctly in that respect.
For example, you should first launch the application, and then you should then check that the UTS Logo is shon, the Timetable Sstem heading is shon, and so on. If or application does not displa the logo, bt does displa the heading Timetable Sstem, then you should fill in that part of the progress.txt file as follows:
Launch the application
[n] The UTS Logo is shown
[y] The “Timetable System” heading is shown
If a verification point lists multiple things to check, they must all be true for you to give a [y] answer. For example:
[?] “Add Student” appears and is enabled
This erification point can onl be ansered [] if BOTH the Add Stdent btton appears AND it is enabled. Before your final submission, you should recheck every answer you gave, to ensure that your answers are accurate.
There are 85 verification points like this to fill in. Each [y] answer contributes a potential 1 mark to your total, which makes up a maximum of 85 marks out of 100. The mark reported by PLATE when you submit is the provisional mark for peer review, not the final mark.
You are required to submit your project (including the updated progress.txt file) to PLATE regularly. Serious penalties apply if you do not sbmit or progress in small increments (See Penalty below).
If you are not sure how to implement a certain feature, in many cases it is possible to skip that feature and come back to it later if it is nonessential to testing the following features.
For example, style and layout can be refined after you get the application working. Correct enabling and disabling of buttons can be addressed later. Radio buttons and checkboxes can be done later. In such cases where it is possible to continue testing your app after skipping a particular verification point, you are permitted to just enter [n] for that verification point and continue on with the next one.
7
15.05.2020
However, you must perform all actions mentioned in progress.txt in sequence before attempting to check any particular verification point. For example, you cannot just Lanch the application and then skip to the last verification point shown above and answer [y] that the Add Stdent indo is closed. In order to be eligible to answer [y] for that verification point, you must have first also performed the action to open the Add Stdent indo, and then also performed the action to click the Cancel btton. Onl then, if the Add Stdent window is closed, are you eligible to answer [y] that this window was closed.
Penalty for lack of progress evidence
You must submit your progress to PLATE in increments of no larger than 25 marks. The penalty for making a submission to PLATE that is N marks higher than your previous best mark, where N > 25 is N marks. Here is an example:
Submission #1: 5 marks (OK. This is 5 marks higher than the previous best of 0) Submission #2: 18 marks (OK. This is 13 higher than the previous best of 5) Submission #3: 15 marks (OK)
Sbmission #4: 42 marks (Jst OK. This is 24 higher than the preios best of 18) Submission #5: 85 marks ( Penalty of 43 . This jump is 43 marks higher than 42)
To avoid a penalty, submit your progress in smaller increments. That is, you should not introduce more than 25 new [y] answers in your progress.txt file in a single submission.
Marking
Your solution is to be submitted to PLATE at https://plate.it.uts.edu.au/ under Applications Programming / Assessments / Assignment 2. Your assignment should be submitted as a JAR file that includes:
All Java source files required to compile your assignment.
All FXML, CSS and image files required to run your assignment.
The progress.txt file at the top level of your project directory structure.
A provisional mark of up to 85 marks is generated immediately from your progress.txt file each time you submit to PLATE.
In your scheduled week 12 lab class, you will be assigned two other students to peer mark based on your reference mark, and two other students will be assigned to peer mark you. The purpose of this peer marking is to mark the functionality of your application which cannot be tested by PLATE. Your marks for functionality will be based on these peer marks after they are moderated by the subject coordinator. Aside from marks for the functionality, the subject coordinator will also mark your code to ensure that all code requirements have been met. If the code requirements have not been met (for example, the observer pattern not used, marks will be deducted for those components). Your final mark will be a combination of marks for functionality and marks for code (See Marking scheme). Note that o can onl be marked for featres that can be demonstrated to work.
There is no scheduled late submission period. An extension of up to one day may be given by the subject coordinator before the de date; o hae to sppl docmentar evidence of your claim. An extension CANNOT be given after the due date. You may also apply for special consideration for reasons including unexpected health, family or work problems. More information about how to apply for special consideration can be found at http://www.sau.uts.edu.au/assessment/consideration.html .
Your presence is required at this class. Any student who is not present without being granted prior permission may have up to 50% of their marks for this assignment deducted.
Marking the code and analyzing spoofing, cheating and plagiarism is done in the two weeks following the due date. If you are suspected of Academic Misconduct, I will forward your case to the Misconduct Committee and will notify you by email. Your mark will be finalized within 2 weeks of the due date.
Marking Scheme
The marks for the assignment are divided into the following functionality components (detailed description is available in PLATE):
8
15.05.2020
Task
Mark
Show main window on launch
6%
Add a student
19%
Login
16%
Enrol
21%
Withdraw
4%
Remove a student
5%
Layout
7%
Style
7%
MVC architecture and FXML
5%
Correct package structure
1%
JavaFX observable properties and lists
4%
Attendance mode stored as ft/pt
2%
Correct use of exceptions
3%
This adds to a mark out of 100 and makes up 30% of your final assessment mark.
9