Git Product home page Git Product logo

farmsimulator's Introduction

Assignment 6

A program that simulates a farm.

Current implementation

Type gradle run in order to run main class Start.java

Early Design pattern Ideas

Early ideas planned for design patterns with this project

AbstractFactory for animals

Animals will be created using the AbstractFactory design pattern in order to easily create similar objects such as animals.

Decorator for farms

In order to make it easy to add upgrades to a farm, I will use the decorator pattern to make this easy.

Observer for messaging suppliers

The observer pattern will work well for farmers being able to sent messages to observers (suppliers)

Design patterns used

The design patterns that ended up being used in project

Factory for Animals

Animals are made using the factory pattern. There are 3 types of animals that can be made, pig, cow, and sheep. This pattern worked well becuase it gives the program much more flexibility if more animal types need to be added.

Mediator for Farm Manager and cycles

Mediator pattern worked well for informing components in the program of when a cycle changed

Decorator for Animal Affinities

Using the decorator pattern really helped to easily and dynamically add different features to animals

farmsimulator's People

Contributors

arossiter0 avatar

Watchers

 avatar

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.