Giter VIP home page Giter VIP logo

propertylist's Introduction

PropertyList Background

To create/maintain a property list, this application creates a TreeSet of properties. A CSV file can be used to import the database. The TreeSet can be updated as well as exported to CSV format. This was inspired by my experience working at a social housing management organisation that used an Excel spreadsheet to manage a master list of properties. With over 30,000 properties in the property stock, using Excel to retrieve and update data was not an easy task.

Description

A Housing association works with a database that contains a CSV file of all the properties that it manages. Each property has a set of attributes which, for simplification, I have narrowed down to the following four:

  • name (first line of the address)
  • size (number of bedrooms)
  • type (what type of resident it is, whether it is a tenant, leaseholder, or freeholder. A leasehold is the ownership over a property for a limited lease (40 years+), whereas a freehold means absolute ownership over the property and the land it stands on).
  • garage (whether the property has an integral garage or not). The above attributes are stored in such a way where every row contains one property and its property in the CSV file.
    For this scenario, a members class Property and an organisation class HousingManagement will be created.
Class representing a member : Property

Property has the instance variables:

  • name and type of type String.
  • size of type integer.
  • arage of type Boolean. The class will have a constructor, getter and mutator methods for every instance variable and equals, hashCode and toString methods. The class implements the Comparable interface, and the assumption will be made that properties are unique so they can be sorted on the name field.
Class holding the membership database :  HousingManagement

HousingManagement will have a TreeSet of Property. The TreeSet will be named 'properties' and will have methods that can read and write from/to the CSV file. HousingManagement will also contain methods to add, delete, update, and remove the whole set. Another possible method could create a new set of properties based on property type and print the new set sorted by name.

A TreeSet does not keep duplicates and sorts the set automatically. This is very useful in the example of the Housing association as properties are unique and will be sorted based on the property name. It will make sense to sort by name or by name and size of properties. If we sort based only on size, this will only show one property for each property size and this is not what we are looking to achieve.

propertylist's People

Contributors

chriscarnold avatar

Watchers

 avatar

Forkers

vicky9bp

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.