Write C# code to perform the following: Create TrainingStudent class & implement variables, make sure about traiffPoint input range using TraiffPoint property. Create two constructors as follows: [both constructors should increment the class variable appropriately] The first is a default constructor that has no parameters and sets the instance variables to either "not known" for the strings, 20 for the integer. The second takes 3 parameters, one for each of the instance variables.   Create ShortTraining & LongTraining classes (extending TrainingStudent) & implement variables month & year & make sure about Month & Year range inside property.   After Implementation Verify & validate your Logic using following main Code.      TrainingStudent t = new TrainingStudent();    t.Print();                           // Not Known – Not Known – 20TP    TrainingStudent t2 = new TrainingStudent(“12”, “akram”,150);    t2.Print();                           // 12 – akram – 150TP    ShortTraining st = new ShortTraining(“13”, “rehman”,18,5);    st.Print();                           // 13 - rehman – 18TP – 5 Months    ShortTraining st2 = new ShortTraining(“15”, “rehman”,110,5);    st2.Print();                           // 15 – rehman – 110TP – 5 Months    LongTraining lt = new LongTraining();    lt.Print();                           // Not Known – Not Known – 20TP – 1 year

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Write C# code to perform the following:

  1. Create TrainingStudent class & implement variables, make sure about traiffPoint input range using TraiffPoint property.
  2. Create two constructors as follows: [both constructors should increment the class variable appropriately]
    1. The first is a default constructor that has no parameters and sets the instance variables to either "not known" for the strings, 20 for the integer.
    2. The second takes 3 parameters, one for each of the instance variables.

 

  1. Create ShortTraining & LongTraining classes (extending TrainingStudent) & implement variables month & year & make sure about Month & Year range inside property.

 

After Implementation Verify & validate your Logic using following main Code.

 

   TrainingStudent t = new TrainingStudent();

   t.Print();                           // Not Known – Not Known – 20TP

   TrainingStudent t2 = new TrainingStudent(“12”, “akram”,150);

   t2.Print();                           // 12 – akram – 150TP

   ShortTraining st = new ShortTraining(“13”, “rehman”,18,5);

   st.Print();                           // 13 - rehman – 18TP – 5 Months

   ShortTraining st2 = new ShortTraining(“15”, “rehman”,110,5);

   st2.Print();                           // 15 – rehman – 110TP – 5 Months

   LongTraining lt = new LongTraining();

   lt.Print();                           // Not Known – Not Known – 20TP – 1 year

    

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY