Using C# programming language (using Microsoft Visual Studio), create a class called Person that has some properties (e.g., name, surname, age etc.). Create a method called Greeting which prints “Person is saying Hi!”. Now, create two classes to hold data from user input. The console needs to be used to retrieve the data by asking the user to create the object. • Create a console application • Create a class and name it Student • Student class should be derived from the Person class • Create the following properties for your class: name, surname, email, ID, phone number, date of birth etc. • Create a parameter and constructor for your class • Use the Greeting method by overriding the base class method; your method should print “Student is saying Hi!” • Create another class for validation • Create at least three methods for your validation class to validate empty entry, wrong phone number and email address The user needs to enter the information as an input to create a student, then the entered information needs to be validated and finally the student object should be created based on the information entered by the user. Your program needs to display the student details in the console.
Using C#
that has some properties (e.g., name, surname, age etc.). Create a method called Greeting
which prints “Person is saying Hi!”. Now, create two classes to hold data from user input. The
console needs to be used to retrieve the data by asking the user to create the object.
• Create a console application
• Create a class and name it Student
• Student class should be derived from the Person class
• Create the following properties for your class: name, surname, email, ID, phone
number, date of birth etc.
• Create a parameter and constructor for your class
• Use the Greeting method by overriding the base class method; your method should
print “Student is saying Hi!”
• Create another class for validation
• Create at least three methods for your validation class to validate empty entry,
wrong phone number and email address
The user needs to enter the information as an input to create a student, then the entered
information needs to be validated and finally the student object should be created based on
the information entered by the user. Your program needs to display the student details in the
console.
Step by step
Solved in 2 steps with 3 images