|
2 вопроса с Testking 316
|
|||
---|---|---|---|
#18+
В Testking 316v5.0 есть два вопроса, которые мне кажутся одинаковыми, однако, ответы на них разные QUESTION NO: 1 You use Visual Studio .NET to create a component named Request. This component includes a method named AcceptTKRequest, which tries to process new user requests for services. AcceptTKRequest calls a private function named Validate. You must ensure that any exceptions encountered by Validate are bubbled up to the parent form of Request. The parent form will then be responsible for handling the exceptions. You want to accomplish this goal by writing the minimum amount of code. What should you do? A . Use the following code segment in AcceptTKRequest: this.Validate(); B . Use the following code segment in AcceptTKRequest: try { this.Validate(); } catch(Exception ex) { throw ex; } C. Use the following code segment in AcceptTKRequest: try { this.Validate(); } catch(Exception ex) { throw new Exception(“Exception in AcceptTKRequest”, ex); } D. Create a custom Exception class named RequestException by using the following code segment: public class RequestException:ApplicationException { public RequestException():base() { } public RequestException (string message):base(message) { } public RequestException(string message, Exception inner):base(message, inner) { } } In addition, use the following code segment in AcceptTKRequest: try { this.Validate(); } catch(Exception ex) { throw new RequestException(“Exception in AcceptTKRequest”, ex); } Answer: A Explanation: The unhandled exception automatically will be thrown to the client application. This solution meets the requirement that the least amount of code should be used. practical questions QUESTION NO: 47 You are the .Net Consultant for TKBank. TKBank wants to allow existing users of their ATM machines to apply for Internet Banking through their ATM machines. To do this, you use Visual Studio .NET to create a component named ValidateValidATMUser to verify if the user is a valid ATM customer. This component includes a method named AcceptValidateValidATMUser, which tries to process new user ValidateValidATMUsers for services. AcceptValidateValidATMUser calls a private function named Validate. You must ensure that any exceptions encountered by Validate are bubbled up to the parent form of ValidateValidATMUser. The parent form will then be responsible for handling the exceptions. You want to accomplish this goal by writing the minimum amount of code. What should you do? A . Use the following code segment in AcceptValidateValidATMUser: Me.Validate() B. Use the following code segment in AcceptValidateValidATMUser: Try { Me.Validate() } Catch Exception ex { Throw ex } C. Use the following code segment in AcceptValidateValidATMUser: Try { Me.Validate() } Catch Exception ex { Throw new Exception ("Exception in AcceptValidateValidATMUser", ex) } D . Create a customer Exception class named ValidateValidATMUserException by the following code segment: Public Class ValidateValidATMUserException 070 - 316 Leading the way in IT testing and certification tools, www.testking.com - 151 - Inherits System.ApplicationException Public New(){ } Public New (String message){ MyBase.New(message) } Public New (String message, Exception inner){ MyBase.New(message, inner) } } In addition, use the following code segment in AcceptValidateValidATMUser: Try { Me.Validate(); } Catch Exception ex { Throw new ValidateValidATMUserException("Exception in _ AcceptValidateValidATMUser", ex); } Answer: B The unhandled exception automatically will be thrown to the client application. This solution meets the requirement that the least amount of code should be used. We must throw the exception as it is. Ответ В мне кажется логичным и в первом случае, но неужели в самом первом вопросе теста может быть ошибка ? Или между ними все-таки есть разница ? Пожалуйста, помогите разобраться Спасибо ... |
|||
:
Нравится:
Не нравится:
|
|||
14.05.2004, 15:59 |
|
2 вопроса с Testking 316
|
|||
---|---|---|---|
#18+
Только А и В удовлетворяют поставленным условиям. (Т.к. C и D добавляют свою информацию к исключениям.) С учетом условия: You want to accomplish this goal by writing the minimum amount of code. Считаю верным ответ А. На экзамене имел возможность ответить на вопрос ... (Увы! Подписался под неразглашением! Но, думаю, поняли, что я хотел сказать.) Ответил, исходя из соображений, представленных выше. Тесткинг по 70-316 оставил крайне негативное впечатление. ПО-моему, просто взяли 70-306 и переделали под 316. Очень криво!!! Много ошибок и опечаток. Мой совет - каждый вопрос (если уж открыли тесткинг) полностью прорабатывайте по мсдн и training-kit'у. В последнем кстати подобная ситуация с исключениями описана. ... |
|||
:
Нравится:
Не нравится:
|
|||
14.05.2004, 16:14 |
|
2 вопроса с Testking 316
|
|||
---|---|---|---|
#18+
Спасибо А это тоже ошибка ? Вопрос 54 Стандартная форма с SqlConnection. SqlDataAdapter. DataSet и связанными с ней TextBox И кнопкой Save. по нажатию которой TestKingDataUdapter.Update(CustomerDataSet) Но данные не сохраняются, вопрос почему Ответ - в метод Update надо передать Connection TestKingDataUdapter.Update(CustomerDataSet. TestKingConnection) Но метода Update с двумя параметрами в Help вообще нет ! ... |
|||
:
Нравится:
Не нравится:
|
|||
16.05.2004, 15:07 |
|
|
start [/forum/topic.php?fid=34&fpage=58&tid=1551918]: |
0ms |
get settings: |
12ms |
get forum list: |
15ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
87ms |
get topic data: |
13ms |
get forum data: |
3ms |
get page messages: |
46ms |
get tp. blocked users: |
2ms |
others: | 245ms |
total: | 431ms |
0 / 0 |