exam questions

Exam 70-483 All Questions

View all questions & answers for the 70-483 exam

Exam 70-483 topic 2 question 88 discussion

Actual exam question from Microsoft's 70-483
Question #: 88
Topic #: 2
[All 70-483 Questions]

You are creating a class named Loan.
The Loan class must meet the following requirements:
✑ Include a member that represents the rate for a Loan instance.
✑ Allow external code to assign a value to the rate member.
✑ Restrict the range of values that can be assigned to the rate member.
You need to implement the rate member to meet the requirements.
In which form should you implement the rate member?

  • A. public static property
  • B. public property
  • C. public static field
  • D. protected field
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
supersunny
Highly Voted 5 years, 9 months ago
Public property will satisfy the conditions - B.
upvoted 7 times
...
mcflub
Most Recent 4 years, 5 months ago
Range can be restricted by adding a conditional to the setter of a property. The property cannot be static since it must represent the rate of an instance of a Loan
upvoted 3 times
...
Anamayur
4 years, 5 months ago
How we can restrict the range of values assigning to the property? So I thought answer as A
upvoted 2 times
moraprex
4 years, 5 months ago
by using the set() function of the property. ex: public int Age { set() { if(Value > 18) { Age = Value; } else { Value = 18; } } }
upvoted 3 times
moraprex
4 years, 5 months ago
So the answer is B
upvoted 2 times
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago