, ,

[SOLVED] SER222 Assignment 5a/b – Design Patterns

$25

File Name: SER222_Assignment_5a/b_-_Design_Patterns.zip
File Size: 376.8 KB

Categories: , ,
5/5 - (1 vote)
C5IzMn6Zqins-FarmDesignPattern

Assignment 5a/b – Design Patterns
Version: November 3, 2023
Requirements
Below are some of the functional requirements for the application. As stated in the general
document, you do not have to fulfill all requirements. Your similarion should stay in this
“universe” but you can be creative with your ideas what exactly you want to do.
Super Landwirtschaft Universum
A new world must start with at least 1 farm.
Farms can be of different types, such as an animal farm, a crop farm, a hybrid farm
and so on. You can choose to make something up too.
The simulation should run on cycles. A cycle is considered to be of 2 parts – 1 day
time and 1 night time.
A farm can run on seasons, which can have effects on animals and crops.
Passive currency is earned with each new day (not night). This passive currency
income is generated from selling crops or animal products, or both depending on
your farm.
More currency can be made from farmer, animal or crop affinities (examples below).
Farms are automatically upgraded once the farm has acquired enough currency. This
could mean that the farm is expanded to grant it more land, which allows it to hold
a greater numbers of farmers, animals and crops. The upgrade may also increase the
passive currency income. In order for the simulation to not run into issues, it might
be a nice idea to make sure the farm only upgrades once your farm has acquired 20%
(choose any % you like though) more than the cost of an upgrade. So, if an upgrade
costs $1000, it will automatically upgrade at $1200 so the farm still has $200.
Up to 6 farmers may start on a single farm with more farmers being hired every few
cycles (this is your choice). Once a farm reaches its capacity of 10 farmers, then a
new farm must be created by 3 of those farmers.
Farmers can have affinities for things such as (these are some examples to give you
ideas):
Being better at growing crops
Being better at rearing animals
Possess a certain money-making skill
Animals reside on farms; it is up to you to decide the total number of animals that
your farm(s) will hold. Think of typical farm animals such a cows and pigs, but you
can be creative if you wish.
Animal product (milk, wool, and so on) is replenished after every 2nd day during
the day cycle. For example, if a sheep is sheared for its wool then the farmers must
wait 2 cycles (day and night) to collect the wool again.
Similar to farmers, animals have affinities too (these are some examples to give you
ideas):
A horse could be especially fast (higher chance for a person to win a race)
A cow may be larger than usual and produce more milk
A sheep may produce more wool
During night cycles predators come out.
Predators could be foxes or wolves that may attack/eat the animals
Predators could also be rabbits or some other animal that eats crops
Predators could also be moles that damage the soil
During the day, products can be sold, new farms created, animals be born etc. Lets
assume the positives happen during the day, the negative things in the night.
Animals have a chance to be born every 4 cycles (must have been alive at least 2
for the chance to occur). Alternatively, as an example, you could specify in your
simulation that you wish to spend a certain percentage of your total currency every
X number of cycles to buy more animals.
Animals live for 14 days unless killed by a predator or they become diseased. If
killed by a predator they disappear in that same night, if they become diseased they
have a chance to die in the next cycle (day and night), unless treated by a farmer.
Animal affinities may help with fighting the disease.
Animals have a natural life cycle just like in real life. They start as a baby where they
cannot produce anything for the first 3 days (but may still be killed by predators
and disease), and then after that they may produce until they die.
Crops are grown on farms and have a chance to become diseased. When this happens
they have a chance to wither and die within the next cycle (day and night), unless
treated by a farmer. Crop affinities may help with fighting the disease.
Crops may be harvested 1 time every 3 cycles.
The farmers on your farm are quite tech savvy, so when animals or crops die (or
harvested), an automatic message is sent to their supplier notifying them that they
need more stock.
Animals and crops cost currency to purchase. If your farm purchases animals or
crops in bulk then they may be bought at a discount depending on the quantity.
It is all pretty wide open and that is on purpose to give you more options and have you
come up with your own ideas. You can add your own requirements as long as we stay in
the “Farming” world. You can be as creative as you like here.
Some HINTS (not requirements):
You could use decorator pattern to append new affinities.
To build new farms for farmers you could use the factory pattern.
The simulation should be tick-based. (Mediator pattern). Each tick something
should happen, the farm(s) gain more currency, animals or crops die or are born/-
planted, etc.

Shopping Cart
[SOLVED] SER222 Assignment 5a/b – Design Patterns
$25