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
GUI-Based Application Objectives:   (1)   Learning how to write a GUI-based application in Java. (2) Learning how to write an event driven application program in Java.

Project Description: I require some android developers in order to outsource projects. I am looking for good price and good quality. Skills required: Java, Android

Explain about Drawing Lines? Drawing straight lines along with Java is easy. Just call g.drawLine(x1, y1, x2, y2) where (x1, y1) and (x2, y2) are the endpoints of your lines

A easy expression language used by a JavaServer Faces UI component tag attributes to bind the associated component to a bean property or to bind the associated component's value to

Use a while loop to count down from 100 and display all the numbers in the * following pattern (you have to figure out what the pattern is - don''t go below 0): * 100 99 97 94


The benefits of Spring are as follows: ? Spring has layered architecture. Use what you require and leave you don't require now. ? Spring Enables POJO Programming. There is no

Elaborate the ‘+ ' operator and its constraints along with the help of examples? The + Operator Used on Strings. The + operator could also be used to add string variables or te

The program: 2 classes one called Student, one called Grades Functional Requirements: Ask for how many students u need to enter the program must: prompt the user to enter the

Determine about the runtime Security Manager Java also has a runtime Security Manager can check which operations a specific piece of code is allowed to do. Consequently, java c