Implement a java class, JAVA Programming

Assignment Help:

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.


Related Discussions:- Implement a java class

Retrieving data from Excel file , how to retrieve data from Excel file, and...

how to retrieve data from Excel file, and display that data in table on jsp page?

How we can changing the implementation, How we can changing the Implementat...

How we can changing the Implementation ? Suppose the Car class requires to be used in a simulation of New York City traffic in that each actual car on the street is represente

Brute force search, how to implement brute foce in a program?

how to implement brute foce in a program?

Program to calculate the value into hours and minutes, Specifically, you'll...

Specifically, you'll create a program that will hold minutes worked and assign a value. Calculate the value into hours and minutes. Display the result as shown in Figure 2. Reme

Reading or writing disk files, For this assignment, you will simulate a fil...

For this assignment, you will simulate a file system. You will be neither creating files nor reading or writing disk files. Rather, you will have a simulation of a file system that

Package diagrams , To simplify complex class diagrams you may group classes...

To simplify complex class diagrams you may group classes into packages.

How can you describe a consistent web design, How can you describe a consis...

How can you describe a consistent web design? Why is it required? A consistent web design is Easy understandable, not along with heavy graphics, easy navigation. It is required

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd