Project Media Rental System Before attempting this project, be sure you have completed all of the reading assignments, non- graded exercises, examples, discussions, and assignments to date. Design and...

1 answer below »
The assignment description is attached as a file.


Project Media Rental System Before attempting this project, be sure you have completed all of the reading assignments, non- graded exercises, examples, discussions, and assignments to date. Design and implement Java program as follows: 1) Media hierarchy:  Create Media, EBook, MovieDVD, and MusicCD classes from Week 3 -> Practice Exercise - Inheritance solution.  Add an attribute to Media class to store indication when media object is rented versus available. Add code to constructor and create get and set methods as appropriate.  Add any additional constructors and methods needed to support the below functionality 2) Design and implement Manager class which (Hint: check out Week 8 Reading and Writing files example):  stores a list of Media objects  has functionality to load Media objects from files  creates/updates Media files  has functionality to add new Media object to its Media list  has functionality to find all media objects for a specific title and returns that list  has functionality to rent Media based on id (updates rental status on media, updates file, returns rental fee) 3) Design and implement MediaRentalSystem which has the following functionality:  user interface which is either menu driven through console commands or GUI buttons or menus. Look at the bottom of this project file for sample look and feel. (Hint: for command-driven menu check out Week 2: Practice Exercise - EncapsulationPlus and for GUI check out Week 8: Files in GUI example)  selection to load Media files from a given directory (user supplies directory)  selection to find a media object for a specific title value (user supplies title and should display to user the media information once it finds it - should find all media with that title)  selection to rent a media object based on its id value (user supplies id and should display rental fee value to the user)  selection to exit program 4) Program should throw and catch Java built-in and user-defined exceptions as appropriate 5) Your classes must be coded with correct encapsulation: private/protected attributes, get methods, and set methods and value validation 6) There should be appropriate polymorphism: overloading, overriding methods, and dynamic binding 7) Program should take advantage of the inheritance properties as appropriate Style and Documentation: Make sure your Java program is using the recommended style such as:  Javadoc comment up front with your name as author, date, and brief purpose of the program  Comments for variables and blocks of code to describe major functionality  Meaningful variable names and prompts  Class names are written in upper CamelCase  Constants are written in All Capitals  Use proper spacing and empty lines to make code human readable Capture execution: You should capture and label screen captures associated with compiling your code, and running the a passing and failing scenario for each functionality Submission requirements Deliverables include Java program (.java files) and a single Word (or PDF) document. The Word/PDF files should be named appropriately for the assignment (as indicated in the SubmissionRequirements document. The word (or PDF) document should include screen captures showing the successful compiling and running of each of the test scenario. Test scenarios should include all required functionality of the program. Each screen capture should be properly labeled clearly indicated what the screen capture represents. Submit your files to project submission area no later than the due date listed in your online classroom. Grading Rubric: The following grading rubric will be used to determine your grade: Attribute Level (15-20 points) Level (5-15 points) Level 0 (0 - 5 points) Media hierarchy Correct or almost correct code to meet project requirements Mistakes in implementation Missing or significantly incorrect implementation Manager Correct or almost correct code to meet requirements Mistakes in implementation Missing or significantly incorrect implementation MediaRentalSystem: load data, find media, rent media Correct or almost correct code to meet requirements Mistakes in implementation Missing or significantly incorrect implementation Encapsulation, polymorphism, exception handling Correct or almost correct code to meet requirements Mistakes in implementation Missing or significantly incorrect implementation Program documentation and style, screen captures Correct or almost correct menu/GUI, program comments, identifiers, and screen captures Mistakes or incomplete menu/GUI, documentation and/or style, and screen captures Missing or significantly incorrect menu/GUI, documentation and/or style, or screen captures Sample User interface - command driven: Welcome to Media Rental System 1: Load Media objects... 2: Find Media object... 3: Rent Media object... 9: Quit Enter your selection : 1 Enter path (directory) where to load from: blah File cannot be opened: Could not load, no such directory Welcome to Media Rental System 1: Load Media objects... 2: Find Media object... 3: Rent Media object... 9: Quit Enter your selection : 1 Enter path (directory) where to load from: C:/tmp-umuc Welcome to Media Rental System 1: Load Media objects... 2: Find Media object... 3: Rent Media object... 9: Quit Enter your selection : 2 Enter the title: blah There is no media with this title: blah Welcome to Media Rental System 1: Load Media objects... 2: Find Media object... 3: Rent Media object... 9: Quit Enter your selection : 2 Enter the title: Forever Young EBook [ id=123, title=Forever Young, year=2018, chapters=20 available=true] MovieDVD [ id=126, title=Forever Young, year=2020, size=140.0MB available=false] Welcome to Media Rental System 1: Load Media objects... 2: Find Media object... 3: Rent Media object... 9: Quit Enter your selection : 3 Enter the id: 123 Media was successfully rented. Rental fee = $2.00 Welcome to Media Rental System 1: Load Media objects... 2: Find Media object... 3: Rent Media object... 9: Quit Enter your selection : 2 Enter the title: Forever Young EBook [ id=123, title=Forever Young, year=2018, chapters=20 available=false] MovieDVD [ id=126, title=Forever Young, year=2020, size=140.0MB available=false] Welcome to Media Rental System 1: Load Media objects... 2: Find Media object... 3: Rent Media object... 9: Quit Enter your selection : 3 Enter the id: 999 The media object id=999 is not found Welcome to Media Rental System 1: Load Media objects... 2: Find Media object... 3: Rent Media object... 9: Quit Enter your selection : 9 Thank you for using the program. Goodbye! Sample User interface - GUI: Above closed the window by pressing the X, results in below:
Answered 1 days AfterAug 09, 2021

Answer To: Project Media Rental System Before attempting this project, be sure you have completed all of the...

Shweta answered on Aug 10 2021
135 Votes
89399Solution/media.txt
MusicCD,124,Better Life,2021,140,true,2
MovieDVD,125,Rich Article,2000,130,false,1
MovieDVD,121,Rich Article,2020,105,false,3
EBook,123,Forever Young,2018,206,false,2
MovieDVD,122,Forever Young,2020,170,false,4
MovieDVD,1,Sweet Waters,1990,199,false,3
MusicCD,16,Last Words,1995,12,true,2
89399Solution/MediaRentalSystem/build/built-jar.properties
#Tue, 10 Aug 2021 19:50:27 +0530
C\:\\Users\\Acer\\Documents\\NetBeansProjects\\MediaRentalSystem=
89399Solution/MediaRentalSystem/build/classes/.netbeans_automatic_build
89399Solution/MediaRentalSystem/build/classes/.netbeans_update_resources
89399Solution/MediaRentalSystem/build/classes/mediarentalsystem/EBook.class
package mediarentalsystem;
public synchronized class EBook extends Media {
int chapters;
public void EBook(int, String, int, int, boolean, double);
public int getChapters();
}
89399Solution/MediaRentalSystem/build/classes/mediarentalsystem/Manager.class
package mediarentalsystem;
public synchronized class Manager {
java.util.ArrayList ebookMediaList;
java.util.ArrayList movieDVDMediaList;
java.util.ArrayList musicCDMediaList;
java.util.ArrayList mediaList;
String fileNameToLoad;
public void Manager();
public void LoadMedia(String) throws java.io.IOException;
public void FindMedia(String);
publ
ic void RentMedia(int) throws java.io.IOException;
public void UpdateMedia(String, int) throws java.io.IOException;
}
89399Solution/MediaRentalSystem/build/classes/mediarentalsystem/Media.class
package mediarentalsystem;
public synchronized class Media {
private int id;
private String title;
private int year;
private boolean available;
private double rentalPrice;
public void Media(int, String, int, boolean, double);
public int getID();
public String getTitle();
public int getYear();
public double getRental();
public boolean getAvailable();
}
89399Solution/MediaRentalSystem/build/classes/mediarentalsystem/MediaRentalSystem.class
package mediarentalsystem;
public synchronized class MediaRentalSystem {
public void MediaRentalSystem();
public static void main(String[]);
public static void show();
}
89399Solution/MediaRentalSystem/build/classes/mediarentalsystem/MovieDVD.class
package mediarentalsystem;
public synchronized class MovieDVD extends Media {
int size;
public void MovieDVD(int, String, int, int, boolean, double);
public int getSize();
}
89399Solution/MediaRentalSystem/build/classes/mediarentalsystem/MusicCD.class
package mediarentalsystem;
public synchronized class MusicCD extends Media {
int size;
public void MusicCD(int, String, int, int, boolean, double);
public int getSize();
}
89399Solution/MediaRentalSystem/build.xml

Builds, tests, and runs the project MediaRentalSystem.


89399Solution/MediaRentalSystem/dist/MediaRentalSystem.jar
META-INF/MANIFEST.MF
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.9.7
Created-By: 1.8.0_111-b14 (Oracle Corporation)
Class-Path:
X-COMMENT: Main-Class will be added automatically by build
Main-Class: mediarentalsystem.MediaRentalSystem
mediarentalsystem/EBook.class
package mediarentalsystem;
public synchronized class EBook extends Media {
int chapters;
public void EBook(int, String, int, int, boolean, double);
public int getChapters();
}
mediarentalsystem/Manager.class
package mediarentalsystem;
public synchronized class Manager {
java.util.ArrayList ebookMediaList;
java.util.ArrayList movieDVDMediaList;
java.util.ArrayList musicCDMediaList;
java.util.ArrayList mediaList;
String fileNameToLoad;
public void Manager();
public void LoadMedia(String) throws java.io.IOException;
public void FindMedia(String);
public void RentMedia(int) throws java.io.IOException;
public void UpdateMedia(String, int) throws java.io.IOException;
}
mediarentalsystem/Media.class
package mediarentalsystem;
public synchronized class Media {
private int id;
private String title;
private int year;
private boolean available;
private double rentalPrice;
public void Media(int, String, int, boolean, double);
public int getID();
public String getTitle();
public int getYear();
public double getRental();
public boolean getAvailable();
}
mediarentalsystem/MediaRentalSystem.class
package mediarentalsystem;
public synchronized class MediaRentalSystem {
public void MediaRentalSystem();
public static void main(String[]);
public static void show();
}
mediarentalsystem/MovieDVD.class
package mediarentalsystem;
public synchronized class MovieDVD extends Media {
int size;
public void MovieDVD(int, String, int, int, boolean, double);
public int getSize();
}
mediarentalsystem/MusicCD.class
package mediarentalsystem;
public synchronized class MusicCD extends Media {
int size;
public void MusicCD(int, String, int, int, boolean, double);
public int getSize();
}
89399Solution/MediaRentalSystem/dist/README.TXT
========================
BUILD OUTPUT DESCRIPTION
========================
When you build an Java application project that has a main class, the IDE
automatically copies all of the JAR
files on the projects classpath to your projects dist/lib folder. The IDE
also adds each of the JAR files to the Class-Path element in the application
JAR files manifest file (MANIFEST.MF).
To run the project from the command line, go to the dist folder and
type the following:
java -jar "MediaRentalSystem.jar"
To distribute this project, zip up the dist folder (including the lib folder)
and distribute the ZIP file.
Notes:
* If two JAR files on the project classpath have the same name, only the first
JAR file is copied to the lib folder.
* Only JAR files are copied to the lib folder.
If the classpath contains other types of files or folders, these files (folders)
are not copied.
* If a library on the projects classpath also has a Class-Path element
specified in the manifest,the content of the Class-Path element has to be on
the projects runtime path.
* To set a main class in a standard Java project, right-click the project node
in the Projects window and choose Properties. Then click Run and enter the
class name in the Main Class field. Alternatively, you can manually type the
class name in the manifest Main-Class element.
89399Solution/MediaRentalSystem/manifest.mf
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
89399Solution/MediaRentalSystem/nbproject/build-impl.xml















































































































































































































Must set src.dir
Must set test.src.dir
Must set build.dir
Must set dist.dir
Must set build.classes.dir
Must set dist.javadoc.dir
Must set build.test.classes.dir
Must set build.test.results.dir
Must set build.classes.excludes
Must set dist.jar




































































































Must set javac.includes




















































































































...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here