/// <summary>
        /// Returns a bonus counter by <paramref name="gradingType"/>.
        /// </summary>
        public static BonusCounterType GetBonusCounter(GradingType gradingType)
        {
            switch (gradingType)
            {
            case GradingType.Base:
            {
                return(new Base());
            }

            case GradingType.Gold:
            {
                return(new Gold());
            }

            case GradingType.Platinum:
            {
                return(new Platinum());
            }

            default:
            {
                throw new ArgumentException("This type of gradation does not exist.", nameof(gradingType));
            }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// <see cref="GradingRate"/> クラスの新しいインスタンスを初期化します。
        /// </summary>
        /// <param name="keyJP"> 日本語の項目名。 </param>
        /// <param name="keyEN"> 英語の項目名。 </param>
        /// <param name="percentage"> 割合を表す値。 </param>
        /// <param name="gradingType"> 評価の種類。 </param>
        public GradingRate(string keyJP, string keyEN, decimal?percentage, GradingType gradingType)
        {
            this.JPKey      = keyJP;
            this.ENKey      = keyEN;
            this.Percentage = percentage;

            this.GradingType = gradingType;
        }
Exemplo n.º 3
0
 /// <summary>
 /// Inintializes a new instance.
 /// </summary>
 public BankAccount(int id, string ownerName, string ownerSurname, double amount, int bonusPoints, GradingType gradingType)
 {
     this.Id           = id;
     this.OwnerName    = ownerName;
     this.OwnerSurname = ownerSurname;
     this.Amount       = amount;
     this.BonusPoints  = bonusPoints;
     this.TypeGrading  = gradingType;
 }
Exemplo n.º 4
0
 /// <summary>
 /// The <see cref="GradingType"/> used for grading the assignment.
 /// </summary>
 /// <param name="type"></param>
 /// <returns>This builder.</returns>
 /// <remarks>If unspecified, this field defaults to <see cref="GradingType.Points"/>.</remarks>
 public AssignmentBuilder WithGradingType(GradingType type)
 {
     return(Put("grading_type", type.GetApiRepresentation()));
 }