本次Java Swing代写MVC要求通过GUI显示, 添加和搜索存储在文本文件数据库中的影片列表.
Assignment 4: Film Database Application Due date: Friday, 31st May 2019 at 5pm on BlackBoard.
This assignment is worth 10% of your final grade and has 100 marks in total.
Read this entire brief before starting your assignment.
Design and implement a film database application using MVC architecture. Use the provided FruitList GUI as a starting point.
Your application allows the user to display, add to and search a list of films stored in a text file database via a GUI:
- View the list of all films stored in the database
- Add new films to the list
- Delete existing films from the list
- Filter the list of films according to a search term
- Read a text file database when the application starts
- Save the text file database when the application exits
Start by downloading the assignment4.zip file available on Blackboard and import the project into your Eclipseworkspace. There is a fruitapp package containing five classes corresponding to the Model (Fruit and FruitList) View (FruitListPanel) and Controller (FruitListApp). The ReadFruitListData class has two static methods to load and read Fruit objects in a FruitList from the file fruitlistdata/fruits.txt
You will use these files as a starting point to creating your own film database application.
Your application must display a list of the titles of films in the database. Use appropriate Swing (JComponent-based) components to enable the user to input new films. The user may also select and remove films from the database.
Dr. Kenneth Johnson. Auckland University of Technology. Programing 2 Semester 1 2019 1
Filtering the list via a search term
Your application has a search input field to allow the user to enter a keyword. There are two buttons:
- Search: performs a search and displays only those films containing the search term in the title.
- Clear: clears the search bar and shows all films in the film database. Note that the search functionality does not remove any films from the database.
Text File Processing
Your application loads Film object data from the text file on startup to populate the GUI. When the application closes, the films are written to the text file. Modify the existing code in the ReadFruitListData class file.
- Your assignment must adhere to the MVC design pattern. Use the code in the provided assignment4.zip file as a starting point.
- Start by designing the models. You will likely need Film and FilmDatabase objects and perhaps other objects. Ask yourself: What data must we store? A list of films? Could any of the data be represented by enumerated types? Then ask: what functionality must we have? This helps you design objects with methods which implement the core functionality of the database and search.
- Design the structure of the text file. The ReadFruitListData class loads and stores Fruit objects but can easily be adapted to store films. Reuse this code.
- Design a method for searching the film database e.g. perhaps it returns a new FilmDatabase with films satisfying the search terms.
- Only after these activities are completed should you work on designing the graphical user interface.
Dr. Kenneth Johnson. Auckland University of Technology. Programing 2 Semester 1 2019 2
Grade Range: 100 ≥ x ≥ 80%
Grade Range: 80 > x ≥ 65%
Grade Range: 65 > x ≥ 50%
Grade Range: 50 > x ≥ 0%
Functionality of the database
OOP paradigm consistently used for implementation of all database functionality
Inconsistent use of OOP paradigm but correct implementation of database functionality
Poor use of OOP paradigm
Absent database functionality or code does not compile
Functionality of the view
Excellent design of GUI with good choice of JComponent layout. View class designed with OOP paradigm
Inconsistent/poor design of GUI. View class design with OOP paradigm
Poor class design or flawed GUI design
for the view class or code does not compile
Functionality of the controller
Controller provides an elegant implementation of the database functionality via the GUI. All functionality is implemented
Controller provides basic implementation of the database functionality via the GUI. All functionality is implemented
Controller provides flawed implementation of the database functionality via the GUI. All functionality is implemented
Absent implementation of functionality or code does not compile
Code Quality: Whitespace, Naming Reuse, Modularity, Encapsulation
Whitespace is comprehensively consistent. All naming is sensible and meaningful. Code reuse is present. Code is modular. Code is well encapsulated.
Whitespace is comprehensively consistent. Majority of naming is sensible. Code is modular. Code is encapsulated.
Whitespace is comprehensively consistent. Code has some modularity. Code has some encapsulation.
Whitespace is inconsistent and hence code is difficult to read.
Standards: Commenting, Submission and Javadoc
Entire codebase has comprehensive Javadoc commenting: tagging, class and method comments. Submission instructions followed.
Majority of the codebase features Javadoc commenting. Majority of methods are commented. Submission instructions followed.
Some Javadoc comments present. Some methods are commented. Submission instructions followed.
No Javadoc comments present. Submission instructions not followed.
- Your classes must have commenting of the form:
* Comment describing the class. * @author kjohnson studentnumber
- All methods must be commented with appropriate Javadocs metatags. For example:
* A comment to describe the method
* @param a parameter description
* @return a description of the returned result * @author kjohnson studentnumber
Dr. Kenneth Johnson. Auckland University of Technology. Programing 2 Semester 1 2019 3
- Use the export feature in Eclipse to export your java source code to an archive file with the naming format: Lastname-firstName-studentID.zip.
- Upload your archive file to the Blackboard system.
An extension will only be considered with a Special Consideration Form approved by the School Registrar. These forms are available at the School of Engineering, Computer and Mathematical Science located in the WT Level 1 Foyer.
You will receive your marked assignment via the Blackboard Grade Centre. Please look over your entire assignment to make sure that it has been marked correctly. If you have any concerns, you must raise them with the lecturer. You have one week to raise any concerns regarding your mark. After that time, your mark cannot be changed.
Do not email the lecturer because you do not like your mark. Only go if you feel something has been marked incorrectly.
All work submitted must be unique and your own – We use automated methods to detect academic integrity breaches.
Dr. Kenneth Johnson. Auckland University of Technology. Programing 2 Semester 1 2019 4
本网站支持淘宝 支付宝 微信支付 paypal等等交易。如果不放心可以用淘宝交易！
E-mail: [email protected] 微信:dmxyzl003