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
COMPSCI220S2C2012 Assignment 1 due 8 August 8:30 pm This assignment introduces you to an example of applied algorithm analysis and shows you why, sometimes, compromises in an algor

Pick your favorite geometry formula (e.g., area of a square, perimeter of a triangle …) and implement it in Java. Demonstrate your code compiles and runs without issue (You can use

Liferay Especialist and Java Programmer Project Description: We require to make a full functional Portal with online tools. JSF, Java, Portlets, Skills required: CSS

i am doing java and want projects with solutions to practice more and more


Explain Testing Objects for Equality in java? , = can only be used with numbers and characters. They cannot be used with Strings, booleans, arrays or other compound types sin

Create an application for an animal-fur trimming service. The business is open 15 weeks of the year, from April through July. The fee for a small animal (under 6 pounds) is $100, a

In this assignment you will create a graphical reverse polish notation calculator using a stack data structure.  A reverse polish notation calculator allows you to perform chain ca

Need support Display TIFF in Internet Explorer without ActiveX plugin I would like to get a client side viewer designed that permits user to view TIFF files on IE 8 and IE 9 bro

How many iterations would this ‘for' loop run for? for ( x = 50 ; x document.write ( x ) ; } Answer: 50 iterations