What is a mixin class?

Answers were Sorted based on User's Feedback



What is a mixin class?..

Answer / suman

is a class that provide certain functionality that other
class can inherit, but it is not meant to be a standalone
class.
Kind of an interface where soem members are predefined.

Pyhton and Ruby supports mixin. .Net does not.Can simulate
using Castle.DynamicProxy

Is This Answer Correct ?    1 Yes 0 No

What is a mixin class?..

Answer / sonali

A class that provides some but not all of the
implementation for a virtual base class is often called
mixin. Derivation done just for the purpose of redefining
the virtual functions in the base classes is often called
mixin inheritance. Mixin classes typically don't share
common bases..

Is This Answer Correct ?    7 Yes 8 No

What is a mixin class?..

Answer / reejusri

Mixin is a class that does not implement any method but are
in fact has only pure virtual methods. The implementor
decides the logic for these methods.

The term mixin were originally explored in the Lisp
language In C++, the term has been used to describe classes
in a particular (multiple) inheritance arrangement:

As superclasses of a single class that themselves have a
common virtual base
class .

We would like to specify an extension without pre-
determining what exactly it can extend. This is equivalent
to specifying a subclass while leaving its superclass as a
parameter to be determined later. The benefit is that a
single class can be used to express an incremental
extension, valid for a variety of classes.

Is This Answer Correct ?    4 Yes 11 No

What is a mixin class?..

Answer / reeju srivastava

Mixin is a class that does not implement any method but are
in fact has only pure virtual methods. The implementor
decides the logic for these methods.

The term mixin were originally explored in the Lisp
language In C++, the term has been used to describe classes
in a particular (multiple) inheritance arrangement:

As superclasses of a single class that themselves have a
common virtual base
class .

We would like to specify an extension without pre-
determining what exactly it can extend. This is equivalent
to specifying a subclass while leaving its superclass as a
parameter to be determined later. The benefit is that a
single class can be used to express an incremental
extension, valid for a variety of classes.

Is This Answer Correct ?    3 Yes 19 No

Post New Answer

More OOPS Interview Questions

There are 2 classes defined as below public class A { class B b; } public class B { class A a; } compiler gives error. How to fix it?

3 Answers   Microsoft,


What is polymorphism programming?

0 Answers  


What is encapsulation?

17 Answers   TCS,


Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.

0 Answers  


write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.

0 Answers   Microsoft, TCS,






what is code for call by value and call by reference?

1 Answers  


1. Strong name 2. how to prevent a class from being inherited 3. delegates 4. default modifier for interface 5. default modifier for class 6. base class for exception 7. diff bet trigger and view in sql 8. how to exchange values from one page to another page 9. can multiple catch block ll be executed at same time 10. can u store different data types in an array & array list 11. when we ll use trigger 12. try,catch,finally usage

2 Answers  


Write A Program using Single and Multiple Inheritance.

1 Answers  


What is destructor give example?

0 Answers  


What is class and object in oops?

0 Answers  


Describe what an Interface is and how it?s different from a Class.

7 Answers   Spinsys,


What does I oop mean?

0 Answers  


Categories