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
What is the difference between a while statement and a do while statement? A while statement checks at the starting of a loop to see whether the next loop iteration should occu

Development of an Android app urgent Project Description: I am searching for some good android developer who has depth in knowledge of making an app. I am focusing on a certa

Struts is a framework with set of co operating servlets, classes and JSP tags that create a reusable MVC 2 design.     1. Client (Browser) : A request from the cli

Defines to keeping all the related members together in an object. Specifying member variables as private may hide the methods and variables. Objects should hide their inner working

Explain Animate gifs? We can save 16 gif images of the previous instance in a single file in the form of an animated gif, and then used it in a regular tag to display a movi

Use a FOR loop and give me the largest number divisible by 7 11 13 17 use the number from 1 to 10000 (or even 100000)

Explain different way of using thread? The thread could be executed by using runnable interface or by inheriting from the Thread class. The former is more advantageous, 'cau

Question: (a) State and explain clearly FIVE new features of Actionscript 3.0 as compared to Actionscript 2.0. (b) Explain clearly the concept of events and events listen

Overall Requirements Every phone number is broken up into sections as shown below: Country Code Area Code Prefix Line Number 1 919 882 5000 Write a program to separate out a ph

Depicts the typical communication between external users and the system. The emphasis is on what a machine does rather than how it works it. A use case is a summary of scenarios fo