Class Child
Represents a child in a family.
Inherited Members
Namespace: Backend
Assembly: cs.temp.dll.dll
Syntax
public class Child : FamilyMember
Constructors
Child(string, string, int)
Create a child.
Declaration
public Child(string FirstName, string LastName, int Age)
Parameters
Type | Name | Description |
---|---|---|
string | FirstName | First name. |
string | LastName | Last name. |
int | Age | Age. |
Fields
Consumption
Annual wheat consumption of a child.
Declaration
public const int Consumption = 5
Field Value
Type | Description |
---|---|
int |
Properties
Age
Child's age.
Declaration
public int Age { get; }
Property Value
Type | Description |
---|---|
int |
Methods
IncrementAge()
Increment age of child. This does NOT handle growing up into an adult.
Declaration
public void IncrementAge()
ToAdult()
Create an adult version of this child with the same name. Should be invoked when the child turns 13.
Declaration
public Adult ToAdult()
Returns
Type | Description |
---|---|
Adult | An adult with the same name as the child. |