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
Type casting defines treating a variable of one type as though it is another type. When up casting primitives as given below from left to right, automatic conversion happens. Bu

Describe toString() Methods ? Print methods are general in some languages, but most Java programs operate differently. You can use System.out.println() to print any object. The

Alia is appearing for the board exams. In order to qualify for the next class Alia need to get exactly X credits. In current semester Alia has to study N number of subjects, and ev

Spring comprises of seven modules. They are.. a) The core container b) Spring context c) Spring AOP d) Spring DAO e) Spring ORM f)  Spring Web module g)  Sprin

Open A java applet should appear on your screen. Click on File, OpenImage and select Asterix. Check Homography box. By clicking on the images you can select points. The c

Theobjectiveoftheassignment is tofamiliarize youwithinheritance, GUIand abstraction. Create anabstractclass named that includesprivatefields for the InternationalStandard BookNumbe

Explain Multiple Initializers and Incrementers ? Sometimes it's essential to initialize several variables before starting a for loop. Similarly you may need to increment more t

1. Obtaining the new script: Download and save the attached comment CGI mailer script form-mail2.pl to your server''s cgi-bin directory, and change the permissions on the script to

Ask questionWrite a program BruteForceSearch that uses the brute-force approach given above and compare its running time on your computer with that of Binary Search for largeW.txt

How Polylines draws in java language? Java automatically closes the polygons it draws. That is it draws polygons which look like the one on the right rather than the one on the