Professional Documents
Culture Documents
Lab 2
Lab 2
WORK
THE BIG PICTURE
¡ URL: https://bit.ly/38NIOHX
¡ Analyzing data
¡ Testing
TASK
¡ Does your program make certain assumptions? Can you remove any unnecessary assumptions
so that your program will work with any data sets with the same structure?
¡ Does your program contain inefficient code (in terms of algorithm complexity and operations)?
LAB 2: SEP 20 – 24
Creating classes, implementing the Comparable interface, and managing a collection of objects
LAB 2: LEARNING OBJECTIVES
¡ The PropertyAssessment class (and its supporting classes) represents a single property
assessment and implements the Comparable interface by assessed value
¡ The PropertyAssessments class manages a collection of property assessment objects
and their statistics canbewholedatasetofcity
orjusttheneighbourhood
¡ Each class must override toString, equals, and hashCode methods when appropriate
¡ The Main class serves as client code and runs the application
LAB 2: EXPECTED BEHAVIOUR
¡ Find a specific account number and display the property assessment for that account
¡ How can you identify related fields/attributes and group them into supporting classes? Hint:
see if a field is useful only with other field(s).
¡ How can you design the Main class and other classes so that they have separate
responsibilities:
¡ The Main class handles interaction with users
¡ Other classes manage the property assessment data
PropertyAssessments Java Application
PropertyAssessment Class (Main)