/Apartments

A Java project developed by students during the Java course taught at Université Paris-Dauphine (in MIDO L3 Apprentissage).

Primary LanguageJavaOtherNOASSERTION

Apartments

Build Status Codefactor "License MIT

A Java project developed by students during the Java course taught at Université Paris-Dauphine (in MIDO L3 Apprentissage).

The code is hereby published under the MIT License, with their permission.

Java iteration 🏃

Summary per person

  • Etienne CARTIER

  • Clémence COUSIN

    • Creation of the Apartment Factory

    • Cleaning of the value function package, designing profiles and adapting the computation of the value function

    • Contribution to the developpment of the QuestionPriceArea class (and unit tests)

    • Improving the jsonConvert class in collaboration with Avi

    • Resolving issues : on jsonConvert, apartments and value function class

  • Gabriel GUISSET

    • Cleaning of the project dependancies

    • Creation of the Apartment Factory and associated tests with Clémence

    • Cleaning of the code with sonar plug-in

    • Correction of the XML Apartment import logic

    • Generalize the usage of ApartmentBuilder

    • Creation of the LinearAVF class

    • Fix the reset of each Builder on a toBuild() call

    • Development of the Profile Selector GUI

  • Morgane FIOT

    • Creation of jsonConvert class

    • Fixing issues and warning

    • Creation of a base of apartment in json

    • Working on the GUI

  • Avi MIMOUN

    • Github configuration (actions, travis, rights, rules, collaborator)

    • Dependencies improvement

    • Implementation of JAX-RS

    • Generation of random addresses : API call, json analysis and parsing, error handling, solution in case of failure, probability of failure of functions and application

    • Creation of the exception class AddressApiException

    • Creation of the QuestionPriceArea class

    • Implementation of an adapter for JsonConvert

    • Help to generate 500 random apartments

    • Implementation of google-java-format

    • Creation and organization of the apartment.xml package

    • There was a main class which was a test class: Removal of the hand, implementation of unit tests, deletion of the documentation attached to the hand

    • Overall improvement for maintainability of the application: comments, javadoc, redundancy removal, deleting unnecessary and unsued code, unit test

    • Help on writing comments associated with the value function

    • Generalization of ApartmentValueFunction and LinearAVF

    • (Integration of a Discord bot, in order to receive notifications directly)

Iteration 4

Team 1

Realizations
  • Reduce downloads during Github Actions (fix #47)

  • Profile

    • Creation of QuestionPriceArea class (#45)

    • Creation of the ProfileType and ProfileManager classes (#52)

    • Replacement of the 10 attributes by EnumMap (#58)

    • Change of setWeight to withWeight in Profile (fix #50)

    • Changing the clone-based approach (fix #51)

  • LinearAVF and ApartmentValueFunction:

    • LinearAVF improvement : redundancy removal and fix bug (fix #49)

    • Replacement of the 10 attributes by EnumMap (#56)

Team 2

Realizations
  • Creation of ProfileGUI

  • Creation of QuestionPriceAreaGUI

  • Use of the data entered to sort the apartments #25

Team 3 (SM/PO)

Realizations
  • Creation of milestone 4

  • Reviews

  • Support to teams (point to develop in the iteration depending on the needs of the different teams)

Get started ✨

Make sure you have installed java 11, git and maven

💡

Useful links:

  1. Clone the application

    git clone https://github.com/oliviercailloux/Apartments.git
  2. Run unit tests

    cd Apartments/
    mvn test
💡

We advise you to use SonarLint

SonarLint is an IDE extension that helps you detect and fix quality issues as you write code.

Documentation 📙

  • Project documentation and UML iterations can be found in the directory Doc/

Code style 📄

In order to meet the greatest needs and not to restrict development to a common IDE, we have integrated google-java-format

In this sense, google-java-format is a program that reformats Java source code to comply with Google Java Style Guide.

The advantage of using this program is that it can be integrated as:

In this project, we have integrated:

  • CLI, I recommand this command : java -jar /putYourPath/toFile.jar --replace $(git ls-files *.java).
    It works on Windows (PowerShell), Linux and MacOS

  • a maven plugin (in the pom file): coveo/fmt-maven-plugin : allows you to format the code for each build with mvn of the application (locally). For example, by performing a mvn test, you will have the return of your tests as well as your formatted code. see on maven central

    💡
    You can use mvn fmt:format, mvn compile, mvn build, mvn test or any command who calls build (mvn fmt:check allows to check if files are to be formatted)

We also assume that formatting is done with the optimization of imports

I personally don’t recommend the use of plugins for IDE because it requires user configuration, those which can cause problems (import optimizations and others). However, the use of plugins for IDE remains completely personal to each developer 👨‍💻.

Moreover, you can also use Git Hooks by configuring the use of pre-commit so that your code is directly formatted with each commit.

🔥
Be careful of :
  • Executing a main method or unit tests from an IDE does not involve calling maven. On some IDEs, it’s possible to specify that you want to use maven (instead of the internal IDE system), but this is not the case by default.

  • Check that the version of fmt-maven-plugin and other integrations remains the same!

Repository available on Github :octocat:

Contributors 👨‍💻


Olivier Cailloux

💬 🤔 📖 👀 🚧

License 📝