Вопросы по с#
От: dub  
Дата: 22.09.06 08:24
Оценка:
Вопросы по с# из теста c BrainBench
При прохождении теста вычмтал несколько интересных вопросов на которые хотел бы узнать правильный ответ
Если кто знает подскажите правильный ответ и почему.
Спасибо.

Вопросы:

--
Within an instance constructor of a struct type, the "this" keyword behaves exactly as an output parameter of the struct type
--
A user-defined conversion is NOT allowed to which of the following types? 
Choice 1   
 "struct" and "array" types  
Choice 2   
 "abstract class" and "object" types  
Choice 3   
 "object" and "interface" types  
Choice 4   
 "struct" and "enum" types  
Choice 5   
 "delegate" and "enum" types




--
internal class Piston {} 

internal class Engine 
{ 
 private Piston[] myPistons = new Piston[4]; 
 public bool Ignition() { 
   // some code... 
   return true; 
 } 
} 

public class Car 
{ 
 private Engine myEngine = new Engine(); 
 public void Start() 
 { 
   // put in keys etc... 
   if (myEngine.Ignition()) { 
     // some more code 
   } 
 } 
}  
  What OO concept does the above sample code demonstrate?  
Choice 1   
 Combination  
Choice 2   
 Inheritance  
Choice 3   
 Composition  
Choice 4   
 Polymorphism  
Choice 5   
 Delegation  
--
Which one of the following describes the OO concept of Aggregation?  
Choice 1   
 A system of objects that define each other  
Choice 2   
 A system of objects that are not related  
Choice 3   
 A system of objects that implement each other  
Choice 4   
 A system of objects inherited from each other  
Choice 5   
 A system of objects that are built using each other



--
Which one of the following variable types is NOT classified as initially assigned?  
Choice 1   
 Value parameters  
Choice 2   
 Instance variables of class instances  
Choice 3   
 Local variables  
Choice 4   
 Static variables  
Choice 5   
 Array elements  
--
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.