In C# Create classes: Person, Student, Employee, Professor, Staff and Address ☐ Address class must have suitable auto-implemented...

80.2K

Verified Solution

Question

Programming

In C#

Create classes: Person, Student, Employee, Professor, Staff andAddress

  1. ☐ Address class must have suitable auto-implemented propertiesfor Address 1, Address 2 and City.
  2. ☐ Person class must have suitable auto-implemented propertiesfor Name, Residence (type Address) and email.
  3. ☐ Student and Employee must be subclasses of Person.
  4. ☐ Employee must be a super class for Professor and Staff.
  5. ☐ Employee class must have suitable auto-implemented propertiesfor salary (between 2000 to 8000), and hire date.
  6. ☐ Professor class must have suitable auto-implementedproperties for office hours and rank (use enum, e.g. Assist. Prof.,Assoc. Prof., etc.)
  7. ☐ Staff class must have auto-implemented property for adesignation (use enum, e.g. Office Assistance, Clerk, etc.)
  8. ☐ All classes must have suitable constructor(s) and making useof super class constructors as applicable.
  9. ☐ Override the ToString method in each class to return theclass name and all other information in one/single line (use stringinterpolation and use base class ToString as applicable)

In the Main Method, create three Lists for (Student, Staff, andProfessor) with hard-coded data for at least 4 entries each.

Implement the menu driven CONSOLE logic taking a user inputas:

Press 1 to modify Student

Press 2 to modify Staff

Press 3 to modify Professor

Press 0 to exit program

☐modify Student Menu

Press 1 to list all students

Press 2 to add a new student

Press 3 to update …

Press 4 to delete …

Press 5 to return to main menu

☐ modify Staff Menu

Press 1 to list all Staff

Press 2 to add a new Staff

Press 3 to update …

Press 4 to delete …

Press 5 to return to main menu

☐modify Professor Menu

Press 1 to list all Professors

Press 2 to add a new Professor

Press 3 to update …

Press 4 to delete …

Press 5 to return to main menu

☐ Console application must have a hierarchy of above-shown menusand run continuously until the person quits the application

☐ To list, add, update and delete to a list one must useLINQ.

Answer & Explanation Solved by verified expert
4.0 Ratings (443 Votes)
using System namespace A class Student private string code Not Applicable private string name not known private int age 0 Declare a Code    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students