Project #27786 - Objects and String (JAVA)

This homework assignment is for a intro to computer science course so please keep the code basic, simple, and with comments. :^)



1) Complete the Java Release class ( representing a movie. The class should represent a 

movie release with a title, the country and a date of release. You should create instance or static 

variables and methods to support the operation of the following FindRelease program. 

There is one restriction: 

All instance variables in the Release class must be private. Static variables do not have to be private. Page 2 of 3


2) Complete the Java FindRelease program that uses to read the data and sorts the movie 

releases based on the command line arguments. A part of the program that handles processing input has 

been written for you. 

The first command line argument is the name of the text file release extracted from the Internet Movie 

Database (IMDB). The text file has the following format: 

Movie_name country day month year 

For instance: 

2006 Pacific Life Holiday Bowl (2006) (TV) USA 28 December 2006 

3 Geezers! (2013) Finland 12 March 2014 


Observe that data fields are separated by tab characters. Nonetheless, each raw data field has been 

processed for you in the for loop. You can use the values stored in String variables title, country, dayStr, 

monthStr, and yearStr to construct the Release object. 


 The second command line argument is the option determining how the releases should be sorted and 

output to the terminal. 

If the option is “titleA”, the releases should be sorted by title lexicographically in ascending order. 

If the option is “titleD”, the releases should be sorted by title lexicographically in descending order. 

If the option is “dateA”, the releases should be sorted by date A in the ascending order. 

If the option is “dateD”, the releases should be sorted by date D in the ascending order. 

You CANNOT use the built-in compareTo method of the String class (Java String API). 


The output format should be: 

movie_title year month day 


Hints and additional information 

1) It is highly recommended that you use a sorting algorithm to perform sorting. 

Please read example in the classcode directory for Monday, Apr 14. 

2) You will most likely need only 1 constructor for the Release class. 

3) You can store the day, month and year separately as integer allowing for a more convenient 


4) Observe that the string monthStr contains the name of the month, not the numerical value of the 


5) You can create static methods to compare two objects or an instance method to compare this object 

with a parameter object in the Release class. 

6) You can redirect the output (I will demonstrate it in class) to check for the answer. 

7) You should try to run your program on fullRelease.txt (your program should not crash). 


Subject Computer
Due By (Pacific Time) 04/20/2014 12:00 am
Report DMCA

Chat Now!

out of 1971 reviews

Chat Now!

out of 766 reviews

Chat Now!

out of 1164 reviews

Chat Now!

out of 721 reviews

Chat Now!

out of 1600 reviews

Chat Now!

out of 770 reviews

Chat Now!

out of 766 reviews

Chat Now!

out of 680 reviews
All Rights Reserved. Copyright by - Copyright Policy