Question
1. When you develop an application using a three-layer architecture, the layer that provides the user interface is called the presentation layer. 2. When you
1. When you develop an application using a three-layer architecture, the layer that provides the user interface is called the presentation layer.
2. When you develop an application using a three-layer architecture, the layer that stores the business rules and classes is typically called the middle layer.
3. The data of a class is stored in the classs ____________.
4. A _____________ can be used to get and set the value thats stored in a private field.
5. If you code a get accessor for a property but you dont code a set accessor, the property will be a ________ property.
6. When you create a method with the same name as another method but with a different parameter list, you are ____________ the method.
7. Within a class, you can code a ________________ to create an instance of the class and initialize its instance variables.
8. A constructor is just a special type of ______________ that instantiates an object from the class.
9. Static methods can be called without creating an instance of a ___________.
10. A property thats coded without get and set accessors is called a/an ________________ property.
11. You can use the _______________ operator to code an expression-bodied property or method.
12. You can use the live code analysis feature to generate a/an ________________ for any class or member.
13. To create an instance of a class and assign values to it in a single statement without explicitly calling a constructor, you can use a/an ____________________.
14. A structure is similar to a class but it defines a _____________ type.
15. When a programmer hides some of the data and operations of a class while she exposes others, shes using the concept of ______________.
16. Code a statement that creates an instance of an Account class using the default constructor and stores the object thats created in a variable named account.
______________________________________________________________
17. Code a statement that creates an instance of the Account class using a constructor that has two parameters named firstName and age, and store the object in a variable named account. Assume that variables with those names have already been declared and initialized so you can pass those variables to the constructor.
______________________________________________________________
18. Code a statement that sets the value of the Age property of an Account object named account to the value in a variable named newAge.
______________________________________________________________
19. Code a statement that will get the value of a public static field named Count thats defined in the Account class, and store the value in a new int variable named count. Assume that youve already created an object from this class thats named account.
______________________________________________________________
20. Code the declaration for an auto-implemented property named Title that works with a string. The property should be read-only and its private instance should be initialized to Entry Error.
______________________________________________________________
21. Rewrite the property that follows using an expression body.
public decimal SalesTax
{
get
{
return total * SalesTaxPct;
{
{
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started