Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #32631

Re: can you give me some hints on the Oracle Java SE related certificates?

From Jerry Stuckle <jstucklex@attglobal.net>
Newsgroups comp.lang.java.programmer
Subject Re: can you give me some hints on the Oracle Java SE related certificates?
Date 2015-09-22 09:50 -0400
Organization A noiseless patient Spider
Message-ID <mtrm76$c7$1@dont-email.me> (permalink)
References (5 earlier) <mti4pt$igj$1@dont-email.me> <313f817e-9d7c-4939-a971-7e2b2a85d35f@googlegroups.com> <mtjppt$g5v$1@dont-email.me> <430f5ded-3382-476a-ae5e-ef12427e1542@googlegroups.com> <c8f4c39f-3b53-4925-abf1-90062537e19b@googlegroups.com>

Show all headers | View raw


On 9/22/2015 8:26 AM, e.d.programmer@gmail.com wrote:
> On Monday, September 21, 2015 at 4:57:52 PM UTC-4, John wrote:
> ---
> Inheritance is not the same as Implementation.  Classes make objects.  Everything is an object.  Use vehicles for example.  A vehicle cannot be (extend) both car and truck.  They have different mutually exclusive properties.
> 
> Car and Truck extend Vehicle.  Honda Civic extends Car.  Ford F150 extends Truck.  Honda Civic and Ford F150 automatically get all the properties and methods of Vehicle (hasEngine, hasWheels).  This is Inheritance.
> 
> Interface connects potentially unrelated objects.  Rather than duplicate the logic at different inheritance branches for Diesel Truck and Diesel Car, and Gas Truck and Gas Car, we make Diesel Vehicle and Gas Vehicle interfaces to be able to fuel these different kinds of cars and trucks.  Honda Civic and Ford F150 may implement either of these.
> 
> If you can find real world examples it may be easier for your students to remember than whether they were implementing ClassA or extending ClassB, which might be easier if you name the interface InfcA.  An interface is not a Class, or a "Base".  It's just a shared set of properties and/or methods.
> 

No, a vehicle cannot be both a car and a truck.  However, a vehicle CAN
be both a car and a Honda.  It can also be both a truck and a Ford.  And
both Honda and Ford may derive from Manufacturer and contain information
specific to that manufacturer.

Additionally, Diesel and Gas could also be classes - there is an "is-a"
relationship between the car and the fuel.  Without multiple
inheritance, you have to derive gas_car, diesel_car, gas_truck,
diesel_truck from car and truck, respectively, or from gas_vehicle and
diesel_vehicle.  Either way you will have duplicate methods and
properties at some point (try it).

Multiple inheritance can be a very useful technique - one that I have
used occasionally in C++.  The biggest problem I've seen with it is
misuse.  But it's one I definitely miss in Java.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

