EiffelAndADTquestions

- 2009 November 23 Example Te st Questions for Eiffel and AD Ts 1 Eiffel 1 Java d istinguish es b etw een th e primitiv e types in t char real etc

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

View Full Document Right Arrow Icon
2009 November 23 Example Test Questions for Eiffel and ADTs 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 DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/14/2012 for the course CSE 3214 taught by Professor Ross during the Winter '12 term at York University.

Page1 / 3

- 2009 November 23 Example Te st Questions for Eiffel and AD Ts 1 Eiffel 1 Java d istinguish es b etw een th e primitiv e types in t char real etc

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