Customer This class should now implement the Comparable interface. Customer instances should be ordered by their last name, then first name, and finally the name of their associated building. toString() - Add this method that returns a String with the following format: , Reading This class should now implement the Comparable interface. Reading instances should be ordered by their timestamp. XmlHandler The following methods should be updated: startElement() - The handler logic should be modified such that it can now create and associate Customer, Building, Room, Device, and Reading objects. endElement() - Modify this method such that the current customer instance is added to the ArrayList of customers when a closing customer element is encountered. No hand written and fast answer please
Customer
This class should now implement the Comparable interface. Customer instances should be ordered by their last name, then first name, and finally the name of their associated building.
toString() - Add this method that returns a String with the following format: <lastName>, <firstName>
Reading
This class should now implement the Comparable interface. Reading instances should be ordered by their timestamp.
XmlHandler
The following methods should be updated:
startElement() - The handler logic should be modified such that it can now create and associate Customer, Building, Room, Device, and Reading objects.
endElement() - Modify this method such that the current customer instance is added to the ArrayList of customers when a closing customer element is encountered.
No hand written and fast answer please
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images