Implement a java class, JAVA Programming

Your first task is to implement the Movie class to store all the relevant information on a single DVD Movie, including its catalog number, title, year of release, rating, rental period, and rental cost. This class should include all the "usual" sorts of methods for constructing, accessing its contents, and returning a description of itself.

It must also include an equals() method that is used by the linked list code to see if two movie items are the same. This is a standard Java method, and must be declared as:

public boolean equals(Object other)

Note the parameter is of type Object, not specifically Movie, since it is quite possible that it may be called to compare objects of different types (which are clearly not equal!). Hence your code must first check if other is a Movie object. Hint. look at how to use the Java instanceof operator, before you then attempt to check whether all their respective key attributes (title, year etc) are equal, in order to decide whether they are the same or not.

At this point you should spend some time thinking about the design of this class, what attributes and methods it needs to meet the stated requirements, as shown in a UML diagram for this class.

You should also include in this class a simple test main() method that creates and displays a few example Movie objects, and also checks whether they are equal or not.  When submitted, your code will be compiled and then run from the command-line as follows, with no further input supplied or to be expected, as follows: java Movie

You should also create an ass3.txt plain text file with line-breaks, that includes commentary on your program design and testing. For this task, provide details on your design decisions for this class, it's UML diagram, some discussion on how you decided on the values used by the test main() method, and show how you have tested this class and satisfied yourself that the output produced does indeed prove that your code works correctly.

Posted Date: 2/27/2013 6:58:29 AM | Location : United States







Related Discussions:- Implement a java class, Assignment Help, Ask Question on Implement a java class, Get Answer, Expert's Help, Implement a java class Discussions

Write discussion on Implement a java class
Your posts are moderated
Related Questions
Create an online multiple-choice quiz using JSP/Servlets technology. The quiz should draw questions from an array of predefined questions (at least fifteen). You should use a meani

Data integrity helps to make sure if something is communicate and not tampered with in the mean while when transmission take place. Checksums: Simply inserts the bytes withi


What is image processing? It field of computer whereas we enhance and manipulate the graphics. Like it is used to recover old photograph and through processing we can revive

iam trying to build an application that store information like name mobile age in a file its like a registration form everytime i enter a new person data i want the applicaion mak

Name Conflicts when importing packages It is possible which you will try to import a package which contains classes in which have the similar name as a class in your own source

Support for Web and Enterprise Web Applications Java offers an extensive support for the development of web and enterprise applications Servlets, JSP, Applets, RMI, JDBC, EJBs

Are you real? I dont want to get help from a computer

Opengts Geozone violation alerts Project Description: I am seeking a very reliable, articulate and an experienced Java and MySQL developer to customize the Device Communicati

Need an engineer who has knowledge working on Flex Reporting tool. Who knows how data needs to be taken care of from DB, SharePoint, ERP and then process using logic/intelligence u