Search Results for

    Show / Hide Table of Contents

    Class Child

    Represents a child in a family.

    Inheritance
    object
    FamilyMember
    Child
    Inherited Members
    FamilyMember.FirstName
    FamilyMember.LastName
    FamilyMember.s_FirstNames
    FamilyMember.GetRandomFirstName()
    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.

    In This Article
    Back to top Green Revolution Code Documentation