EiffelAndADTquestions

EiffelAndADTquestions - 2009 November 23 Eiffel and AD Ts...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
2009 November 23 Eiffel and ADTs Example Test Questions 1. Eiffel 1. Java distinguishes between the primitive types -- int, char, real, etc. -- and real objects. Eiffel does not make this distinction. Explain how Eiffel can treat the primitive types as first class objects. 2. Eiffel has four mechanisms for adaptation. Describe and give an example of each one. 3. Describe, in execution order, the steps Eiffel follows in creating an Object. 4. Explain what is an expanded type and why expanded types are needed. 5. In order to implement a vector of similar objects in Eiffel, one could create a generic class VECTOR[G]. In Java, one would have to use the class Vector (stores arbitrary objects). Explain the benefits of the former approach, and the dangers of the latter. 6. Consider the following two classes: It is illegal in Eiffel to do the following in the body of feature foo : s.bar := 0 Explain what is the rationale behind this restriction. 2. Agents & Tuples 1. Consider a priority queue PQ as a sequence consisting of items, each called item , each containing the following fields. < priority : INTEGER , time : INTEGER , data : ANY >
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 3

EiffelAndADTquestions - 2009 November 23 Eiffel and AD Ts...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online