PrepAway - Latest Free Exam Questions & Answers

Which two code segments can you use to achieve this goal?

You are developing an application. The application includes classes named Employee and Person and
an interface named IPerson.
The Employee class must meet the following requirements:
It must either inherit from the Person class or implement the IPerson interface.
It must be inheritable by other classes in the application.
You need to ensure that the Employee class meets the requirements.
Which two code segments can you use to achieve this goal? (Each correct answer presents a
complete solution. Choose two.)

PrepAway - Latest Free Exam Questions & Answers

A.
Option A

B.
Option B

C.
Option C

D.
Option D

Explanation:
Sealed – When applied to a class, the sealed modifier prevents other classes from inheriting from it.
http://msdn.microsoft.com/en-us/library/88c54tsw(v=vs.110).aspx

2 Comments on “Which two code segments can you use to achieve this goal?

  1. Seekat says:

    It must either inherit from the Person class or implement the IPerson interface. -It must be inheritable by other
    classes in the application. –When applied to a class, the sealed modifier prevents other classes from inheriting
    from it.–
    //you cant inherit from sealed class




    0



    0

Leave a Reply