I am currently working with an array list of a movie rental store. I am trying to make a parameter of movieID,renterID, and movieName. I would like to make all of these one method when I run the program, so the user can input 1 or 2 or all 3 of these parameters. Is this possible to do this from one method/if so, how? Also, can I make it where java accepts a blank as a null instead of having the user type null? The specific code I am working with is below.
public void methodOverloading(int MovieID, long RenterID)
{
System.out.println();
this.printMovieInforForMovieID(MovieID);
this.printMovieInforForRenterID(RenterID);
}
public void methodOverloading(int MovieID, String MovieName)
{
System.out.println();
this.printMovieInforForMovieID(MovieID);
this.printMovieInforForMovieNameContaining(MovieName);
}
public void methodOverloading(long RenterID)
{
System.out.println();
this.printMovieInforForRenterID(RenterID);
}
public void methodOverloading(long RenterID, String MovieName)
{
System.out.println();
this.printMovieInforForRenterID(RenterID);
this.printMovieInforForMovieNameContaining(MovieName);
}
public void methodOverloading(String MovieName)
{
System.out.println();
this.printMovieInforForMovieNameContaining(MovieName);
}
this