can you give me some hints on the Oracle Java SE related certificates? John <xsli2@yahoo.com> - 2015-09-18 07:55 -0700
  Re: can you give me some hints on the Oracle Java SE related certificates? Jeff Higgins <jeff@invalid.invalid> - 2015-09-18 12:08 -0400
    Re: can you give me some hints on the Oracle Java SE related certificates? John <xsli2@yahoo.com> - 2015-09-18 09:17 -0700
      Re: can you give me some hints on the Oracle Java SE related certificates? e.d.programmer@gmail.com - 2015-09-18 10:38 -0700
        Re: can you give me some hints on the Oracle Java SE related certificates? John <xsli2@yahoo.com> - 2015-09-18 11:34 -0700
      Re: can you give me some hints on the Oracle Java SE related certificates? Jeff Higgins <jeff@invalid.invalid> - 2015-09-18 13:51 -0400
        Re: can you give me some hints on the Oracle Java SE related certificates? e.d.programmer@gmail.com - 2015-09-18 11:11 -0700
          Re: can you give me some hints on the Oracle Java SE related certificates? Jeff Higgins <jeff@invalid.invalid> - 2015-09-18 18:56 -0400
            Re: can you give me some hints on the Oracle Java SE related certificates? John <xsli2@yahoo.com> - 2015-09-18 20:23 -0700
              Re: can you give me some hints on the Oracle Java SE related certificates? Jeff Higgins <jeff@invalid.invalid> - 2015-09-19 09:29 -0400
              Re: can you give me some hints on the Oracle Java SE related certificates? Jeff Higgins <jeff@invalid.invalid> - 2015-09-19 10:00 -0400
                Re: can you give me some hints on the Oracle Java SE related certificates? John <xsli2@yahoo.com> - 2015-09-21 13:57 -0700
                Re: can you give me some hints on the Oracle Java SE related certificates? John <xsli2@yahoo.com> - 2015-09-21 14:04 -0700
                Re: can you give me some hints on the Oracle Java SE related certificates? Jeff Higgins <jeff@invalid.invalid> - 2015-09-21 21:47 -0400
                Re: can you give me some hints on the Oracle Java SE related certificates? Jeff Higgins <jeff@invalid.invalid> - 2015-09-22 15:15 -0400
                Re: can you give me some hints on the Oracle Java SE related certificates? Jeff Higgins <jeff@invalid.invalid> - 2015-09-22 16:47 -0400
                Re: can you give me some hints on the Oracle Java SE related certificates? Jeff Higgins <jeff@invalid.invalid> - 2015-09-22 16:49 -0400
                Re: can you give me some hints on the Oracle Java SE related certificates? Martin Gregorie <martin@address-in-sig.invalid> - 2015-09-22 11:02 +0000
                Re: can you give me some hints on the Oracle Java SE related certificates? Jeff Higgins <jeff@invalid.invalid> - 2015-09-22 08:47 -0400
                Re: can you give me some hints on the Oracle Java SE related certificates? Jeff Higgins <jeff@invalid.invalid> - 2015-09-22 09:14 -0400
                Re: can you give me some hints on the Oracle Java SE related certificates? Jeff Higgins <jeff@invalid.invalid> - 2015-09-22 09:16 -0400
                Re: can you give me some hints on the Oracle Java SE related certificates? Jeff Higgins <jeff@invalid.invalid> - 2015-09-22 09:32 -0400
                Re: can you give me some hints on the Oracle Java SE related certificates? Jeff Higgins <jeff@invalid.invalid> - 2015-09-22 09:54 -0400
                Re: can you give me some hints on the Oracle Java SE related certificates? e.d.programmer@gmail.com - 2015-09-22 06:34 -0700
                Re: can you give me some hints on the Oracle Java SE related certificates? Jeff Higgins <jeff@invalid.invalid> - 2015-09-22 09:36 -0400
                Re: can you give me some hints on the Oracle Java SE related certificates? Jeff Higgins <jeff@invalid.invalid> - 2015-09-22 09:50 -0400
                Re: can you give me some hints on the Oracle Java SE related certificates? Jeff Higgins <jeff@invalid.invalid> - 2015-09-22 10:56 -0400
                Re: can you give me some hints on the Oracle Java SE related certificates? e.d.programmer@gmail.com - 2015-09-22 05:26 -0700
                Re: can you give me some hints on the Oracle Java SE related certificates? Jerry Stuckle <jstucklex@attglobal.net> - 2015-09-22 09:50 -0400
                Re: can you give me some hints on the Oracle Java SE related certificates? Jeff Higgins <jeff@invalid.invalid> - 2015-09-22 10:09 -0400
                Re: can you give me some hints on the Oracle Java SE related certificates? Sebastian <news@seyweiler.dyndns.org> - 2015-09-23 15:25 +0200
                Re: can you give me some hints on the Oracle Java SE related certificates? Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-09-23 09:43 -0400
                Re: can you give me some hints on the Oracle Java SE related certificates? Jeff Higgins <jeff@invalid.invalid> - 2015-09-23 10:54 -0400
                Re: can you give me some hints on the Oracle Java SE related certificates? Sebastian <news@seyweiler.dyndns.org> - 2015-09-24 15:30 +0200
                Re: can you give me some hints on the Oracle Java SE related certificates? Jeff Higgins <jeff@invalid.invalid> - 2015-09-24 10:19 -0400
                Re: can you give me some hints on the Oracle Java SE related certificates? Sebastian <news@seyweiler.dyndns.org> - 2015-09-24 17:12 +0200
                Re: can you give me some hints on the Oracle Java SE related certificates? Jeff Higgins <jeff@invalid.invalid> - 2015-09-24 12:05 -0400
                Re: can you give me some hints on the Oracle Java SE related certificates? Jeff Higgins <jeff@invalid.invalid> - 2015-09-22 11:17 -0400

csiph-web