Difference between revisions of "CreateCity"
From CMSC 420
(Created page with "Creates a city (a vertex) with the specified name, coordinates, radius, and color (the last two attributes will be used in later project parts). A city can be successfully cre...") |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | Creates a city (a vertex) with the specified name, coordinates, radius, and color (the last two attributes will be used in later project parts). A city can be successfully created if its name is unique (i.e., there isn't already another city with the same name) and its coordinates are also unique (i.e., there isn't already another city with the same | + | Creates a city (a vertex) with the specified name, coordinates, radius, and color (the last two attributes will be used in later project parts). A city can be successfully created if its name is unique (i.e., there isn't already another city with the same name) and its coordinates are also unique (i.e., there isn't already another city with the same '''(x,y)''' coordinate). Names are case-sensitive. |
== Parameters (In output order) == | == Parameters (In output order) == | ||
Line 8: | Line 8: | ||
* color | * color | ||
− | == Possible <output> == | + | == Possible ''<output>'' == |
− | ( | + | * (None) |
− | == Possible <error> types (In priority order) == | + | == Possible ''<error>'' types (In priority order) == |
* duplicateCityName | * duplicateCityName | ||
* duplicateCityCoordinates | * duplicateCityCoordinates | ||
− | == <success> Example == | + | == ''<success>'' Example == |
<code> | <code> | ||
− | + | <success> | |
− | + | <command name="createCity" id="1"/> | |
− | + | <parameters> | |
− | + | <name value="Annapolis"/> | |
− | + | <x value="12"/> | |
− | + | <y value="14"/> | |
− | + | <radius value="15"/> | |
− | + | <color value="red"/> | |
− | + | </parameters> | |
− | + | <output/> | |
− | + | </success> | |
</code> | </code> |
Latest revision as of 16:16, 30 September 2013
Creates a city (a vertex) with the specified name, coordinates, radius, and color (the last two attributes will be used in later project parts). A city can be successfully created if its name is unique (i.e., there isn't already another city with the same name) and its coordinates are also unique (i.e., there isn't already another city with the same (x,y) coordinate). Names are case-sensitive.
Parameters (In output order)[edit]
- name
- x
- y
- radius
- color
Possible <output>[edit]
- (None)
Possible <error> types (In priority order)[edit]
- duplicateCityName
- duplicateCityCoordinates
<success> Example[edit]
<success>
<command name="createCity" id="1"/>
<parameters>
<name value="Annapolis"/>
<x value="12"/>
<y value="14"/>
<radius value="15"/>
<color value="red"/>
</parameters>
<output/>
</success>