Home Syllabus Schedule HWs
CSE 219 – Fall 2018 Computer Science III
Developing the Course Site Generator App
HW 2 – making O ce Hours better
To start, download your instructor’s solutions for HW 1. You may choose to use these solution or your own code. That’s up to you. We will be extending the O ce Hours application in this assignment which is good since it needs some upgrading. It’s also good because you are now acquainted with the libraries we are using this semester and we’ll continue to use the same code base in this HW.
Requirements
In order to complete this assignment, implement the following:
Highlight TA Time Slots in O ce Hours Table – When a TA is selected in the TA Table on the left it will highlight all of cells on the right where that particular TA has o ce hours. Note that if no TA is selected no cells should be highlight and only the cells belonging to the currently selected TA should be highlighted. Highlighted means the cell should be either lled in or outlined in a color that stands out such that the it is easily readable and noticable.
TA Type Radio Buttons – in HW 1 we thought of all teaching assistants the same way, but now we’re going to have 2 di erent types of TAs. Graduate and Undergraduate. First, we’ll have 3 radio buttons above the TA table to select which group we wish to deal with, All, Graduate, or Undergraduate. Note that this is important in multiple regards because:
If the All radio button is selected then the Add TA button and text eld event handlers for adding TAs must be disabled. In addition, the table should display all the TAs (grad and undergrad) in sorted order by name. Don’t allow the user to sort the table in any other order. Also note that if this radio button is selected then all the TAs (grad and undergrad) should have their o ce hours displayed in the o ce hours table on the right.
If the Graduate radio button is selected then the table on the left should only display the grad TAs and the o ce hours table should only display o ce hours for those teaching assistants. Note that while this radio button is selected the Add TA button and event handlers for the text elds should be enabled and should the user choose to add a new TA it should be added as a Graduate TA.
If the Undergraduate radio button is selected then the table on the left should only display the undergrad TAs and the o ce hours tale should only display o ce hours for those teaching assistants. Note that while this radio button is selected the Add TA button and event handlers for the text elds should be enabled and should the user choose to add a new TA it should be added as an Undergraduate TA.
TA Type Column – since we now have 2 di erent types of TAs we need to show what type each is in a TA table column. So add a column to the TA table where each TA will be labeled as either Graduate or Undergraduate.
Red Error Feedback for Add TA text elds – let’s enhance our feedback mechanism for bad data when the user wants to Add a TA. While the user types in a name and email in the text elds for adding a new TA, if the name is not legal (i.e. it’s already taken) the name text in the text eld should be rendered in red. If the email is not legal (i.e. it’s not legal according to the rules of the regular expression or it’s already taken) the email text in the text eld should be rendered in red. Note therefore that it is possible for both text elds to be rendering their text in red. Legal names and emails should be rendered in black. Note again that when both the name and email are legal (and the All TAs radio button is not selected) the Add TA button should be enabled.
Editing a TA via a Dialog – we can add a TA but once they are created we have no way of editing them. For this we need a dialog. Should the user double click on a TA in the TA table on the left it should open up a dialog that looks like the one shown below that lets the user change the TAs
name, email, and type. Note that the text elds for name and email should use red error feedback just like the mechanism described for the Add TA text elds. Note that when the user clicks the Ok button it should update the data for the a ected TA and that should be re ected in the TA table and O ce Hours tables. Note that if the Cancel button is clicked no changes should be made.
Cut, Copy, & Paste – add Cut, Copy, and Paste buttons to the top tool bar (don’t reinvent the wheel they are already there, it just takes updating the proper .XML le value). Then, implement the responses for these buttons such that they work as follows:
Cut – when pressed the currently selected TA should be removed from both tables and should be stored somewhere (i.e. like a clipboard).
Copy – when pressed the currently selected TA should be copied to the clipboard.
Paste – when pressed the TA currently on the clipboard should be added in sorted order to the current TA list (minus their o ce hours as that has to be determined separately). Note that since we cannot have two TAs with either the same name or email address if the TA being pasted does not exist yet we allow a pasting without any changes to the TA, but if the TA already exits (i.e. via a Copy) you should add the TA will a unique name and email by simply adding some numbers at the end of the name and email such that they are unique.
Undo/Redo – All operations that change data should still be undoable and redoable.
Saving & Loading – note that saving and loading should still work, including now with information about whether each TA is a graduate or undergraduate.
O ce Hours GUI
Edit TA
Handin Instructions
When you are done, zip up the entire CS3LearningSuite_v2.0 directory and submit that single ZIP le via Blackboard.
Grading
Note that grading will be based on program performance and will only be done by appointment with each student’s prescribed Teaching Assistant. This part of your grade will be based on how well your program performs speci c required tasks. Proper use of version control will also be considered.
Web page created and maintained by