Posted by: ahmedashfaque | March 3, 2015

why java is so popular? part 5


So far we have seen many features of Java programming language in part 1, part 2, part 3, and part 4. Let us continue the discussion in this part.

As we know any computer program is large. Due to large size, complexity of the computer program increases and it becomes difficult to understand the program. To make a computer program simpler, we divide the program into many small methods and link them by calling one method to the other. Since Java is an object oriented language, we use a class as a wrapper to include all variables and methods inside classes. Classes are also a template for creating objects.

Why you need to create objects? Well, objects provide data structure so that you can use them to build all your logic. Once you have objects then you can then define their relationships.

Let us understand as to what classes (and corresponding objects) you need to create for your computer program. Suppose you have to create a website application for managing inventory in your warehouse. You will need to think about structure of the warehouse, kinds of inventory to be handled, kinds of inventory management to be deployed etc. Typical transactions in a warehouse include facility to receive inventory, moving inventory inside the warehouse (put away transactions), storing inventory in the warehouse, moving inventory outside the warehouse for dispatch (against sales orders or transfer orders) etc.

The master data in a warehouse include warehouse number, bin number, storage type, material number, customer etc. The transaction data may include material quantity, purchase order number, transfer order number, sales order number, date, time etc.

Once you figure out data and entities then you can model your application. The entities will be our classes (which will be objects in runtime) and our data will be contained inside these classes. In our warehouse management system, we can create classes for warehouse, bins, inventory, purchase order, sales order etc. We can then find out relationship between objects which will be interacting with each other in runtime.

 

Advertisements

Responses

  1. […] far in part 1, part 2, part 3, part 4, part 5 and part 6 we have covered many topics on Java. In this post we will see […]

  2. […] far in part 1, part 2, part 3, part 4, part 5, part 6 and part 7 we have covered many topics on Java. In this post we will see […]

  3. […] far in part 1, part 2, part 3, part 4, part 5, part 6, part 7 and part 8 we have covered many topics on Java. In this post we will see loop […]

  4. […] far in part 1, part 2, part 3, part 4, part 5, part 6, part 7, part 8 and part 9 we have covered many topics on Java. In this post we will see […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: