Kamis, 29 Maret 2012

Object Class Model at BlueJ

We’ll explain and define an object, the object is Motorcycle.
Motorcycle have attributes like :
  • No Plat
  • Brand

Motorcycle
No_plat : String
Brand : String





Table 01. atrributes table of motorcycle


Picture 01. abstract class motorcycle

Picture 02. source code of attributes motorcycle

Picture 03. Full script of class motorcycle



Motorcycle can be expanded become some sub-classes like :
  • Sport motorcyle
  • Underbone motorcyle
  • Automatic motorcyle

Picture 04. Sub class of motorcycle

Sport sub-class have some attributes like:
  • Gear
  • Cylinder
Sport
Gear : integer
Cylinder : integer





Table 02. Atrributes table of sport (motorcycle)

Picture 05. Form attribut of sport (motorcycle)

Picture 06. Form field of sport (motorcycle)

Picture 07. Full script of sub-class sport (motorcycle)

Automatic sub-class have some attributes like:
  • Bagage volume
  • Body size
Automatic
Baggage_volume : integer
Body_size : integer





Table 03. Atrributes table of automatic (motorcycle)

Picture 08. Form field of automatic (motorcycle)




Picture 09. Form attribut of automatic (motorcycle)

Picture 10. Full script of sub-class automatic (motorcycle)


Underbone sub-class have some attributes like:
  • Top speed
  • Tak
Underbone
Top_speed : integer
tak : integer





Table 04. Atrributes table of underbone(motorcycle)


Picture 11. Form attribut of underbone (motorcycle)



Picture 12. Form field of underbone (motorcycle)


Picture 13. Full script of sub-class underbone (motorcycle)

Tidak ada komentar:

Posting Komentar