This directory contains the project duck simulator for SWE_4502 Design Project. The Task is as follows:
- First they have to create a Quackable interface. Some Ducks that implement Quackable Interface
- After that they will create an adapter to adapt a goose to a duck.
- Next for some research purpose we want to count the number of quacks of a duck. They will create a decorator that gives the ducks this new behavior by wrapping them with a decorator object.
- Create a duck factory and a counting duck factory.
- To create a flock of ducks use a Composite Pattern that allows us to treat a collection of objects in the same way as individual objects (use iterator).
- We also need to track individual ducks. Can you give us a way to keep track of individual duck quacking in real time? (use observer)
This system makes use of github actions for testing
To run this application in your local machine preferably download the apache maven binary or use intelliJ.
-
Download the apache maven binary from the following link: Apache Maven
-
Extract the downloaded bin file and then add the path to bin folder within the extracted directory to your system environment variables
-
For VsCode you can get the "Maven for Java" extension provided by Microsoft to get the flavors of IntelliJ
-
Upon adding to the system environment variables you can check using
mvn --version
To confirm your installation.
- Then just go to the cloned/downloaded project directory and write
mvn clean install
- To execute the code just simply write
mvn exec:java
It will essentially execute the main class
- Install maven simply by using
sudo apt-get install maven
- Follow steps 3 to 6 for Windows
For MAC installation, you can refer to this article