Wednesday, July 26, 2017

Database Glossary

Here is a link to a database glossary we compiled a while ago. You may find it a useful reference.

Database Glossary

---Dan

Saturday, May 27, 2017

First Python Class Date

We set the date for our first Python class in San Juan Capistrano for Saturday, July 8. It will run from 9 to 3 with a one hour lunch break. See calendar. In this class you will learn the basic concepts of coding using the popular Python programming language as the tool for learning. Upon successful completion of this course, students will be able to: explore various programming concepts, create simple programs, create and use functions, define classes, implement objects, and handle errors in a program.

Although Python has been around for a while it has become a hot language these days due in part to its widespread use in the booming fields of big data and data science. While we are not addressing those topics in this class you will get an introduction to just how powerful and even fun the easy-to-learn Python language is.

Wednesday, May 24, 2017

New Python Course

We finished the slide deck for the new Introduction to coding with Python course beta release. This is a brief five hour introductory class organized similar to our Java coding class which is in turn based on the Logical Operations courseware. As a beta release any comments would be welcome.



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.

 Instantiating a Python subclass
Click to enlarge
This concludes our screenshot series for this course. We will be offering it in our studio in the coming weeks.


Thursday, May 18, 2017

Python Subclasses

As with  any typical object-oriented language it is possible in Python to create a subclass that inherits properties and methods from a parent or superclass. This is shown in our attached screenshots. The subclass (or child class) can inherit the methods as is or it can override them. This means they are redefined in the subclass. When an object is instantiated from the child class the methods not overridden will work just as they do in the parent class. The overridden methods will work as defined in the subclass.

Our little example shows a project manager subclass created based on the parent employee class. It overrides the salary computation to give a bonus rather than deduct an allowance. It also extends the class by adding a method to return the number of subordinates. Note also the use of the keyword super in the subclass to invoke a method in the superclass.

Subclasses in Java and Python
Click to enlarge view

Monday, May 15, 2017

Constructors (Initializers) in Python

When you define a class in Python you can include constructor functions (actually initializers in Python) to initialize the instance variables. You can define them to accept arguments when the class is instantiated or to accept no arguments. This accomplishes more or less the same thing as overloaded constructors in Java. In this latter case in Python you would initialize the parameter variables to a desired default value in the constructor declaration. You would not write a separate constructor. Here is the code...

 Expanded image of constructors
Click for enlarged view




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.

 Screenshot on box.com
Click to see enlarged image on box.com.