Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

LABORATORY

WORK
THE BIG PICTURE

Individual Assignments Milestone 3


40% 15%
INDIVIDUAL PROJECT

¡ Dataset: Edmonton Property


Assessment (Current Year)

¡ Source: Edmonton’s Open


Data Portal

¡ URL: https://bit.ly/38NIOHX

Image source: http://yeg-assess.dha.io/


LAB 1: SEP 13 – 17
Processing and parsing a CSV file, writing static methods, analyzing data, and testing
LAB 1: LEARNING OBJECTIVES

¡ Getting started with Java

¡ Reading and processing a CSV file (Property_Assessment_Data_2021.csv)

¡ Writing static methods

¡ Exploring the Java library

¡ Analyzing data

¡ Testing
TASK

Write a Java application to analyze Property_Assessment_Data_2021.csv (available on


Blackboard) and answer the following questions:
¡ How many records are in the data set?

¡ What is the lowest and highest assessed value in Edmonton?

¡ How many wards are in Edmonton?

¡ What are the property assessment classes in Edmonton?


THINGS TO CONSIDER

¡ How can you break down the complexity of your program?

¡ How do you test the correctness of your program?

¡ 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

¡ Designing and creating classes

¡ Overriding the toString, equals, and hashCode methods when appropriate

¡ Implementing the Comparable interface

¡ Managing a collection of objects


CLASS DESIGN

¡ 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

See demo during the lab:


ofobis
¡ Ask the user for a filename yawagotagyiddle
y
¡ Display descriptive statistics of all data (n, min, max, range, mean, and median)

¡ Find a specific account number and display the property assessment for that account

¡ Display descriptive statistics of a specific neighbourhood


EXAMPLE OF
PROGRAM OUTPUT
EXAMPLE OF
PROGRAM OUTPUT
EXAMPLE OF
PROGRAM OUTPUT
THINGS TO CONSIDER

¡ 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)

Other supporting classes…

Processing CSV file Getting user input


Managing a collection of property assessments Presenting output to user

Rule of thumb: these classes should not


contain any print statements (unless for
debugging) or those that ask for user input

You might also like