In: Computer Science
Use starUML to solve the problems.THX
Problem
Create a domain model for this system.
Virtual Safari is an augmented reality game similar to Pokémon Go.
A virtual jungle is populated by several kinds of agents: hunters (equipped with a smart phone containing a GPS device), monster factories, and ammo factories.
Agents have locations. These locations correspond to actual locations on a Google Map.
As a hunter moves, his location is updated. All nearby factories are displayed.
If a hunter is very near an ammo factory, he may request and receive 10 bullets (per hour) or he may purchase any number of bullets. (When this happens the hunter's account is debited.)
If a hunter is very near a monster factory, the factory waits a random time interval, spawns a monster, and then displays it to all very near hunters.
A monster has a type. The type of the monster tells the monster's name (e.g., Charmander, Squirle, Metapod) and integer value. The bigger the value, the harder it is to kill that type of monster.
Elite factories produce high-value types of monsters. They are rare and produce monsters infrequently.
A hunter can shoot a bullet at a monster. If enough bullets hit the monster, the monster is killed and added to the hunter's trophy room. The hunter's status is the sum of the values of all monsters in his trophy room.
Domain model for VIRTUAL SAFARI GAME
The above domain model contains the following Classes:
1. Virtual Jungle
2.Smart Phone
3.Agent
4.Google Maps
5.Factory
6.Ammo Factory
7.Monster factory
8.Elite Factory
9.hunter
10.Monster
11.Bullet
Each class has its own attributes and Operations guided by the virtual safari game
All classes connected by suitable ralationships of UML
We used the following relation ships:
1.Dependency:-----------> it is a Using relationship between two classes( Example Agent and smart phone)
2. Asoosciation:__________. It is a structural Relationship( between Google map and Agent)
3.Aggregation : A specialized association to represent Whole to part relationship
4. UNi Associaction: One directional Association( Hunter and Monster)
5.Generalisation: it is inheritance relationship( Factory AND DIFFERENT TYPES OF FACTORIES, AGENT AND ITS TYPES)