95712-Fall 2022 HW3 Problem Statement In CyberCop 3.0, you will add the following new functionalities 1. Handle some runtime exceptions related to data (e.g., Fig.1) 2. Allow the user to...

1 answer below »
the following are the instruction, files for hw3, the jar extension, and the old hw2. hw3 is based on hw2. change the hw2 with the instruction in the new hw3 package


95712-Fall 2022 HW3 Problem Statement In CyberCop 3.0, you will add the following new functionalities 1. Handle some runtime exceptions related to data (e.g., Fig.1) 2. Allow the user to make changes to case file and save it as a TSV. 3. Attach a class provided to you to display a chart as shown Fig.2. Figure 1 Exception handling Figure 2 Bar-chart based on FTC case count For more details on these functionalities, please refer to the demo video-clips provided on Canvas. Solution Design A class diagram for Cyber Cop 3.0 is provided in Fig.3 and 4. A brief description of each class and any potential changes that you may need to make are given in Table 1. Note that these changes are based on the design used in HW2. So, your changes may be a little different. In this version, you can make changes to any of the given files, and therefore you must submit all Java code files except the Java UT files. Table 1: Class descriptions Class name Description CyberCop This will have new handlers and any new bindings, as needed CCView A new method showChartView() has been added which needs to be invoked as part of CaseCountChartMenuItemHandler. It is fully coded. CCModel New method to be added writeCases(): This method writes caseList elements in a TSV file. If the write is successful, it returns true. In case of IOException, it returns false. Case No change CaseReaderFactory No change CaseReader No change CSVCaseReader No change JTW JTW JTW TSVCaseReader Handles DataFormat exception when any of first four columns is missing (date, title, type, or case number) CaseView No change. AddCaseView No change. ModifyCaseView No change. DeleteCaseView No change. CCChart New class provided fully coded to create the chart shown in Fig.2. This class is used by CCView's new showChartView() method. DataException New class that extends RuntimeException and shows the message Alert as shown in Fig.1. This exception class will be used in the following cases: 1. In TSVCaseReader: when a case has missing data in first four columns, e.e. date, title, type, and case number. 2. In AddButtonHandler: when the user tries to add a case with either missing date, title, type, or case-number, or the case-number already exists. 3. In ModifyButtonHandler: when the user tries to modify a case in a way that creates the problem mentioned above. Event Handlers OpenFileMenuItemHandler No change CloseFileMenuItemHandler No change. ExitMenuItemHandler No change. SearchButtonHandler No change. ClearButtonHandler No change. CaseMenuItemHandler No change. AddButtonHandler See Table1: Data Exception ModifyButtonHandler See Table1: Data Exception DeleteButtonHandler No change. SaveFileMenuItemHandler Opens the file-dialog box in DEFAULT_PATH for user to enter a filename for the file in which to save the data. It then invokes ccModel's writeCase() method. If the writeCase() method returns true, it displays the "filename saved" message on messageLabel. CaseCountChartMenuItemHandler Invokes ccView's showChartView(), passing ccModel's yearMap to it. Figure 3 Cyber Cop 3.0 Class Diagram Legends: Grey: Library class Green: Fully coded Yellow: Partially coded Orange: To be modified or added new No color: To be coded Note that you are free to change any class in this version The following diagram shows the event handlers required in Cyber Cop. You may code them as member classes, inner classes, or lambda functions, as per your preference. . Figure 4 Handlers used in Cyber Cop 3.0 Figure 5 Project setup. Note special icon for data and web folders. They are created as 'source folder'. While not necessary for data folder, source folders are automatically included in build path. Instructions: • Download the files from Canvas and store them in a project and a package as shown in Fig. 6. • Add the following VM options to your run configuration: --module-path="YOUR PATH TO JAVAFX LIB" -- addmodules=javafx.controls,javafx.fxml,javafx.web • Complete your code. • You can modify any class (except test file) in this version. And you must submit all Java files (except test file) • Write your name and Andrew id as comments at the top in all Java files. JTW • You will test your program in two ways: GUI interaction (refer to scenarios in video-clips on Canvas) and TestCyberCop.java. These two tests will get you 80% of the points. Other criteria applied to evaluate your program are: 1. Documentation (5%): Your code should be well-commented, i.e., neither too many comments, nor too few. Yes, this requires a little bit of your judgment! Name your variables in a selfexplanatory way. Write your name and Andrew id at the top in the comments in each class. Indent your code properly. (In Eclipse, press Ctrl-A to select all your code and then Ctrl-I to indent) 2. Code quality (5%): coding conventions, no unused variables/libraries, etc. Use your judgment to assess these criteria. 3. Code robustness (5%): Your program should not throw any errors while processing. You can safely assume that the user will not enter any garbage input. 4. Submission instructions (5%): Zip your java files into AndrewId- hw3.zip. Do not submit any other folders, class files, test file, text files, and rest of your kitchen sink! Only last submission will be graded. Wrong files, incorrect package name, etc. may cost some points. NO LATE SUBMISSIONS PLEASE! If you are unable to submit on time, you lose all the points. Please avoid last minute submission as Canvas may decide to quit on you! Learn to trust technology only to the extent you should! Do not take that risk! I will not accept late submission. Good luck. JTW Problem Statement Solution Design
Answered 5 days AfterDec 05, 2022

Answer To: 95712-Fall 2022 HW3 Problem Statement In CyberCop 3.0, you will add the following new...

Aditi answered on Dec 06 2022
37 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here