java - How do I extend a class? -


i have class: model, many functions, such draw(), rotate() etc.

now have class called cube want able work same way model.

i have in cube class constructor:

model m3d = new model();         m3d.build(obj); 

so want able in class call like:

mcube.draw(); 

and m3d perform draw().

ok. in class call:

class cube extends model {...} 

then can do:

cube mcube = new cube();         mcube.build(obj); mcube.draw(); 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -