Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Media Item Equality: Defining Equality for Java RWOs - writing a .equals() method for Medialtem Song International Software want to get into the Media Song
Media Item Equality: Defining Equality for Java RWOs - writing a .equals() method for Medialtem Song International Software want to get into the Media Song Market with utilities for managing mp3 songs and playlists. To start with they have identified that they need a class to create objects for storing information about songs. This class is called Medialtem and at the moment it only hold information about the title of a song - pretty basic eh? As part of the requirements it has been determined that the software needs to 'know' if two tracks are the same - initially this will be done on the title. It is your task to write a .equals() method for the Medialtem class. This is the required 'business logic': The .equals() method should return true if the title fields match with the object being compared. The match should ignore the case of the strings, and ignore any whitespace at the beginning or end of the strings. The .equals() method should return false if the title field of the object being compared doesn't meet the above criteria or if it is null or of a different type \}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started