Answers to Hour 17
1: | To create objects, you must first create a template. This template is called a: |
A1: | Class |
2: | One of the primary benefits of object-oriented programming is that objects contain both their data and their code. This is called: |
A2: | Encapsulation |
3: | With static classes, public variables and routines are always available to code via the static class in other modules. Is this true with public variables and routines in classes? |
A3: | No. To access the public variables and routines, an object must be instantiated from the class. |
4: | True or False: Each object derived from a class has its own set of class-level data. |
A4: | True |
5: | What must you do to create a property that can be read but not changed by client code? |
A5: | Create a property procedure ... |
Get Sams Teach Yourself C#™ in 24 Hours now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.