exam questions

Exam 70-483 All Questions

View all questions & answers for the 70-483 exam

Exam 70-483 topic 2 question 110 discussion

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

You are modifying an existing application.
The application includes a Loan class and a Customer class. The following code segment defines the classes.

You populate a collection named customer-Collection with Customer and Loan objects by using the following code segment:

You create a largeCustomerLoans collection to store the Loan objects by using the following code segment:
Collection<Loan> largeCustomerLoans = new Collection<Loan>();
All loans with an Amount value greater than or equal to 4000 must be tracked.
You need to populate the largeCustomerLoans collection with Loan objects.
Which code segment should you use?

  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️
Must add to the largeCustomerLoans collection, not the customerLoanCollection.
We iterate through each customer in customerCollection and check each loan belonging to this customer.

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
user123
Highly Voted 5 years, 1 month ago
The correct and missing answer is D. foreach(Customer customer in customerCollection) { foreach(Loan loan in customer.LoanCollection) { if(loan.Amont>=4000m) { largeCustomerLoans.Add(loan); } } }
upvoted 25 times
...
whtvr
Highly Voted 4 years, 9 months ago
even though D is missing it was obvious none of the other answers were correct
upvoted 14 times
...
nelaed
Most Recent 4 years, 7 months ago
Lucky that A, B and C are clearly wrong.
upvoted 3 times
...
Xavios
5 years, 7 months ago
Missing D answer
upvoted 5 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