The Source for Java Technology Collaboration
User: Password:



Felipe Gaucho

Felipe Gaucho's Blog

Basic Concepts about Object Orientation (a quiz)

Posted by felipegaucho on July 17, 2006 at 12:44 AM | Comments (3)

One of the most tricky parts to learn Object Orientation is the concept of classification. The task of separating entities of the real word in groups and then enumerating the characteristics of each group seems quite simple for experienced programmers but could be messy for novice students. The discussion about the fundamentals of classification is very important to establish a baseline about what are classes. A clean explanation about this subject is a challenge for the teachers and the fluency about the OO terminology is the first duty for absolute beginners in Java or any other object oriented programming language. This test is not closed to Java - it was created to be independent of programming languages.

The audience: this test could be useful for teachers interested in offer their pupils a revision material and also to interchange ideas about how to enhance the OO teaching methodologies. The students of introductorial classes about Java and OO could check their knowledge and discuss variations about the answers. The feedback from the students brainstorm and also from the teachers usage of this material is the most valuable result I can expect from this text. The questions below are the result of a continuous effort in order to facilitate the learning of the basic concepts of classification. If you remember an amazing question - the one that helped you to figure out the idea of classes, objects and its relationships, post your comments on the bottom of this page.

Take the Test

This section presents a set of questions about classification. Some questions refers to controversial subjects and could let a student to spend hours thinking about that. Don´t worry if some questions are not obvious - it is absolute normal on the first time you think about concepts on real world objects and their modelling in programming languages. The questions are presented in the context of the programming languages but the classification concepts are nor obvious neither inspired in the computing. The classification are an old concern of the human thinking and motivates researches in other areas such as Linguistics, Philosofy and Computer Science. The reading of classification theories in those diverse study fields is a source of inspiration and I recomend you to talk about that with your teacher and with your friends. Take all the time you need to complete this test, but resist the urge to peek at the answers until you finish. The test begins now.

  1. Mark ( T )rue or ( F )alse in the following assertions about the pictures:

    fig1.JPG

    1. Picture a represents a person (    ).
    2. Picture b represents a person (    ).
    3. Picture c represents a person (    ).
    4. Picture d represents a person (    ).
    5. Picture e represents a person (    ).

  2. If you group the pictures above, based on the characteristics of the represented objects, how many groups will you create? Why?

  3. Why didn´t you classify picture e as a person, if eyes are part of a person?

  4. Why didn´t you classify picture d as a person, if a person could have a car?

  5. Mark ( T )rue or ( F )alse in the following assertions about the pictures:

    fig2.JPG

    1. Picture a represents a vehicle (    ).
    2. Picture b represents a vehicle (    ).
    3. Picture c represents a vehicle (    ).
    4. Picture d represents a vehicle (    ).
    5. Picture e represents a vehicle (    ).

  6. If you group the pictures above, based on the characteristics of the represented objects, how many groups will you create? Why?

  7. If you agree all the pictures above represent vehicles, why can we separate these figures in different groups?

  8. What is a class?

  9. What is a subclass?

  10. What is a superclass?

  11. If you found a vehicle industry, what kind of products it will produce? Each vehicle produced by your industry will represent a class or an object?

  12. Can I say picture (c) is an airplane and also a vehicle?

  13. A vehicle can have different formats? What is polymorphism?

  14. What is inheritance?

  15. Can I say that the vehicle (c) flies? And can I say that the plane (c) flies? What is casting?

  16. Watch the picture below in order to answer the further questions:

    fig3.JPG

  17. If you group the words of the picture above, how many groups will you create? Why?

  18. What words compose each group? What is the meaning of each group you created?

  19. What is a method?

  20. What is a member of a class?

  21. Can you manipulate the internal pieces of the motor of a moving vehicle? Can you touch your own heart? Why not?

  22. Supposing you have wife, son and a car, answer the questions below using ( Y )es or ( N )o:

    1. A stranger can sing a song for you without your permission? (    ).
    2. Your son can watch your TV without your permission? (    ).
    3. A stranger can drive your car without your permission? (    ).
    4. Your wife can drive your car without your permission? (    ).

  23. What is the difference among public, protected and private members of a class?

  24. How can you avoid a stranger of driving your car without your permission?

  25. What is encapsulation?

  26. What are package methods?

  27. Can you change the format of your car wheels? What are constant members of a class?

  28. Draw an image for each of these classes: love, beauty and geometry.

  29. Did you have succes trying to draw the above classes? Why can´t you draw an image for the class love?

  30. What are the differences between concrete and abstract classes?

  31. What characteristic is shared by a bee, a plane and a cloud?

  32. What is an interface?

  33. Can you imagine a superclass for modelling bees, planes and clouds? What kind of problems could occur when we group so different objects in a unique model? Give an alternative to avoid such problems.

  34. Quick review: give a one phrase definition to the terms below:

    1. Classes
    2. Objects
    3. Interfaces
    4. Attributes
    5. Methods
    6. Class Hierarchy
    7. Polymorphism
    8. Encapsulation

