There are several other options to check out when it comes to picking a tool and I chose the tools above based on preference. You can check out other options here (I have only tried out the first two (NetBeans and Eclipse) on the list). Now to the main point, we will take the outlined task one after the other.

Dear BCB reader, Happy new year to you!!! Last year December, we were one year (Hurray!!!). Thank you to all those who have stayed glued to the blog since inception and to those who will not stop asking when I’m going to write my next blog post. Do accept my apology for being MIA, I am back now…lol. So in form of compensation, this year we will be starting on a fun note as I have taken my time to look into what you would like to learn next.

The past one year have been focused on theoretical concepts in programming. This was with the aim to provide you a good foundation as we started the Java programming journey. I do hope you have found the posts very helpful. This year, we will be going on a more practical ride – we will be going the web way. We will develop web applications from scratch and over time increase the complexities of the functionalities of the application. I will see into making the source code available on Git (“free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency”) for download and I would love to get feedback on the progress you are making.

Remember the Illustration of the four families as shown in the picture above? Click here to refresh you memory. I explained that family “A” member can call members of families B, C and D and vice versa. Today, I will be explaining how this could be achieved, I promised three things in my last post on package: 1.)How to make a class callable outside its package, 2.)The import statement and 3.) The different styles of import. Hence, to fulfill my promise I will be providing answers to these key points today.

In our previous set of tutorials, you must have noticed the use of package and you have seen the import statements following the package statement in most of the classes. Yes, by now I expect you to have been familiar with these two keywords since I have briefly discussed them here but you probably don’t understand why we needed the packages, created the different packages in my last series of posts, put some classes within them and why I had to make call to the Importstatement. Whatever the case, this post is to clear your doubts, if any, and make you understand why packages are important.

First, when you think about a package, what comes to your mind? For me, I think of a wrapped box with related Items – remember when you are checking out at the mall, the attendant packs related items together. For example, food items are not put close to detergents. Packages in Java does something similar to that of the mall attendant. It brings together related classes and interface into the same package so as to avoid mix up. For the sake of definition, a package is a collection of related classes and interfaces. To have a clearer view, let us assume families A, B, C and D with two children each with the profession shown in the illustration below:

Today we will be concluding the set of posts I have been sharing on how to bring the pieces of our previous lessons together and write a meaningful code. We will focus on User Interaction but before we go ahead, let us have a recap of all we have done so far.

Setting up of IDEs,

Creation of packages, classes, methods, variables and identifies,

Brief overview of access modifiers

Declaration of constructors

Use of Java statements: If-Else and return statements

Implementation of an interface – declaration of an interface, addition of abstract methods to an interface and implementation of an interface.

Working with objects by creating instance of a class,

Encapsulation – making use of setters and getters and we were able to set parameters and get some parameters using this concept.

Calling up methods from implementing classes of an interface by creating object of the implementing class with reference to the interface

In my last post, we focused on declaration of interface and implementation of an interface method. We were able to create interface AllShapesInterface and we implemented the method interface in PolygonController class where we also defined the methods to calculate the areas of various shapes. I asked you to do the same for NonPolygonController class, I hope you were able to do this? As promised, the sample code of my own implementation is shown below:

In my last post, we started bringing together the pieces of our previous tutorials together – we were able to set up our IDEs, created packages, classes, variables and Identifiers. In this post, we will continue from where we stopped which was the ShapeVariableBean.java class. Looking again at the structure of our application (AreaofShapes) as we discussed earlier here, we have three packages, nine (9) classes and one (1) interface altogether as shown below.

In the last lesson, I explained the purpose of each package and we saw the content of ShapeVariableBean and how encapsulation came to play. Today, we will focus more on the com.bee.code.blog.ShapeController package and also, we will see how other classes implements interface within this package. In com.bee.code.blog.ShapeController package, the shapes are divided into two; PolygonController and NonpolygonController.

Note: As an update on the last post, I added a new item on this package which is what we will be focusing on today. I added interface AllShapesInterface above so we can see how to make use of an interface in the course of these set of lessons. Before we continue, please refer to my earlier post on interface where I explained in detail what an Interface is in case you missed the lesson.