Frequently asked questions and answers of Eiffel in Artificial Intelligence and Machine Learning of Computer Science to enhance your skills, knowledge on the selected topic. We have compiled the best Eiffel Interview question and answer, trivia quiz, mcq questions, viva question, quizzes to prepare. Download Eiffel FAQs in PDF form online for academic course, jobs preparations and for certification exams .
Intervew Quizz is an online portal with frequently asked interview, viva and trivia questions and answers on various subjects, topics of kids, school, engineering students, medical aspirants, business management academics and software professionals.
Question-1. What is Eiffel?
Answer-1: Eiffel is an object-oriented programming language designed for software engineering.
Question-2. Who developed Eiffel?
Answer-2: Eiffel was developed by Bertrand Meyer in 1985.
Question-3. What is the main focus of Eiffel?
Answer-3: Eiffel focuses on software reliability and maintainability through Design by Contract (DbC).
Question-4. What is Design by Contract (DbC)?
Answer-4: DbC is a methodology where software components are built with clearly defined contracts.
Question-5. What is the primary data structure in Eiffel?
Answer-5: The primary data structure is the class, which defines objects and their behavior.
Question-6. How is Eiffel different from other OOP languages?
Answer-6: Eiffel emphasizes DbC, multiple inheritance, and generic programming.
Question-7. What is a class in Eiffel?
Answer-7: A class is a blueprint for creating objects, containing attributes and methods.
Question-8. How do you define a class in Eiffel?
Answer-8: Use the class keyword, e.g., class PERSON.
Question-9. What is an attribute in Eiffel?
Answer-9: Attributes are variables that define the state of a class.
Question-10. How do you declare an attribute in Eiffel?
Answer-10: Use the form attribute_name: TYPE, e.g., name: STRING.
Question-11. What is a feature in Eiffel?
Answer-11: A feature is a class element, such as a method or attribute.
Question-12. How do you define a method in Eiffel?
Answer-12: Use the syntax method_name(arg: TYPE): RETURN_TYPE is do ... end.
Question-13. What is the role of the do keyword in Eiffel?
Answer-13: do marks the beginning of a method's implementation.
Question-14. What are preconditions in Eiffel?
Answer-14: Preconditions specify conditions that must be true before a method is executed.
Question-15. How are preconditions defined in Eiffel?
Answer-15: Use the require keyword, e.g., require x > 0.
Question-16. What are postconditions in Eiffel?
Answer-16: Postconditions specify conditions that must be true after a method executes.
Question-17. How are postconditions defined in Eiffel?
Answer-17: Use the ensure keyword, e.g., ensure result > 0.
Question-18. What is an invariant in Eiffel?
Answer-18: An invariant is a condition that must always hold true for a class.
Question-19. How do you define an invariant in Eiffel?
Answer-19: Use the invariant keyword, e.g., invariant count >= 0.
Question-20. What is multiple inheritance in Eiffel?
Answer-20: Eiffel allows a class to inherit from multiple parent classes.
Question-21. How do you define inheritance in Eiffel?
Answer-21: Use the inherit keyword, e.g., inherit PARENT_CLASS.
Question-22. What is renaming in Eiffel?
Answer-22: Renaming allows you to change the name of an inherited feature.
Question-23. How do you rename a feature in Eiffel?
Answer-23: Use the rename clause, e.g., rename old_name as new_name.
Question-24. What are generic classes in Eiffel?
Answer-24: Generic classes allow you to define classes that operate on different types.
Question-25. How do you define a generic class in Eiffel?
Answer-25: Use angle brackets, e.g., class STACK [G].
Question-26. What is polymorphism in Eiffel?
Answer-26: Polymorphism allows methods to behave differently based on the object's class.
Question-27. How does Eiffel handle memory management?
Answer-27: Eiffel uses automatic garbage collection.
Question-28. What is the create keyword in Eiffel?
Answer-28: create is used to initialize an object, e.g., create obj.
Question-29. What is an agent in Eiffel?
Answer-29: Agents are references to routines, allowing methods to be passed as arguments.
Question-30. How do you create an agent in Eiffel?
Answer-30: Use the agent keyword, e.g., agent my_method.
Question-31. What is the Current keyword in Eiffel?
Answer-31: Current refers to the current instance of a class.
Question-32. What is the role of the deferred keyword in Eiffel?
Answer-32: deferred defines an abstract class or method.
Question-33. How do you implement a deferred method in Eiffel?
Answer-33: Use deferred in the parent class and implement it in a descendant class.
Question-34. What is the purpose of the once keyword in Eiffel?
Answer-34: once ensures a method is executed only once per application run.
Question-35. How do you define a constant in Eiffel?
Answer-35: Use the once keyword, e.g., pi: REAL is once 3.14159.
Question-36. What is an expanded type in Eiffel?
Answer-36: Expanded types are value types, as opposed to reference types.
Question-37. How do you define an expanded type in Eiffel?
Answer-37: Use the expanded keyword, e.g., expanded INTEGER.
Question-38. What is the Eiffel Base Library?
Answer-38: The Base Library is a standard set of classes for common programming tasks.
Question-39. How do you handle exceptions in Eiffel?
Answer-39: Use the rescue clause in a method, e.g., rescue ....
Question-40. What is the role of the ensure keyword in Eiffel?
Answer-40: ensure defines postconditions for a method.
Question-41. What is the EiffelVision library?
Answer-41: EiffelVision is a library for creating graphical user interfaces (GUIs).
Question-42. What is the role of external in Eiffel?
Answer-42: external integrates Eiffel with external libraries or code.
Question-43. What is the purpose of the alias keyword?
Answer-43: alias allows you to assign alternative names to operators or routines.
Question-44. What is the root class in Eiffel?
Answer-44: ANY is the root class from which all other classes inherit.
Question-45. How do you compare objects in Eiffel?
Answer-45: Use the = operator for structural equality.
Question-46. What is an Eiffel cluster?
Answer-46: A cluster is a group of related classes, similar to a package.
Question-47. What are some tools provided with Eiffel?
Answer-47: Tools include EiffelStudio, EiffelBuild, and EiffelEnvision.
Question-48. What is EiffelStudio?
Answer-48: EiffelStudio is an Integrated Development Environment (IDE) for Eiffel programming.
Question-49. What are frozen features in Eiffel?
Answer-49: Frozen features cannot be overridden in descendant classes.
Question-50. How does Eiffel promote software reliability?
Answer-50: Eiffel uses DbC, strong typing, and exception handling to ensure software reliability.
Frequently Asked Question and Answer on Eiffel
Eiffel Interview Questions and Answers in PDF form Online
Eiffel Questions with Answers
Eiffel Trivia MCQ Quiz