![]() |
| Click to enlarge |
Showing posts with label objects. Show all posts
Showing posts with label objects. Show all posts
Friday, May 19, 2017
Instantiating a Python subclass
In this screenshot we instantiate the project manager subclass. The project manager subclass derives from the employee details parent class. Note that there are two cases: one where we input the employee id, name, etc, and the another where we do not supply any arguments to the constructor. In this case the default values in the constructor declaration supply the values.
This concludes our screenshot series for this course. We will be offering it in our studio in the coming weeks.
Friday, May 12, 2017
Python Object Instantiation
Once a class has been created you can instantiate an object from it. In my example the class is in a different file and an import is used in the file that instantiates the class. In this case an employee object is instantiated in a payroll program. The screenshots show the parallel code and execution results in Python and Java.
![]() |
| Click to see enlarged image on box.com. |
Friday, April 14, 2017
Java Object
Here is the code that instantiates an employee detail object and uses it to compute the employee's net salary. Click on the image for an expanded view.
Subscribe to:
Posts (Atom)