Well, done - here comes the answers: Click here to see the suggested answers.

Conclusion

The questions above compose a basic checklist I use to assess the learning rate of my students at the end of the semester. I usually use that test on the first or second semester of graduation courses. The test doesn´t have a score itself and it serves only to review some concepts and also to detect knowledge deficiencies. If you find the questions are easy, congratulations, you are ready to go on to the more sophisticated subjects - such as Design Patterns, Software Design & Architecture. If you have doubts about the concepts here presented, don´t give up - just read your book again and ask your teacher and colleagues about that. Object Orientation and classification are not trivial subjects and you don´t have to underestimate or superestimate them - you just have to understand them as the begining of your learning about Software Design.

See you on the next test.

Resources


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • Very nice quiz Felipe!However, I think you should put a hovercraft in question 5, which can be used as either a land or sea vehicle, or both.Was this a quiz about Object Orientation in general, or merely Java's simplified support of it? ;-)

    Posted by: cajo on July 17, 2006 at 06:03 AM

  • Hi cajo,a hovercraft is a nice suggestion because it is tricky to group it with other vehicles.. a hydro airplane could be an even worst problem for the novices. I will include this morph examples in the next versions of the quiz.

    Posted by: felipegaucho on July 17, 2006 at 06:15 AM

  • The subject of a very wonderful and distinct
    I thank you for continuing excellence
    Thank you

    =========================================================================

    ليبيا
    شباب ليبيا
    libya
    منتديات
    منتديات ليبية
    غرائب وحقائق
    أحاديث شريفة
    برامج اسلامية للجوال
    مفاتيح الديجيتل
    الشيرنج
    الرسيفرات
    كتب إسلامية
    خلفيات للموبيل
    الشعر الشعبي
    الصحة والطب
    طب اسنان
    كتب طب اسنان مجانية
    برامج طبية
    تعلم الإنكليزية
    اللغة الفرنسية
    طب الإعشاب
    الخواطرالادبية
    الازياء والمكياج
    تعليم الطبخ
    الاثاث الحديث
    مقاطع كرة قدم
    المصارعه الحرة
    اهداف كوره
    الفوتوشوب
    اروع البرامج
    الدوري الليبي
    خلفيات رياضية
    المصارعة
    كورة عربية
    كرة قدم عالمية
    الدوري الإيطالي
    الدوري الاسباني
    الدوري الإنجليزي
    صور المشاهير
    انواع الحلويات
    افلام كوميدية
    احدث الافلام
    افلام
    التقنية
    تحميل افلام
    برامج
    اخر برامج الجوال
    kaspersky
    أفلام كرتون عربية
    برامج برامج كمبيوتر
    برامج حماية
    برامج اختراق
    برامج صوت
    برامج تحميل برامج احدث البرامج
    محادثة
    خلفيات الطبيعة
    برامج مبايل للتحميل
    اخبار الفن
    احدث الافلام للتحميل
    تحميل افلام رعب
    ترجمةأفلام
    الكامات
    برامج جوال
    برامج محاسبة
    برامج
    kasper
    games
    برامج
    برامج
    انترنت
    برامج صوتية
    شبكات الحاسوب
    خلفيات للويندوز
    تطويرالمواقع
    العاب
    العاب الفيديو
    games
    شفرات
    برامج مسنجر
    خلفيات شاشة
    صور ترحيبيه
    الفوتوشوب
    خلفيات طبيعة
    تطويرالمواقع
    الفوتوشوب
    مقاطع البلوتوت
    مسجات ليبية
    خلفيات
    الفلاش
    التصميم الثلاثي
    برامج الجوال
    العاب الجوال
    فيديو كليب
    مسجات
    ترددات ستالايت
    نغمات

    Posted by: libyan on May 30, 2008 at 03:21 PM



Only logged in users may post comments. Login Here.


Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds