Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace PrIn_LabRab5
- {
- public class Student : Person
- {
- /*Успеваемость в процентах, от 0 до 100*/
- private const float theWorst = 0f;
- private const float theBest = 100f;
- private float performance;
- public Student(string firstName, string secondName, float performance, int dayOfBirth = -1, int monthOfBirth = -1, int yearOfBirth = -1) : base(firstName, secondName, dayOfBirth, monthOfBirth, yearOfBirth)
- {
- if (performance < 0)
- {
- this.performance = theWorst;
- }
- else if (performance >= 100)
- {
- this.performance = theBest;
- }
- else
- {
- this.performance = performance;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement